Thread: pg_dump dumps EVENT TRIGGER owned by extension
PostgreSQL 9.3.2
Moshe Jacobson
I created an extension that owns an event trigger.
When I dump the database, it puts the event trigger into the dump output even though it's owned by the extension.
When I restore the database, the extension creates the event trigger and the restore causes errors because the event trigger already exists.
Is this a bug?
Moshe Jacobson
Manager of Systems Engineering, Nead Werx Inc.
2323 Cumberland Parkway · Suite 201 · Atlanta, GA 30339
"Quality is not an act, it is a habit." -- Aristotle
"Quality is not an act, it is a habit." -- Aristotle
Moshe Jacobson <moshe@neadwerx.com> writes: > PostgreSQL 9.3.2 > I created an extension that owns an event trigger. > When I dump the database, it puts the event trigger into the dump output > even though it's owned by the extension. > When I restore the database, the extension creates the event trigger and > the restore causes errors because the event trigger already exists. > Is this a bug? Yup. regards, tom lane
Moshe Jacobson <moshe@neadwerx.com> writes: > PostgreSQL 9.3.2 > I created an extension that owns an event trigger. > When I dump the database, it puts the event trigger into the dump output > even though it's owned by the extension. > When I restore the database, the extension creates the event trigger and > the restore causes errors because the event trigger already exists. > Is this a bug? Actually, there seem to be two distinct bugs: CREATE EVENT TRIGGER forgets to mark the event trigger as a member of its extension, and pg_dump doesn't pay any attention anyway when deciding whether to dump the event trigger. I've committed fixes for these, but if you have an existing extension that should have an event trigger as member, you'll need to use ALTER EXTENSION ADD EVENT TRIGGER to clean up the mess. regards, tom lane
On Mon, Dec 30, 2013 at 2:02 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
there seem to be two distinct bugs: CREATE EVENT TRIGGER forgets
to mark the event trigger as a member of its extension, and pg_dump
doesn't pay any attention anyway when deciding whether to dump the event
trigger. I've committed fixes for these, but if you have an existing
extension that should have an event trigger as member, you'll need to use
ALTER EXTENSION ADD EVENT TRIGGER to clean up the mess.
Thank you, Tom.
Moshe Jacobson
Manager of Systems Engineering, Nead Werx Inc.
2323 Cumberland Parkway · Suite 201 · Atlanta, GA 30339
"Quality is not an act, it is a habit." -- Aristotle
"Quality is not an act, it is a habit." -- Aristotle
Will these fixes appear in 9.3.3?
Thanks.
Moshe Jacobson
Moshe Jacobson
Manager of Systems Engineering, Nead Werx Inc.
2323 Cumberland Parkway · Suite 201 · Atlanta, GA 30339
"Quality is not an act, it is a habit." -- Aristotle
"Quality is not an act, it is a habit." -- Aristotle
On Tue, Dec 31, 2013 at 5:33 AM, Moshe Jacobson <moshe@neadwerx.com> wrote: > > On Mon, Dec 30, 2013 at 2:02 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote: >> >> I've committed fixes for these > > > Will these fixes appear in 9.3.3? Yes. -- Michael