pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Avoid trying to lock OLD/NEW in a rule with FOR UPDATE.
7+ messages / 1 participants
[nested] [flat]

* pgsql: Avoid trying to lock OLD/NEW in a rule with FOR UPDATE.
@ 2021-08-19 16:12 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2021-08-19 16:12 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Avoid trying to lock OLD/NEW in a rule with FOR UPDATE.

transformLockingClause neglected to exclude the pseudo-RTEs for
OLD/NEW when processing a rule's query.  This led to odd errors
or even crashes later on.  This bug is very ancient, but it's
not terribly surprising that nobody noticed, since the use-case
for SELECT FOR UPDATE in a non-view rule is somewhere between
thin and non-existent.  Still, crashing is not OK.

Per bug #17151 from Zhiyong Wu.  Thanks to Masahiko Sawada
for analysis of the problem.

Discussion: https://postgr.es/m/17151-c03a3e6e4ec9aadb@postgresql.org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/8d2d6ec7708b475787fd92a9f828e554805e3df6

Modified Files
--------------
src/backend/parser/analyze.c        | 19 +++++++++++++++++--
src/include/nodes/parsenodes.h      |  8 ++++----
src/test/regress/expected/rules.out | 25 +++++++++++++++++++++++++
src/test/regress/sql/rules.sql      | 14 ++++++++++++++
4 files changed, 60 insertions(+), 6 deletions(-)



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

* pgsql: Avoid trying to lock OLD/NEW in a rule with FOR UPDATE.
@ 2021-08-19 16:12 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2021-08-19 16:12 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Avoid trying to lock OLD/NEW in a rule with FOR UPDATE.

transformLockingClause neglected to exclude the pseudo-RTEs for
OLD/NEW when processing a rule's query.  This led to odd errors
or even crashes later on.  This bug is very ancient, but it's
not terribly surprising that nobody noticed, since the use-case
for SELECT FOR UPDATE in a non-view rule is somewhere between
thin and non-existent.  Still, crashing is not OK.

Per bug #17151 from Zhiyong Wu.  Thanks to Masahiko Sawada
for analysis of the problem.

Discussion: https://postgr.es/m/17151-c03a3e6e4ec9aadb@postgresql.org

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/4649003933522282f03643c5a50fd2eb2a31a783

Modified Files
--------------
src/backend/parser/analyze.c        | 19 +++++++++++++++++--
src/include/nodes/parsenodes.h      |  8 ++++----
src/test/regress/expected/rules.out | 25 +++++++++++++++++++++++++
src/test/regress/sql/rules.sql      | 14 ++++++++++++++
4 files changed, 60 insertions(+), 6 deletions(-)



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

* pgsql: Avoid trying to lock OLD/NEW in a rule with FOR UPDATE.
@ 2021-08-19 16:12 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2021-08-19 16:12 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Avoid trying to lock OLD/NEW in a rule with FOR UPDATE.

transformLockingClause neglected to exclude the pseudo-RTEs for
OLD/NEW when processing a rule's query.  This led to odd errors
or even crashes later on.  This bug is very ancient, but it's
not terribly surprising that nobody noticed, since the use-case
for SELECT FOR UPDATE in a non-view rule is somewhere between
thin and non-existent.  Still, crashing is not OK.

Per bug #17151 from Zhiyong Wu.  Thanks to Masahiko Sawada
for analysis of the problem.

Discussion: https://postgr.es/m/17151-c03a3e6e4ec9aadb@postgresql.org

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/7fa367d96bb1ae25f422d6c2a78424f0f9227b5a

Modified Files
--------------
src/backend/parser/analyze.c        | 19 +++++++++++++++++--
src/include/nodes/parsenodes.h      |  8 ++++----
src/test/regress/expected/rules.out | 25 +++++++++++++++++++++++++
src/test/regress/sql/rules.sql      | 14 ++++++++++++++
4 files changed, 60 insertions(+), 6 deletions(-)



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

* pgsql: Avoid trying to lock OLD/NEW in a rule with FOR UPDATE.
@ 2021-08-19 16:12 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2021-08-19 16:12 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Avoid trying to lock OLD/NEW in a rule with FOR UPDATE.

transformLockingClause neglected to exclude the pseudo-RTEs for
OLD/NEW when processing a rule's query.  This led to odd errors
or even crashes later on.  This bug is very ancient, but it's
not terribly surprising that nobody noticed, since the use-case
for SELECT FOR UPDATE in a non-view rule is somewhere between
thin and non-existent.  Still, crashing is not OK.

Per bug #17151 from Zhiyong Wu.  Thanks to Masahiko Sawada
for analysis of the problem.

Discussion: https://postgr.es/m/17151-c03a3e6e4ec9aadb@postgresql.org

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/0c13ee198f0d690765550fc1c694f9191e9785d6

Modified Files
--------------
src/backend/parser/analyze.c        | 19 +++++++++++++++++--
src/include/nodes/parsenodes.h      |  8 ++++----
src/test/regress/expected/rules.out | 25 +++++++++++++++++++++++++
src/test/regress/sql/rules.sql      | 14 ++++++++++++++
4 files changed, 60 insertions(+), 6 deletions(-)



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

