Skip to content

Commit 66b1403

Browse files
committed
Make LockDatabaseObject() AcceptInvalidationMessages().
This is appropriate for the same reasons we already do it in LockSharedObject(): things might have changed while we were waiting for the lock. There doesn't seem to be a live bug here at the moment, but that's mostly because it isn't currently used for very much.
1 parent b49c879 commit 66b1403

File tree

1 file changed

+4
-1
lines changed
  • src/backend/storage/lmgr

1 file changed

+4
-1
lines changed

src/backend/storage/lmgr/lmgr.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/storage/lmgr/lmgr.c,v 1.100 2010/01/02 16:57:52 momjian Exp $
11+
* $PostgreSQL: pgsql/src/backend/storage/lmgr/lmgr.c,v 1.101 2010/08/16 02:02:28 rhaas Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -599,6 +599,9 @@ LockDatabaseObject(Oid classid, Oid objid, uint16 objsubid,
599599
objsubid);
600600

601601
(void) LockAcquire(&tag, lockmode, false, false);
602+
603+
/* Make sure syscaches are up-to-date with any changes we waited for */
604+
AcceptInvalidationMessages();
602605
}
603606

604607
/*

0 commit comments

Comments
 (0)