mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +03:00 
			
		
		
		
	Fix error status of vacuumdb when multiple jobs are used
When running a batch of VACUUM or ANALYZE commands on a given database, there were cases where it is possible to have vacuumdb not report an error where it actually should, leading to incorrect status results. Author: Julien Rouhaud Reviewed-by: Amit Kapila, Michael Paquier Discussion: https://postgr.es/m/CAOBaU_ZuTwz7CtqLYJ1Ouuh272bTQPLN8b1bAPk0bCBm4PDMTQ@mail.gmail.com Backpatch-through: 9.5
This commit is contained in:
		@@ -519,9 +519,12 @@ vacuum_one_database(const char *dbname, vacuumingOptions *vacopts,
 | 
				
			|||||||
		for (j = 0; j < concurrentCons; j++)
 | 
							for (j = 0; j < concurrentCons; j++)
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			if (!GetQueryResult((slots + j)->connection, progname))
 | 
								if (!GetQueryResult((slots + j)->connection, progname))
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									failed = true;
 | 
				
			||||||
				goto finish;
 | 
									goto finish;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
finish:
 | 
					finish:
 | 
				
			||||||
	for (i = 0; i < concurrentCons; i++)
 | 
						for (i = 0; i < concurrentCons; i++)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user