Re: pgsql: Fix table rewrites that include a column without a default.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pgsql: Fix table rewrites that include a column without a default.
Дата
Msg-id 3328.1570740683@sss.pgh.pa.us
обсуждение исходный текст
Ответ на pgsql: Fix table rewrites that include a column without a default.  (Andres Freund <andres@anarazel.de>)
Ответы Re: pgsql: Fix table rewrites that include a column without adefault.
Список pgsql-committers
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%3A19

diff -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



В списке pgsql-committers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Put back pqsignal() as an exported libpq symbol.
Следующее
От: Andres Freund
Дата:
Сообщение: Re: pgsql: Fix table rewrites that include a column without adefault.