mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
Fix a couple of snapshot management bugs in the new ResourceOwner world:
non-writable large objects need to have their snapshots registered on the transaction resowner, not the current portal's, because it must persist until the large object is closed (which the portal does not). Also, ensure that the serializable snapshot is recorded by the transaction resource owner too, even when a subtransaction has changed the current resource owner before serializable is taken. Per bug reports from Pavan Deolasee.
This commit is contained in:
@ -10,7 +10,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/access/transam/xact.c,v 1.269 2008/11/19 10:34:50 heikki Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/access/transam/xact.c,v 1.270 2008/12/04 14:51:02 alvherre Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -1667,6 +1667,9 @@ CommitTransaction(void)
|
||||
/* Clean up the relation cache */
|
||||
AtEOXact_RelationCache(true);
|
||||
|
||||
/* Clean up the snapshot manager */
|
||||
AtEarlyCommit_Snapshot();
|
||||
|
||||
/*
|
||||
* Make catalog changes visible to all backends. This has to happen after
|
||||
* relcache references are dropped (see comments for
|
||||
@ -1906,6 +1909,9 @@ PrepareTransaction(void)
|
||||
/* Clean up the relation cache */
|
||||
AtEOXact_RelationCache(true);
|
||||
|
||||
/* Clean up the snapshot manager */
|
||||
AtEarlyCommit_Snapshot();
|
||||
|
||||
/* notify and flatfiles don't need a postprepare call */
|
||||
|
||||
PostPrepare_PgStat();
|
||||
|
Reference in New Issue
Block a user