pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Add locking clause for SB views for update/delete
2+ messages / 1 participants
[nested] [flat]

* pgsql: Add locking clause for SB views for update/delete
@ 2015-02-26 02:36 Stephen Frost <sfrost@snowman.net>
  0 siblings, 0 replies; 2+ messages in thread

From: Stephen Frost @ 2015-02-26 02:36 UTC (permalink / raw)
  To: pgsql-committers

Add locking clause for SB views for update/delete

In expand_security_qual(), we were handling locking correctly when a
PlanRowMark existed, but not when we were working with the target
relation (which doesn't have any PlanRowMarks, but the subquery created
for the security barrier quals still needs to lock the rows under it).

Noted by Etsuro Fujita when working with the Postgres FDW, which wasn't
properly issuing a SELECT ... FOR UPDATE to the remote side under a
DELETE.

Back-patch to 9.4 where updatable security barrier views were
introduced.

Per discussion with Etsuro and Dean Rasheed.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/6f9bd50eabb0a4960e94c83dac8855771c9f340d

Modified Files
--------------
src/backend/optimizer/prep/prepsecurity.c     |   35 +++-
src/test/regress/expected/rowsecurity.out     |   64 +++---
src/test/regress/expected/updatable_views.out |  264 +++++++++++++------------
3 files changed, 206 insertions(+), 157 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: Add locking clause for SB views for update/delete
@ 2015-02-26 02:36 Stephen Frost <sfrost@snowman.net>
  0 siblings, 0 replies; 2+ messages in thread

From: Stephen Frost @ 2015-02-26 02:36 UTC (permalink / raw)
  To: pgsql-committers

Add locking clause for SB views for update/delete

In expand_security_qual(), we were handling locking correctly when a
PlanRowMark existed, but not when we were working with the target
relation (which doesn't have any PlanRowMarks, but the subquery created
for the security barrier quals still needs to lock the rows under it).

Noted by Etsuro Fujita when working with the Postgres FDW, which wasn't
properly issuing a SELECT ... FOR UPDATE to the remote side under a
DELETE.

Back-patch to 9.4 where updatable security barrier views were
introduced.

Per discussion with Etsuro and Dean Rasheed.

Branch
------
REL9_4_STABLE

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

Modified Files
--------------
src/backend/optimizer/prep/prepsecurity.c     |   35 +++-
src/test/regress/expected/updatable_views.out |  264 +++++++++++++------------
2 files changed, 170 insertions(+), 129 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:[~2015-02-26 02:36 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-02-26 02:36 pgsql: Add locking clause for SB views for update/delete Stephen Frost <sfrost@snowman.net>
2015-02-26 02:36 pgsql: Add locking clause for SB views for update/delete Stephen Frost <sfrost@snowman.net>

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