mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +03:00 
			
		
		
		
	Replace the KnownAssignedXids hash table with a sorted-array data structure,
and be more tense about the locking requirements for it, to improve performance in Hot Standby mode. In passing fix a few bugs and improve a number of comments in the existing HS code. Simon Riggs, with some editorialization by Tom
This commit is contained in:
		@@ -7,7 +7,7 @@
 | 
				
			|||||||
 * Portions Copyright (c) 1994, Regents of the University of California
 | 
					 * Portions Copyright (c) 1994, Regents of the University of California
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * IDENTIFICATION
 | 
					 * IDENTIFICATION
 | 
				
			||||||
 *		$PostgreSQL: pgsql/src/backend/access/transam/twophase.c,v 1.60 2010/04/13 14:17:46 heikki Exp $
 | 
					 *		$PostgreSQL: pgsql/src/backend/access/transam/twophase.c,v 1.61 2010/04/28 00:09:05 tgl Exp $
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * NOTES
 | 
					 * NOTES
 | 
				
			||||||
 *		Each global transaction is associated with a global transaction
 | 
					 *		Each global transaction is associated with a global transaction
 | 
				
			||||||
@@ -1200,6 +1200,9 @@ StandbyTransactionIdIsPrepared(TransactionId xid)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	Assert(TransactionIdIsValid(xid));
 | 
						Assert(TransactionIdIsValid(xid));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (max_prepared_xacts <= 0)
 | 
				
			||||||
 | 
							return false;					/* nothing to do */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Read and validate file */
 | 
						/* Read and validate file */
 | 
				
			||||||
	buf = ReadTwoPhaseFile(xid, false);
 | 
						buf = ReadTwoPhaseFile(xid, false);
 | 
				
			||||||
	if (buf == NULL)
 | 
						if (buf == NULL)
 | 
				
			||||||
 
 | 
				
			|||||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
		Reference in New Issue
	
	Block a user