pg_extension_config_dump() with a sequence - Mailing list pgsql-general

From Moshe Jacobson
Subject pg_extension_config_dump() with a sequence
Date
Msg-id CAJ4CxLk2c8vGdPR2NP9MUQmL0uN9ViHJ_oxzzok+9YMKqtO_Yw@mail.gmail.com
Whole thread Raw
Responses Re: pg_extension_config_dump() with a sequence  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
I wrote an extension and marked one of the tables it creates as a config table using pg_extension_config_dump(). This caused the data to be dumped and restored correctly, but the sequence attached to the PK column was not correctly set to its old value.

In searching for a solution I found an old message where Tom suggested marking the sequence as a config table in the same way. This seems to work OK when I use pg_dump, but for some reason, pg_dumpall generates the following error:

pg_dump: SQL command failed
pg_dump: Error message from server: ERROR:  cannot copy from sequence "sq_pk_audit_data_type"
pg_dump: The command was: COPY auditlog.sq_pk_audit_data_type  TO stdout;
pg_dumpall: pg_dump failed on database "ises", exiting

Why does it work with pg_dump but not pg_dumpall?

--
Moshe Jacobson
Nead Werx, Inc. | Manager of Systems Engineering
2323 Cumberland Parkway, Suite 201 | Atlanta, GA 30339
moshe@neadwerx.com | 
www.neadwerx.com

"Quality is not an act, it is a habit." -- Aristotle

pgsql-general by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: Memory Issue with array_agg?
Next
From: Olivier Chaussavoine
Date:
Subject: Re: earthdistance