pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix ExecOpenScanRelation to take a lock on a ROW_MARK_COPY relat
6+ messages / 1 participants
[nested] [flat]

* pgsql: Fix ExecOpenScanRelation to take a lock on a ROW_MARK_COPY relat
@ 2015-03-24 19:53 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2015-03-24 19:53 UTC (permalink / raw)
  To: pgsql-committers

Fix ExecOpenScanRelation to take a lock on a ROW_MARK_COPY relation.

ExecOpenScanRelation assumed that any relation listed in the ExecRowMark
list has been locked by InitPlan; but this is not true if the rel's
markType is ROW_MARK_COPY, which is possible if it's a foreign table.

In most (possibly all) cases, failure to acquire a lock here isn't really
problematic because the parser, planner, or plancache would have taken the
appropriate lock already.  In principle though it might leave us vulnerable
to working with a relation that we hold no lock on, and in any case if the
executor isn't depending on previously-taken locks otherwise then it should
not do so for ROW_MARK_COPY relations.

Noted by Etsuro Fujita.  Back-patch to all active versions, since the
inconsistency has been there a long time.  (It's almost certainly
irrelevant in 9.0, since that predates foreign tables, but the code's
still wrong on its own terms.)

Branch
------
master

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

Modified Files
--------------
src/backend/executor/execMain.c  |    4 ++++
src/backend/executor/execUtils.c |    4 +++-
2 files changed, 7 insertions(+), 1 deletion(-)


-- 
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] 6+ messages in thread

* pgsql: Fix ExecOpenScanRelation to take a lock on a ROW_MARK_COPY relat
@ 2015-03-24 19:53 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2015-03-24 19:53 UTC (permalink / raw)
  To: pgsql-committers

Fix ExecOpenScanRelation to take a lock on a ROW_MARK_COPY relation.

ExecOpenScanRelation assumed that any relation listed in the ExecRowMark
list has been locked by InitPlan; but this is not true if the rel's
markType is ROW_MARK_COPY, which is possible if it's a foreign table.

In most (possibly all) cases, failure to acquire a lock here isn't really
problematic because the parser, planner, or plancache would have taken the
appropriate lock already.  In principle though it might leave us vulnerable
to working with a relation that we hold no lock on, and in any case if the
executor isn't depending on previously-taken locks otherwise then it should
not do so for ROW_MARK_COPY relations.

Noted by Etsuro Fujita.  Back-patch to all active versions, since the
inconsistency has been there a long time.  (It's almost certainly
irrelevant in 9.0, since that predates foreign tables, but the code's
still wrong on its own terms.)

Branch
------
REL9_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/3171edddc4b8386e0f0ee2a68bb4b253d79444fc

Modified Files
--------------
src/backend/executor/execMain.c  |    4 ++++
src/backend/executor/execUtils.c |    4 +++-
2 files changed, 7 insertions(+), 1 deletion(-)


-- 
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] 6+ messages in thread

* pgsql: Fix ExecOpenScanRelation to take a lock on a ROW_MARK_COPY relat
@ 2015-03-24 19:53 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2015-03-24 19:53 UTC (permalink / raw)
  To: pgsql-committers

Fix ExecOpenScanRelation to take a lock on a ROW_MARK_COPY relation.

ExecOpenScanRelation assumed that any relation listed in the ExecRowMark
list has been locked by InitPlan; but this is not true if the rel's
markType is ROW_MARK_COPY, which is possible if it's a foreign table.

In most (possibly all) cases, failure to acquire a lock here isn't really
problematic because the parser, planner, or plancache would have taken the
appropriate lock already.  In principle though it might leave us vulnerable
to working with a relation that we hold no lock on, and in any case if the
executor isn't depending on previously-taken locks otherwise then it should
not do so for ROW_MARK_COPY relations.

Noted by Etsuro Fujita.  Back-patch to all active versions, since the
inconsistency has been there a long time.  (It's almost certainly
irrelevant in 9.0, since that predates foreign tables, but the code's
still wrong on its own terms.)

Branch
------
REL9_3_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/7cd5498b375ea1ce7bdd158da5940e000578ef08

Modified Files
--------------
src/backend/executor/execMain.c  |    4 ++++
src/backend/executor/execUtils.c |    4 +++-
2 files changed, 7 insertions(+), 1 deletion(-)


-- 
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] 6+ messages in thread

* pgsql: Fix ExecOpenScanRelation to take a lock on a ROW_MARK_COPY relat
@ 2015-03-24 19:53 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2015-03-24 19:53 UTC (permalink / raw)
  To: pgsql-committers

Fix ExecOpenScanRelation to take a lock on a ROW_MARK_COPY relation.

ExecOpenScanRelation assumed that any relation listed in the ExecRowMark
list has been locked by InitPlan; but this is not true if the rel's
markType is ROW_MARK_COPY, which is possible if it's a foreign table.

