1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

Clean up representation of SLRU page state. This is the cleaner fix

for the SLRU race condition that I posted a few days ago, but we decided
not to use in 8.1 and older branches.
This commit is contained in:
Tom Lane
2005-11-05 21:19:47 +00:00
parent 667ba8ccb1
commit 18691d8ee3
5 changed files with 158 additions and 149 deletions

View File

@ -22,7 +22,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/backend/access/transam/subtrans.c,v 1.11 2005/10/15 02:49:09 momjian Exp $
* $PostgreSQL: pgsql/src/backend/access/transam/subtrans.c,v 1.12 2005/11/05 21:19:47 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -86,7 +86,7 @@ SubTransSetParent(TransactionId xid, TransactionId parent)
*ptr = parent;
SubTransCtl->shared->page_status[slotno] = SLRU_PAGE_DIRTY;
SubTransCtl->shared->page_dirty[slotno] = true;
LWLockRelease(SubtransControlLock);
}
@ -199,7 +199,7 @@ BootStrapSUBTRANS(void)
/* Make sure it's written out */
SimpleLruWritePage(SubTransCtl, slotno, NULL);
Assert(SubTransCtl->shared->page_status[slotno] == SLRU_PAGE_CLEAN);
Assert(!SubTransCtl->shared->page_dirty[slotno]);
LWLockRelease(SubtransControlLock);
}