pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix ALTER TABLE .. ADD COLUMN with complex inheritance trees
6+ messages / 1 participants
[nested] [flat]

* pgsql: Fix ALTER TABLE .. ADD COLUMN with complex inheritance trees
@ 2024-01-24 05:24 Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 6+ messages in thread

From: Michael Paquier @ 2024-01-24 05:24 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix ALTER TABLE .. ADD COLUMN with complex inheritance trees

This command, when used to add a column on a parent table with a complex
inheritance tree, tried to update multiple times the same tuple in
pg_attribute for a child table when incrementing attinhcount, causing
failures with "tuple already updated by self" because of a missing
CommandCounterIncrement() between two updates.

This exists for a rather long time, so backpatch all the way down.

Reported-by: Alexander Lakhin
Author: Tender Wang
Reviewed-by: Richard Guo
Discussion: https://postgr.es/m/18297-b04cd83a55b51e35@postgresql.org
Backpatch-through: 12

Branch
------
master

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

Modified Files
--------------
src/backend/commands/tablecmds.c      |  4 ++++
src/test/regress/expected/inherit.out | 17 +++++++++++++++++
src/test/regress/sql/inherit.sql      |  9 +++++++++
3 files changed, 30 insertions(+)



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

* pgsql: Fix ALTER TABLE .. ADD COLUMN with complex inheritance trees
@ 2024-01-24 05:24 Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 6+ messages in thread

From: Michael Paquier @ 2024-01-24 05:24 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix ALTER TABLE .. ADD COLUMN with complex inheritance trees

This command, when used to add a column on a parent table with a complex
inheritance tree, tried to update multiple times the same tuple in
pg_attribute for a child table when incrementing attinhcount, causing
failures with "tuple already updated by self" because of a missing
CommandCounterIncrement() between two updates.

This exists for a rather long time, so backpatch all the way down.

Reported-by: Alexander Lakhin
Author: Tender Wang
Reviewed-by: Richard Guo
Discussion: https://postgr.es/m/18297-b04cd83a55b51e35@postgresql.org
Backpatch-through: 12

Branch
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/51193e7a7d333e2f19048c97a336da436b7d97e9

Modified Files
--------------
src/backend/commands/tablecmds.c      |  4 ++++
src/test/regress/expected/inherit.out | 17 +++++++++++++++++
src/test/regress/sql/inherit.sql      |  9 +++++++++
3 files changed, 30 insertions(+)



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

* pgsql: Fix ALTER TABLE .. ADD COLUMN with complex inheritance trees
@ 2024-01-24 05:24 Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 6+ messages in thread

From: Michael Paquier @ 2024-01-24 05:24 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix ALTER TABLE .. ADD COLUMN with complex inheritance trees

This command, when used to add a column on a parent table with a complex
inheritance tree, tried to update multiple times the same tuple in
pg_attribute for a child table when incrementing attinhcount, causing
failures with "tuple already updated by self" because of a missing
CommandCounterIncrement() between two updates.

This exists for a rather long time, so backpatch all the way down.

Reported-by: Alexander Lakhin
Author: Tender Wang
Reviewed-by: Richard Guo
Discussion: https://postgr.es/m/18297-b04cd83a55b51e35@postgresql.org
Backpatch-through: 12

Branch
------
REL_15_STABLE

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

Modified Files
--------------
src/backend/commands/tablecmds.c      |  4 ++++
src/test/regress/expected/inherit.out | 17 +++++++++++++++++
src/test/regress/sql/inherit.sql      |  9 +++++++++
3 files changed, 30 insertions(+)



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

* pgsql: Fix ALTER TABLE .. ADD COLUMN with complex inheritance trees
@ 2024-01-24 05:24 Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 6+ messages in thread

From: Michael Paquier @ 2024-01-24 05:24 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix ALTER TABLE .. ADD COLUMN with complex inheritance trees

This command, when used to add a column on a parent table with a complex
inheritance tree, tried to update multiple times the same tuple in
pg_attribute for a child table when incrementing attinhcount, causing
failures with "tuple already updated by self" because of a missing
CommandCounterIncrement() between two updates.

