mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +03:00 
			
		
		
		
	Also fix rotation of csvlog on Windows.
Backpatch to 9.2, like the previous fix.
This commit is contained in:
		@@ -1064,10 +1064,12 @@ pipeThread(void *arg)
 | 
			
		||||
		 * If we've filled the current logfile, nudge the main thread to do a
 | 
			
		||||
		 * log rotation.
 | 
			
		||||
		 */
 | 
			
		||||
		if (Log_RotationSize > 0 &&
 | 
			
		||||
			ftell(syslogFile) >= Log_RotationSize * 1024L)
 | 
			
		||||
		if (Log_RotationSize > 0)
 | 
			
		||||
		{
 | 
			
		||||
			if (ftell(syslogFile) >= Log_RotationSize * 1024L ||
 | 
			
		||||
				(csvlogFile != NULL && ftell(csvlogFile) >= Log_RotationSize * 1024L))
 | 
			
		||||
				SetLatch(&sysLoggerLatch);
 | 
			
		||||
 | 
			
		||||
		}
 | 
			
		||||
		LeaveCriticalSection(&sysloggerSection);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user