pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedpg_dump not dropping event trigger
5+ messages / 3 participants
[nested] [flat]
* pg_dump not dropping event trigger
@ 2017-07-22 19:11 Greg Atkins <void.is.meaning@gmail.com>
0 siblings, 1 reply; 5+ messages in thread
From: Greg Atkins @ 2017-07-22 19:11 UTC (permalink / raw)
To: pgsql-general
I have a DB with an event trigger, which I am dumping with
pg_dump -Fc --no-acl --no-owner [db_name] > [dump_file]
In my dump file, I can't find any DROP EVENT TRIGGER statement.
In src/bin/pg_dump/pg_dump.c, dumpEventTrigger() calls ArchiveEntry() with a "" argument for the dropStmt parameter. Is it intended to create an entry with no DROP statement?
To be more precise, my scenario is the following:
* I wish to backup & restore a DB which contains an event trigger
* I can't drop the DB and re-create it before restoring
* I can't have CREATE EVENT TRIGGER throw errors about the trigger already existing
What is the recommended procedure?
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: pg_dump not dropping event trigger
@ 2017-07-22 23:00 Tom Lane <tgl@sss.pgh.pa.us>
parent: Greg Atkins <void.is.meaning@gmail.com>
0 siblings, 1 reply; 5+ messages in thread
From: Tom Lane @ 2017-07-22 23:00 UTC (permalink / raw)
To: Greg Atkins <void.is.meaning@gmail.com>; +Cc: pgsql-general
Greg Atkins <void.is.meaning@gmail.com> writes:
> I have a DB with an event trigger, which I am dumping with
> pg_dump -Fc --no-acl --no-owner [db_name] > [dump_file]
> In my dump file, I can't find any DROP EVENT TRIGGER statement.
Well, you wouldn't, for lack of -c ... but yes, it seems you don't
get a DROP EVENT TRIGGER even with that. Will fix.
regards, tom lane
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: pg_dump not dropping event trigger
@ 2017-07-23 06:59 Greg Atkins <void.is.meaning@gmail.com>
parent: Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 5+ messages in thread
From: Greg Atkins @ 2017-07-23 06:59 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-general
Tom,
would you like a bug report to track this?
On Sat, Jul 22, 2017 at 07:00:03PM -0400, Tom Lane wrote:
> Greg Atkins <void.is.meaning@gmail.com> writes:
> > I have a DB with an event trigger, which I am dumping with
> > pg_dump -Fc --no-acl --no-owner [db_name] > [dump_file]
>
> > In my dump file, I can't find any DROP EVENT TRIGGER statement.
>
> Well, you wouldn't, for lack of -c ... but yes, it seems you don't
> get a DROP EVENT TRIGGER even with that. Will fix.
>
> regards, tom lane
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: pg_dump not dropping event trigger
@ 2017-07-23 15:48 Tom Lane <tgl@sss.pgh.pa.us>
parent: Greg Atkins <void.is.meaning@gmail.com>
0 siblings, 1 reply; 5+ messages in thread
From: Tom Lane @ 2017-07-23 15:48 UTC (permalink / raw)
To: Greg Atkins <void.is.meaning@gmail.com>; +Cc: pgsql-general
Greg Atkins <void.is.meaning@gmail.com> writes:
> would you like a bug report to track this?
No, it's already dealt with. In any case, your original email was good
enough --- we track bugs these days more by message-ID than anything else.
regards, tom lane
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: pg_dump not dropping event trigger
@ 2017-07-23 17:38 Michael Paquier <michael.paquier@gmail.com>
parent: Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 5+ messages in thread
From: Michael Paquier @ 2017-07-23 17:38 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Greg Atkins <void.is.meaning@gmail.com>; pgsql-general
On Sun, Jul 23, 2017 at 5:48 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Greg Atkins <void.is.meaning@gmail.com> writes:
>> would you like a bug report to track this?
>
> No, it's already dealt with. In any case, your original email was good
> enough --- we track bugs these days more by message-ID than anything else.
This has been fixed by the following commit, which will be present in
the next round of minor releases planned for the second week of August
(https://www.postgresql.org/developer/roadmap/):
https://git.postgresql.org/pg/commitdiff/93f039b4944fdf806f029ed46cf192bc9021d8e7
--
Michael
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2017-07-23 17:38 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-07-22 19:11 pg_dump not dropping event trigger Greg Atkins <void.is.meaning@gmail.com>
2017-07-22 23:00 ` Tom Lane <tgl@sss.pgh.pa.us>
2017-07-23 06:59 ` Greg Atkins <void.is.meaning@gmail.com>
2017-07-23 15:48 ` Tom Lane <tgl@sss.pgh.pa.us>
2017-07-23 17:38 ` Michael Paquier <michael.paquier@gmail.com>
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