pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Make constraint rename issue relcache invalidation on target rel
6+ messages / 1 participants
[nested] [flat]

* pgsql: Make constraint rename issue relcache invalidation on target rel
@ 2018-12-17 01:38 Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 6+ messages in thread

From: Michael Paquier @ 2018-12-17 01:38 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Make constraint rename issue relcache invalidation on target relation

When a constraint gets renamed, it may have associated with it a target
relation (for example domain constraints don't have one).  Not
invalidating the target relation cache when issuing the renaming can
result in issues with subsequent commands that refer to the old
constraint name using the relation cache, causing various failures.  One
pattern spotted was using CREATE TABLE LIKE after a constraint
renaming.

Reported-by: Stuart <sfbarbee@gmail.com>
Author: Amit Langote
Reviewed-by: Michael Paquier
Discussion: https://postgr.es/m/2047094.V130LYfLq4@station53.ousa.org

Branch
------
master

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

Modified Files
--------------
src/backend/commands/tablecmds.c          |  7 +++++++
src/test/regress/expected/alter_table.out | 22 ++++++++++++++++++++++
src/test/regress/sql/alter_table.sql      | 14 ++++++++++++++
3 files changed, 43 insertions(+)



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

* pgsql: Make constraint rename issue relcache invalidation on target rel
@ 2018-12-17 01:38 Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 6+ messages in thread

From: Michael Paquier @ 2018-12-17 01:38 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Make constraint rename issue relcache invalidation on target relation

When a constraint gets renamed, it may have associated with it a target
relation (for example domain constraints don't have one).  Not
invalidating the target relation cache when issuing the renaming can
result in issues with subsequent commands that refer to the old
constraint name using the relation cache, causing various failures.  One
pattern spotted was using CREATE TABLE LIKE after a constraint
renaming.

Reported-by: Stuart <sfbarbee@gmail.com>
Author: Amit Langote
Reviewed-by: Michael Paquier
Discussion: https://postgr.es/m/2047094.V130LYfLq4@station53.ousa.org

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/25b8094d33ac66773ba1418457cb74eb22b5d50a

Modified Files
--------------
src/backend/commands/tablecmds.c          |  7 +++++++
src/test/regress/expected/alter_table.out | 22 ++++++++++++++++++++++
src/test/regress/sql/alter_table.sql      | 14 ++++++++++++++
3 files changed, 43 insertions(+)



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

* pgsql: Make constraint rename issue relcache invalidation on target rel
@ 2018-12-17 01:38 Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 6+ messages in thread

From: Michael Paquier @ 2018-12-17 01:38 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Make constraint rename issue relcache invalidation on target relation

When a constraint gets renamed, it may have associated with it a target
relation (for example domain constraints don't have one).  Not
invalidating the target relation cache when issuing the renaming can
result in issues with subsequent commands that refer to the old
constraint name using the relation cache, causing various failures.  One
pattern spotted was using CREATE TABLE LIKE after a constraint
renaming.

Reported-by: Stuart <sfbarbee@gmail.com>
Author: Amit Langote
Reviewed-by: Michael Paquier
Discussion: https://postgr.es/m/2047094.V130LYfLq4@station53.ousa.org

Branch
------
REL_10_STABLE

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

Modified Files
--------------
src/backend/commands/tablecmds.c          |  7 +++++++
src/test/regress/expected/alter_table.out | 22 ++++++++++++++++++++++
src/test/regress/sql/alter_table.sql      | 14 ++++++++++++++
3 files changed, 43 insertions(+)



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

* pgsql: Make constraint rename issue relcache invalidation on target rel
@ 2018-12-17 01:38 Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 6+ messages in thread

From: Michael Paquier @ 2018-12-17 01:38 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Make constraint rename issue relcache invalidation on target relation

When a constraint gets renamed, it may have associated with it a target
relation (for example domain constraints don't have one).  Not
invalidating the target relation cache when issuing the renaming can
result in issues with subsequent commands that refer to the old
constraint name using the relation cache, causing various failures.  One
pattern spotted was using CREATE TABLE LIKE after a constraint
renaming.

Reported-by: Stuart <sfbarbee@gmail.com>
Author: Amit Langote
Reviewed-by: Michael Paquier
Discussion: https://postgr.es/m/2047094.V130LYfLq4@station53.ousa.org

Branch
------
REL9_6_STABLE

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

Modified Files
--------------
src/backend/commands/tablecmds.c          |  7 +++++++
src/test/regress/expected/alter_table.out | 22 ++++++++++++++++++++++
src/test/regress/sql/alter_table.sql      | 14 ++++++++++++++
3 files changed, 43 insertions(+)



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

* pgsql: Make constraint rename issue relcache invalidation on target rel
@ 2018-12-17 01:38 Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 6+ messages in thread

From: Michael Paquier @ 2018-12-17 01:38 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Make constraint rename issue relcache invalidation on target relation

When a constraint gets renamed, it may have associated with it a target
relation (for example domain constraints don't have one).  Not
invalidating the target relation cache when issuing the renaming can
result in issues with subsequent commands that refer to the old
constraint name using the relation cache, causing various failures.  One
pattern spotted was using CREATE TABLE LIKE after a constraint
renaming.

Reported-by: Stuart <sfbarbee@gmail.com>
Author: Amit Langote
Reviewed-by: Michael Paquier
Discussion: https://postgr.es/m/2047094.V130LYfLq4@station53.ousa.org

Branch
------
REL9_5_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/5812be7b63cfaf09d982a401ca8f72d150c0f721

Modified Files
--------------
src/backend/commands/tablecmds.c          |  7 +++++++
src/test/regress/expected/alter_table.out | 22 ++++++++++++++++++++++
src/test/regress/sql/alter_table.sql      | 14 ++++++++++++++
3 files changed, 43 insertions(+)



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

* pgsql: Make constraint rename issue relcache invalidation on target rel
@ 2018-12-17 01:38 Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 6+ messages in thread

From: Michael Paquier @ 2018-12-17 01:38 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Make constraint rename issue relcache invalidation on target relation

When a constraint gets renamed, it may have associated with it a target
relation (for example domain constraints don't have one).  Not
invalidating the target relation cache when issuing the renaming can
result in issues with subsequent commands that refer to the old
constraint name using the relation cache, causing various failures.  One
pattern spotted was using CREATE TABLE LIKE after a constraint
renaming.

Reported-by: Stuart <sfbarbee@gmail.com>
Author: Amit Langote
Reviewed-by: Michael Paquier
Discussion: https://postgr.es/m/2047094.V130LYfLq4@station53.ousa.org

Branch
------
REL9_4_STABLE

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

Modified Files
--------------
src/backend/commands/tablecmds.c          |  7 +++++++
src/test/regress/expected/alter_table.out | 22 ++++++++++++++++++++++
src/test/regress/sql/alter_table.sql      | 14 ++++++++++++++
3 files changed, 43 insertions(+)



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


end of thread, other threads:[~2018-12-17 01:38 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-12-17 01:38 pgsql: Make constraint rename issue relcache invalidation on target rel Michael Paquier <michael@paquier.xyz>
2018-12-17 01:38 pgsql: Make constraint rename issue relcache invalidation on target rel Michael Paquier <michael@paquier.xyz>
2018-12-17 01:38 pgsql: Make constraint rename issue relcache invalidation on target rel Michael Paquier <michael@paquier.xyz>
2018-12-17 01:38 pgsql: Make constraint rename issue relcache invalidation on target rel Michael Paquier <michael@paquier.xyz>
2018-12-17 01:38 pgsql: Make constraint rename issue relcache invalidation on target rel Michael Paquier <michael@paquier.xyz>
2018-12-17 01:38 pgsql: Make constraint rename issue relcache invalidation on target rel Michael Paquier <michael@paquier.xyz>

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