* pgsql: Avoid trying to lock OLD/NEW in a rule with FOR UPDATE.
@ 2021-08-19 16:12 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2021-08-19 16:12 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Avoid trying to lock OLD/NEW in a rule with FOR UPDATE.

transformLockingClause neglected to exclude the pseudo-RTEs for
OLD/NEW when processing a rule's query.  This led to odd errors
or even crashes later on.  This bug is very ancient, but it's
not terribly surprising that nobody noticed, since the use-case
for SELECT FOR UPDATE in a non-view rule is somewhere between
thin and non-existent.  Still, crashing is not OK.

Per bug #17151 from Zhiyong Wu.  Thanks to Masahiko Sawada
for analysis of the problem.

Discussion: https://postgr.es/m/17151-c03a3e6e4ec9aadb@postgresql.org

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/fbc1eed8a8dd3178de70de53a0e95786c80f9dbc

Modified Files
--------------
src/backend/parser/analyze.c        | 19 +++++++++++++++++--
src/include/nodes/parsenodes.h      |  8 ++++----
src/test/regress/expected/rules.out | 25 +++++++++++++++++++++++++
src/test/regress/sql/rules.sql      | 14 ++++++++++++++
4 files changed, 60 insertions(+), 6 deletions(-)



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

* pgsql: Avoid trying to lock OLD/NEW in a rule with FOR UPDATE.
@ 2021-08-19 16:12 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2021-08-19 16:12 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Avoid trying to lock OLD/NEW in a rule with FOR UPDATE.

transformLockingClause neglected to exclude the pseudo-RTEs for
OLD/NEW when processing a rule's query.  This led to odd errors
or even crashes later on.  This bug is very ancient, but it's
not terribly surprising that nobody noticed, since the use-case
for SELECT FOR UPDATE in a non-view rule is somewhere between
thin and non-existent.  Still, crashing is not OK.

Per bug #17151 from Zhiyong Wu.  Thanks to Masahiko Sawada
for analysis of the problem.

Discussion: https://postgr.es/m/17151-c03a3e6e4ec9aadb@postgresql.org

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/2739a281060f0da5c71fd6601b00c95970de1e80

Modified Files
--------------
src/backend/parser/analyze.c        | 19 +++++++++++++++++--
src/include/nodes/parsenodes.h      |  8 ++++----
src/test/regress/expected/rules.out | 25 +++++++++++++++++++++++++
src/test/regress/sql/rules.sql      | 14 ++++++++++++++
4 files changed, 60 insertions(+), 6 deletions(-)



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

* pgsql: Avoid trying to lock OLD/NEW in a rule with FOR UPDATE.
@ 2021-08-19 16:12 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2021-08-19 16:12 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Avoid trying to lock OLD/NEW in a rule with FOR UPDATE.

transformLockingClause neglected to exclude the pseudo-RTEs for
OLD/NEW when processing a rule's query.  This led to odd errors
or even crashes later on.  This bug is very ancient, but it's
not terribly surprising that nobody noticed, since the use-case
for SELECT FOR UPDATE in a non-view rule is somewhere between
thin and non-existent.  Still, crashing is not OK.

Per bug #17151 from Zhiyong Wu.  Thanks to Masahiko Sawada
for analysis of the problem.

Discussion: https://postgr.es/m/17151-c03a3e6e4ec9aadb@postgresql.org

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/cc7fae5c2d9effad8a907ffacb4190aca136f87b

Modified Files
--------------
src/backend/parser/analyze.c        | 19 +++++++++++++++++--
src/include/nodes/parsenodes.h      |  8 ++++----
src/test/regress/expected/rules.out | 25 +++++++++++++++++++++++++
src/test/regress/sql/rules.sql      | 14 ++++++++++++++
4 files changed, 60 insertions(+), 6 deletions(-)



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


end of thread, other threads:[~2021-08-19 16:12 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-08-19 16:12 pgsql: Avoid trying to lock OLD/NEW in a rule with FOR UPDATE. Tom Lane <tgl@sss.pgh.pa.us>
2021-08-19 16:12 pgsql: Avoid trying to lock OLD/NEW in a rule with FOR UPDATE. Tom Lane <tgl@sss.pgh.pa.us>
2021-08-19 16:12 pgsql: Avoid trying to lock OLD/NEW in a rule with FOR UPDATE. Tom Lane <tgl@sss.pgh.pa.us>
2021-08-19 16:12 pgsql: Avoid trying to lock OLD/NEW in a rule with FOR UPDATE. Tom Lane <tgl@sss.pgh.pa.us>
2021-08-19 16:12 pgsql: Avoid trying to lock OLD/NEW in a rule with FOR UPDATE. Tom Lane <tgl@sss.pgh.pa.us>
2021-08-19 16:12 pgsql: Avoid trying to lock OLD/NEW in a rule with FOR UPDATE. Tom Lane <tgl@sss.pgh.pa.us>
2021-08-19 16:12 pgsql: Avoid trying to lock OLD/NEW in a rule with FOR UPDATE. 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