This exists for a rather long time, so backpatch all the way down.

Reported-by: Alexander Lakhin
Author: Tender Wang
Reviewed-by: Richard Guo
Discussion: https://postgr.es/m/18297-b04cd83a55b51e35@postgresql.org
Backpatch-through: 12

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/5a7833f49679a3e8a17df453911b0adacea6273d

Modified Files
--------------
src/backend/commands/tablecmds.c      |  4 ++++
src/test/regress/expected/inherit.out | 17 +++++++++++++++++
src/test/regress/sql/inherit.sql      |  9 +++++++++
3 files changed, 30 insertions(+)



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

* pgsql: Fix ALTER TABLE .. ADD COLUMN with complex inheritance trees
@ 2024-01-24 05:24 Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 6+ messages in thread

From: Michael Paquier @ 2024-01-24 05:24 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix ALTER TABLE .. ADD COLUMN with complex inheritance trees

This command, when used to add a column on a parent table with a complex
inheritance tree, tried to update multiple times the same tuple in
pg_attribute for a child table when incrementing attinhcount, causing
failures with "tuple already updated by self" because of a missing
CommandCounterIncrement() between two updates.

This exists for a rather long time, so backpatch all the way down.

Reported-by: Alexander Lakhin
Author: Tender Wang
Reviewed-by: Richard Guo
Discussion: https://postgr.es/m/18297-b04cd83a55b51e35@postgresql.org
Backpatch-through: 12

Branch
------
REL_13_STABLE

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

Modified Files
--------------
src/backend/commands/tablecmds.c      |  4 ++++
src/test/regress/expected/inherit.out | 17 +++++++++++++++++
src/test/regress/sql/inherit.sql      |  9 +++++++++
3 files changed, 30 insertions(+)



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

* pgsql: Fix ALTER TABLE .. ADD COLUMN with complex inheritance trees
@ 2024-01-24 05:24 Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 6+ messages in thread

From: Michael Paquier @ 2024-01-24 05:24 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix ALTER TABLE .. ADD COLUMN with complex inheritance trees

This command, when used to add a column on a parent table with a complex
inheritance tree, tried to update multiple times the same tuple in
pg_attribute for a child table when incrementing attinhcount, causing
failures with "tuple already updated by self" because of a missing
CommandCounterIncrement() between two updates.

This exists for a rather long time, so backpatch all the way down.

Reported-by: Alexander Lakhin
Author: Tender Wang
Reviewed-by: Richard Guo
Discussion: https://postgr.es/m/18297-b04cd83a55b51e35@postgresql.org
Backpatch-through: 12

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/2f724283719e75261d3b649d20235e4f1542be04

Modified Files
--------------
src/backend/commands/tablecmds.c      |  4 ++++
src/test/regress/expected/inherit.out | 17 +++++++++++++++++
src/test/regress/sql/inherit.sql      |  9 +++++++++
3 files changed, 30 insertions(+)



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


end of thread, other threads:[~2024-01-24 05:24 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-01-24 05:24 pgsql: Fix ALTER TABLE .. ADD COLUMN with complex inheritance trees Michael Paquier <michael@paquier.xyz>
2024-01-24 05:24 pgsql: Fix ALTER TABLE .. ADD COLUMN with complex inheritance trees Michael Paquier <michael@paquier.xyz>
2024-01-24 05:24 pgsql: Fix ALTER TABLE .. ADD COLUMN with complex inheritance trees Michael Paquier <michael@paquier.xyz>
2024-01-24 05:24 pgsql: Fix ALTER TABLE .. ADD COLUMN with complex inheritance trees Michael Paquier <michael@paquier.xyz>
2024-01-24 05:24 pgsql: Fix ALTER TABLE .. ADD COLUMN with complex inheritance trees Michael Paquier <michael@paquier.xyz>
2024-01-24 05:24 pgsql: Fix ALTER TABLE .. ADD COLUMN with complex inheritance trees 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