pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pg-migrator - pg_migrator: Handle Win32 MoveFile return value, per
2+ messages / 2 participants
[nested] [flat]

* pg-migrator - pg_migrator: Handle Win32 MoveFile return value, per
@ 2009-06-01 17:48 User Bmomjian <bmomjian@pgfoundry.org>
  0 siblings, 0 replies; 2+ messages in thread

From: bmomjian@pgfoundry.org @ 2009-06-01 17:48 UTC (permalink / raw)
  To: pgsql-committers

Log Message:
-----------
Handle Win32 MoveFile return value, per report from Hiroshi Saito

Modified Files:
--------------
    pg_migrator/src:
        file.c (r1.16 -> r1.17)
        (http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/pg-migrator/pg_migrator/src/file.c?r1=1.16&r2=1.17)
        pg_migrator.h (r1.40 -> r1.41)
        (http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/pg-migrator/pg_migrator/src/pg_migrator.h?r1=1.40&r2...)




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

* pgsql: Fix propagating attnotnull in multiple inheritance
@ 2024-04-15 10:46 Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Alvaro Herrera @ 2024-04-15 10:46 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix propagating attnotnull in multiple inheritance

In one of the many strange corner cases of multiple inheritance being
used, commit b0e96f311985 missed a CommandCounterIncrement() call after
updating the attnotnull flag during ALTER TABLE ADD COLUMN, which caused
a catalog tuple to be update attempted twice in the same command, giving
rise to a "tuple already updated by self" error.  Add the missing call
to solve that, and a test case that reproduces the scenario.

As a (perhaps surprising) secondary effect, this CCI addition triggers
another behavior change: when a primary key is added to a parent
partitioned table and the column in an existing partition does not have
a not-null constraint, we no longer error out.  This will probably be a
welcome change by some users, and I think it's unlikely that anybody
will miss the old behavior.

Reported-by: Alexander Lakhin <exclusion@gmail.com>
Discussion: http://postgr.es/m/045dec3f-9b3d-aa44-0c99-85f6992306c7@gmail.com

Branch
------
master

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

Modified Files
--------------
src/backend/commands/tablecmds.c          |  4 ++++
src/test/regress/expected/constraints.out | 10 +++++++++-
src/test/regress/expected/inherit.out     |  8 ++++++++
src/test/regress/sql/constraints.sql      |  7 +++++++
src/test/regress/sql/inherit.sql          |  7 +++++++
5 files changed, 35 insertions(+), 1 deletion(-)



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


end of thread, other threads:[~2024-04-15 10:46 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2009-06-01 17:48 pg-migrator - pg_migrator: Handle Win32 MoveFile return value, per User Bmomjian <bmomjian@pgfoundry.org>
2024-04-15 10:46 pgsql: Fix propagating attnotnull in multiple inheritance Alvaro Herrera <alvherre@alvh.no-ip.org>

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