pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix bogus lock release in RemovePolicyById and RemoveRoleFromObj
2+ messages / 1 participants
[nested] [flat]

* pgsql: Fix bogus lock release in RemovePolicyById and RemoveRoleFromObj
@ 2016-01-04 01:53 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2016-01-04 01:53 UTC (permalink / raw)
  To: pgsql-committers

Fix bogus lock release in RemovePolicyById and RemoveRoleFromObjectPolicy.

Can't release the AccessExclusiveLock on the target table until commit.
Otherwise there is a race condition whereby other backends might service
our cache invalidation signals before they can actually see the updated
catalog rows.

Just to add insult to injury, RemovePolicyById was closing the rel (with
incorrect lock drop) and then passing the now-dangling rel pointer to
CacheInvalidateRelcache.  Probably the reason this doesn't fall over on
CLOBBER_CACHE buildfarm members is that some outer level of the DROP logic
is still holding the rel open ... but it'd have bit us on the arse
eventually, no doubt.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/f47b602df80d7647ca2e71c86f7228b1bf5bf9f3

Modified Files
--------------
src/backend/commands/policy.c |   15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Fix bogus lock release in RemovePolicyById and RemoveRoleFromObj
@ 2016-01-04 01:53 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2016-01-04 01:53 UTC (permalink / raw)
  To: pgsql-committers

Fix bogus lock release in RemovePolicyById and RemoveRoleFromObjectPolicy.

Can't release the AccessExclusiveLock on the target table until commit.
Otherwise there is a race condition whereby other backends might service
our cache invalidation signals before they can actually see the updated
catalog rows.

Just to add insult to injury, RemovePolicyById was closing the rel (with
incorrect lock drop) and then passing the now-dangling rel pointer to
CacheInvalidateRelcache.  Probably the reason this doesn't fall over on
CLOBBER_CACHE buildfarm members is that some outer level of the DROP logic
is still holding the rel open ... but it'd have bit us on the arse
eventually, no doubt.

Branch
------
REL9_5_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/c244a511ba7f40dd43516eb025b1b299f2978f23

Modified Files
--------------
src/backend/commands/policy.c |   15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2016-01-04 01:53 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-01-04 01:53 pgsql: Fix bogus lock release in RemovePolicyById and RemoveRoleFromObj Tom Lane <tgl@sss.pgh.pa.us>
2016-01-04 01:53 pgsql: Fix bogus lock release in RemovePolicyById and RemoveRoleFromObj Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox