From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Fix table rewrites that include a column without a default.
Date: Thu, 10 Oct 2019 16:51:23 -0400
Message-ID: <3328.1570740683@sss.pgh.pa.us> (raw)
In-Reply-To: <E1iIQrV-0005gk-1D@gemulon.postgresql.org>
References: <E1iIQrV-0005gk-1D@gemulon.postgresql.org>
Andres Freund <andres@anarazel.de> writes:
> Fix table rewrites that include a column without a default.
This patch added use of an event trigger in alter_table.sql.
As we have learned the hard way, it's not acceptable to create event
triggers in test scripts that run in parallel with anything else,
because they will intermittently screw up DDL happening in the
parallel scripts. As seen just now on clam:
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=clam&dt=2019-10-10%2020%3A16%3A19inline patch 1: /home/pgbfarm/buildroot/HEAD/pgsql.build/src/test/regress/results/plpgsql.out (+1/-0 lines) download inline-1.patchdiff -U3 /home/pgbfarm/buildroot/HEAD/pgsql.build/src/test/regress/expected/plpgsql.out /home/pgbfarm/buildroot/HEAD/pgsql.build/src/test/regress/results/plpgsql.out
--- /home/pgbfarm/buildroot/HEAD/pgsql.build/src/test/regress/expected/plpgsql.out 2019-05-09 09:00:10.653795677 +0100+++ /home/pgbfarm/buildroot/HEAD/pgsql.build/src/test/regress/results/plpgsql.out 2019-10-10 21:21:46.406007734 +0100@@ -5419,6 +5419,7 @@
-- now change 'name' to an integer to see what happens...
ALTER TABLE alter_table_under_transition_tables
ALTER COLUMN name TYPE int USING name::integer;
+WARNING: rewriting table alter_table_under_transition_tables
UPDATE alter_table_under_transition_tables
SET name = (name::text || name::text)::integer;
WARNING: old table = 1=11,2=22,3=33, new table = 1=1111,2=2222,3=3333
Do you *really* need an event trigger to test this?
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us, andres@anarazel.de, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Fix table rewrites that include a column without a default.
In-Reply-To: <3328.1570740683@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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