postgresql/src/bin
Álvaro Herrera 07da2985d6
pg_upgrade: check for inconsistencies in not-null constraints w/inheritance
With tables defined like this,
  CREATE TABLE ip (id int PRIMARY KEY);
  CREATE TABLE ic (id int) INHERITS (ip);
  ALTER TABLE ic ALTER id DROP NOT NULL;

pg_upgrade fails during the schema restore phase due to this error:
  ERROR: column "id" in child table must be marked NOT NULL

This can only be fixed by marking the child column as NOT NULL before
the upgrade, which could take an arbitrary amount of time (because ic's
data must be scanned).  Have pg_upgrade's check mode warn if that
condition is found, so that users know what to adjust before running the
upgrade for real.

Author: Ali Akbar <the.apaan@gmail.com>
Reviewed-by: Justin Pryzby <pryzby@telsasoft.com>
Backpatch-through: 13
Discussion: https://postgr.es/m/CACQjQLoMsE+1pyLe98pi0KvPG2jQQ94LWJ+PTiLgVRK4B=i_jg@mail.gmail.com
2025-07-04 18:05:43 +02:00
..
initdb Run pgperltidy 2025-06-29 21:14:21 -04:00
pg_amcheck Translation updates 2025-05-05 12:04:49 +02:00
pg_archivecleanup Translation updates 2025-05-05 12:04:49 +02:00
pg_basebackup Run pgperltidy 2025-06-29 21:14:21 -04:00
pg_checksums Translation updates 2025-05-05 12:04:49 +02:00
pg_combinebackup Run pgperltidy 2025-06-29 21:14:21 -04:00
pg_config Translation updates 2025-05-05 12:04:49 +02:00
pg_controldata Translation updates 2025-05-05 12:04:49 +02:00
pg_ctl Translation updates 2025-05-05 12:04:49 +02:00
pg_dump Run pgperltidy 2025-06-29 21:14:21 -04:00
pg_resetwal Translation updates 2025-05-05 12:04:49 +02:00
pg_rewind Run pgperltidy 2025-06-29 21:14:21 -04:00
pg_test_fsync Translation updates 2025-05-05 12:04:49 +02:00
pg_test_timing Translation updates 2025-05-05 12:04:49 +02:00
pg_upgrade pg_upgrade: check for inconsistencies in not-null constraints w/inheritance 2025-07-04 18:05:43 +02:00
pg_verifybackup Fix bug in archive streamer with LZ4 decompression 2025-07-02 13:48:41 +09:00
pg_waldump Translation updates 2025-05-05 12:04:49 +02:00
pg_walsummary Translation updates 2025-05-05 12:04:49 +02:00
pgbench pgbench: Make set_random_seed() 64-bit everywhere. 2025-03-29 15:24:42 +01:00
pgevent Update copyright for 2025 2025-01-01 11:21:55 -05:00
psql psql: Rename meta-command \close to \close_prepared 2025-06-24 13:12:46 +09:00
scripts Run pgperltidy 2025-06-29 21:14:21 -04:00
Makefile Update copyright for 2025 2025-01-01 11:21:55 -05:00
meson.build Update copyright for 2025 2025-01-01 11:21:55 -05:00