In most (possibly all) cases, failure to acquire a lock here isn't really
problematic because the parser, planner, or plancache would have taken the
appropriate lock already.  In principle though it might leave us vulnerable
to working with a relation that we hold no lock on, and in any case if the
executor isn't depending on previously-taken locks otherwise then it should
not do so for ROW_MARK_COPY relations.

Noted by Etsuro Fujita.  Back-patch to all active versions, since the
inconsistency has been there a long time.  (It's almost certainly
irrelevant in 9.0, since that predates foreign tables, but the code's
still wrong on its own terms.)

Branch
------
REL9_2_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/3fbfd5dbeca7931b40d9ec919fb64c3f08893848

Modified Files
--------------
src/backend/executor/execMain.c  |    4 ++++
src/backend/executor/execUtils.c |    4 +++-
2 files changed, 7 insertions(+), 1 deletion(-)


-- 
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] 6+ messages in thread

* pgsql: Fix ExecOpenScanRelation to take a lock on a ROW_MARK_COPY relat
@ 2015-03-24 19:53 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2015-03-24 19:53 UTC (permalink / raw)
  To: pgsql-committers

Fix ExecOpenScanRelation to take a lock on a ROW_MARK_COPY relation.

ExecOpenScanRelation assumed that any relation listed in the ExecRowMark
list has been locked by InitPlan; but this is not true if the rel's
markType is ROW_MARK_COPY, which is possible if it's a foreign table.

In most (possibly all) cases, failure to acquire a lock here isn't really
problematic because the parser, planner, or plancache would have taken the
appropriate lock already.  In principle though it might leave us vulnerable
to working with a relation that we hold no lock on, and in any case if the
executor isn't depending on previously-taken locks otherwise then it should
not do so for ROW_MARK_COPY relations.

Noted by Etsuro Fujita.  Back-patch to all active versions, since the
inconsistency has been there a long time.  (It's almost certainly
irrelevant in 9.0, since that predates foreign tables, but the code's
still wrong on its own terms.)

Branch
------
REL9_1_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/054723bcc5b03e40d6341b26b2dce5222a66ce4c

Modified Files
--------------
src/backend/executor/execMain.c  |    4 ++++
src/backend/executor/execUtils.c |    4 +++-
2 files changed, 7 insertions(+), 1 deletion(-)


-- 
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] 6+ messages in thread

* pgsql: Fix ExecOpenScanRelation to take a lock on a ROW_MARK_COPY relat
@ 2015-03-24 19:53 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2015-03-24 19:53 UTC (permalink / raw)
  To: pgsql-committers

Fix ExecOpenScanRelation to take a lock on a ROW_MARK_COPY relation.

ExecOpenScanRelation assumed that any relation listed in the ExecRowMark
list has been locked by InitPlan; but this is not true if the rel's
markType is ROW_MARK_COPY, which is possible if it's a foreign table.

In most (possibly all) cases, failure to acquire a lock here isn't really
problematic because the parser, planner, or plancache would have taken the
appropriate lock already.  In principle though it might leave us vulnerable
to working with a relation that we hold no lock on, and in any case if the
executor isn't depending on previously-taken locks otherwise then it should
not do so for ROW_MARK_COPY relations.

Noted by Etsuro Fujita.  Back-patch to all active versions, since the
inconsistency has been there a long time.  (It's almost certainly
irrelevant in 9.0, since that predates foreign tables, but the code's
still wrong on its own terms.)

Branch
------
REL9_0_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/6997f226f5de7e02b6afd2d8ff67cf40f20e878b

Modified Files
--------------
src/backend/executor/execMain.c  |    4 ++++
src/backend/executor/execUtils.c |    4 +++-
2 files changed, 7 insertions(+), 1 deletion(-)


-- 
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] 6+ messages in thread


end of thread, other threads:[~2015-03-24 19:53 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-03-24 19:53 pgsql: Fix ExecOpenScanRelation to take a lock on a ROW_MARK_COPY relat Tom Lane <tgl@sss.pgh.pa.us>
2015-03-24 19:53 pgsql: Fix ExecOpenScanRelation to take a lock on a ROW_MARK_COPY relat Tom Lane <tgl@sss.pgh.pa.us>
2015-03-24 19:53 pgsql: Fix ExecOpenScanRelation to take a lock on a ROW_MARK_COPY relat Tom Lane <tgl@sss.pgh.pa.us>
2015-03-24 19:53 pgsql: Fix ExecOpenScanRelation to take a lock on a ROW_MARK_COPY relat Tom Lane <tgl@sss.pgh.pa.us>
2015-03-24 19:53 pgsql: Fix ExecOpenScanRelation to take a lock on a ROW_MARK_COPY relat Tom Lane <tgl@sss.pgh.pa.us>
2015-03-24 19:53 pgsql: Fix ExecOpenScanRelation to take a lock on a ROW_MARK_COPY relat 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