Skip site navigation (1) Skip section navigation (2)

pgsql: Put back AcceptInvalidationMessages calls inheap_openrv(_extend

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Put back AcceptInvalidationMessages calls inheap_openrv(_extend
Date: 2012-09-19 21:10:55
Message-ID: E1TERXr-0000Ey-2E@gemulon.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Put back AcceptInvalidationMessages calls in heap_openrv(_extended).

These calls were removed in commit 4240e429d0c2d889d0cda23c618f94e12c13ade7
as part of a general refactoring and improvement of DDL locking.  However,
there's a problem not solved by the rewrite, which is that GRANT/REVOKE
update pg_class.relacl without taking any particular lock on the target
table as such.  If another backend fails to do AcceptInvalidationMessages,
it won't notice a recently-committed change in ACLs.  Bug #7557 from Piotr
Czachur demonstrates that there's at least one code path in 9.2.0 in which
a command fails to do any AcceptInvalidationMessages calls at all, if the
current transaction already holds all the locks it will need.

Since we're hard up against the release deadline for 9.2.1, fix this by
putting back the AcceptInvalidationMessages calls in heap_openrv and
heap_openrv_extended, thereby restoring the historical behavior in this
area.  We ought to look for a more elegant and perhaps more bulletproof
solution, but there's no time for that right now.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/96cc18eef6489cccefe351baa193f32f12018551

Modified Files
--------------
src/backend/access/heap/heapam.c |   21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)

pgsql-committers by date

Next:From: Tom LaneDate: 2012-09-19 21:39:57
Subject: pgsql: Update release notes for 9.2.1, 9.1.6, 9.0.10, 8.4.14, 8.3.21.
Previous:From: Simon RiggsDate: 2012-09-19 18:21:29
Subject: Re: Re: [COMMITTERS] pgsql: Properly set relpersistence for fake relcache entries.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group