mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +03:00 
			
		
		
		
	Increase size of bgw_library_name.
This commit increases the size of the bgw_library_name member of the BackgroundWorker struct from BGW_MAXLEN (96) bytes to MAXPGPATH (default of 1024) bytes so that it can store longer file names (e.g., absolute paths). Author: Yurii Rashkovskii Reviewed-by: Daniel Gustafsson, Aleksander Alekseev Discussion: https://postgr.es/m/CA%2BRLCQyjFV5Y8tG5QgUb6gjteL4S3p%2B1gcyqWTqigyM93WZ9Pg%40mail.gmail.com
This commit is contained in:
		@@ -456,7 +456,7 @@ retry:
 | 
			
		||||
	bgw.bgw_flags = BGWORKER_SHMEM_ACCESS |
 | 
			
		||||
		BGWORKER_BACKEND_DATABASE_CONNECTION;
 | 
			
		||||
	bgw.bgw_start_time = BgWorkerStart_RecoveryFinished;
 | 
			
		||||
	snprintf(bgw.bgw_library_name, BGW_MAXLEN, "postgres");
 | 
			
		||||
	snprintf(bgw.bgw_library_name, MAXPGPATH, "postgres");
 | 
			
		||||
 | 
			
		||||
	if (is_parallel_apply_worker)
 | 
			
		||||
		snprintf(bgw.bgw_function_name, BGW_MAXLEN, "ParallelApplyWorkerMain");
 | 
			
		||||
@@ -910,7 +910,7 @@ ApplyLauncherRegister(void)
 | 
			
		||||
	bgw.bgw_flags = BGWORKER_SHMEM_ACCESS |
 | 
			
		||||
		BGWORKER_BACKEND_DATABASE_CONNECTION;
 | 
			
		||||
	bgw.bgw_start_time = BgWorkerStart_RecoveryFinished;
 | 
			
		||||
	snprintf(bgw.bgw_library_name, BGW_MAXLEN, "postgres");
 | 
			
		||||
	snprintf(bgw.bgw_library_name, MAXPGPATH, "postgres");
 | 
			
		||||
	snprintf(bgw.bgw_function_name, BGW_MAXLEN, "ApplyLauncherMain");
 | 
			
		||||
	snprintf(bgw.bgw_name, BGW_MAXLEN,
 | 
			
		||||
			 "logical replication launcher");
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user