mirror of
				https://github.com/postgres/postgres.git
				synced 2025-10-31 10:30:33 +03:00 
			
		
		
		
	Fixups for commit 93db6cbda0.
				
					
				
			Ensure to set always-secure search path for both local and remote connections during slot synchronization, so that malicious users can't redirect user code (e.g. operators). In the passing, improve the name of define, remove spurious return statement, and a minor change in one of the comments. Author: Bertrand Drouvot and Shveta Malik Reviewed-by: Amit Kapila, Peter Smith Discussion: https://postgr.es/m/514f6f2f-6833-4539-39f1-96cd1e011f23@enterprisedb.com Discussion: https://postgr.es/m/ZdcejBDCr+wlVGnO@ip-10-97-1-34.eu-west-3.compute.internal Discussion: https://postgr.es/m/CAJpy0uBNP=nrkNJkJSfF=jSocEh8vU2Owa8Rtpi=63fG=SvfVQ@mail.gmail.com
This commit is contained in:
		| @@ -1472,13 +1472,14 @@ FinishWalRecovery(void) | ||||
| 	 * Shutdown the slot sync worker to drop any temporary slots acquired by | ||||
| 	 * it and to prevent it from keep trying to fetch the failover slots. | ||||
| 	 * | ||||
| 	 * We do not update the 'synced' column from true to false here, as any | ||||
| 	 * failed update could leave 'synced' column false for some slots. This | ||||
| 	 * could cause issues during slot sync after restarting the server as a | ||||
| 	 * standby. While updating the 'synced' column after switching to the new | ||||
| 	 * timeline is an option, it does not simplify the handling for the | ||||
| 	 * 'synced' column. Therefore, we retain the 'synced' column as true after | ||||
| 	 * promotion as it may provide useful information about the slot origin. | ||||
| 	 * We do not update the 'synced' column in 'pg_replication_slots' system | ||||
| 	 * view from true to false here, as any failed update could leave 'synced' | ||||
| 	 * column false for some slots. This could cause issues during slot sync | ||||
| 	 * after restarting the server as a standby. While updating the 'synced' | ||||
| 	 * column after switching to the new timeline is an option, it does not | ||||
| 	 * simplify the handling for the 'synced' column. Therefore, we retain the | ||||
| 	 * 'synced' column as true after promotion as it may provide useful | ||||
| 	 * information about the slot origin. | ||||
| 	 */ | ||||
| 	ShutDownSlotSync(); | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user