aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2010-08-16 02:02:28 +0000
committerRobert Haas <rhaas@postgresql.org>2010-08-16 02:02:28 +0000
commit66b14030e889f09b49b3be9b93d63a00289d73c7 (patch)
tree2409e18ade4794e42f73235972e3af9b359a975f
parentb49c879015d03081c3a515bca25681ca3d50cead (diff)
downloadpostgresql-66b14030e889f09b49b3be9b93d63a00289d73c7.tar.gz
postgresql-66b14030e889f09b49b3be9b93d63a00289d73c7.zip
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.
-rw-r--r--src/backend/storage/lmgr/lmgr.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/backend/storage/lmgr/lmgr.c b/src/backend/storage/lmgr/lmgr.c
index 75f2f2666e0..39a0ea1deb1 100644
--- a/src/backend/storage/lmgr/lmgr.c
+++ b/src/backend/storage/lmgr/lmgr.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/storage/lmgr/lmgr.c,v 1.100 2010/01/02 16:57:52 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/storage/lmgr/lmgr.c,v 1.101 2010/08/16 02:02:28 rhaas Exp $
*
*-------------------------------------------------------------------------
*/
@@ -599,6 +599,9 @@ LockDatabaseObject(Oid classid, Oid objid, uint16 objsubid,
objsubid);
(void) LockAcquire(&tag, lockmode, false, false);
+
+ /* Make sure syscaches are up-to-date with any changes we waited for */
+ AcceptInvalidationMessages();
}
/*