pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: exclusion@gmail.com
Subject: BUG #16346: pg_upgrade fails on a trigger with a comment
Date: Mon, 06 Apr 2020 15:00:00 +0000
Message-ID: <16346-6210ad7a0ea81be1@postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      16346
Logged by:          Alexander Lakhin
Email address:      exclusion@gmail.com
PostgreSQL version: 12.2
Operating system:   Ubuntu 18.04
Description:        

When using pg_upgrade on a database with the following contents:
CREATE FUNCTION public.test_event_trigger() RETURNS event_trigger
    LANGUAGE plpgsql
    AS $$
BEGIN
    RAISE NOTICE 'test_event_trigger: % %', tg_event, tg_tag;
END
$$;

CREATE EVENT TRIGGER regress_event_trigger3 ON ddl_command_start
   EXECUTE PROCEDURE public.test_event_trigger();

COMMENT ON EVENT TRIGGER regress_event_trigger3 IS 'test comment';

I get:
Restoring global objects in the new cluster                 ok
Restoring database schemas in the new cluster
  postgres                                                  
*failure*

Consult the last few lines of "pg_upgrade_dump_14174.log" for
the probable cause of the failure.
Failure, exiting

pg_upgrade_dump_14174.log contains:
command: "/src/postgres/tmp_install/usr/local/pgsql/bin/pg_restore" --host
/src/postgres --port 50432 --username postgres --clean --create
--exit-on-error --verbose --dbname template1 "pg_upgrade_dump_14174.custom"
>> "pg_upgrade_dump_14174.log" 2>&1
pg_restore: connecting to database for restore
pg_restore: dropping DATABASE PROPERTIES postgres
pg_restore: dropping DATABASE postgres
pg_restore: creating DATABASE "postgres"
pg_restore: connecting to new database "postgres"
pg_restore: connecting to database "postgres" as user "postgres"
pg_restore: creating COMMENT "DATABASE "postgres""
pg_restore: creating DATABASE PROPERTIES "postgres"
pg_restore: connecting to new database "postgres"
pg_restore: connecting to database "postgres" as user "postgres"
pg_restore: creating pg_largeobject "pg_largeobject"
pg_restore: creating FUNCTION "public.test_event_trigger()"
pg_restore: creating COMMENT "EVENT TRIGGER "regress_event_trigger3""
pg_restore: while PROCESSING TOC:
pg_restore: from TOC entry 3705; 0 0 COMMENT EVENT TRIGGER
"regress_event_trigger3" postgres
pg_restore: error: could not execute query: ERROR:  event trigger
"regress_event_trigger3" does not exist
Command was: COMMENT ON EVENT TRIGGER "regress_event_trigger3" IS 'test
comment';

It looks like the commit 4c40b27b broke this.



view thread (4+ messages)  latest in thread

Message-ID: <16346-6210ad7a0ea81be1@postgresql.org>
Permalink:  ../16346-6210ad7a0ea81be1@postgresql.org/
Also on:    postgresql.org/message-id/16346-6210ad7a0ea81be1@postgresql.org

 · 

reply

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-bugs@postgresql.org
  Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, exclusion@gmail.com
  Subject: Re: BUG #16346: pg_upgrade fails on a trigger with a comment
  In-Reply-To: <16346-6210ad7a0ea81be1@postgresql.org>

* 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