pgdumplib icon indicating copy to clipboard operation
pgdumplib copied to clipboard

Loading & saving dump file produced invalid dump file

Open whtsky opened this issue 4 years ago • 2 comments

the dump is obtained using

pg_dump -Fc -d balisong -t django_migrations > out

out.zip

>>> pg_restore -d tmp --clean out
(works)

But pgdumplib will produce an invalid dump file:

import pgdumplib
pgdumplib.load('out').save('outd')
>>> pg_restore -d tmp --clean outd
pg_restore: while PROCESSING TOC:
pg_restore: from TOC entry 317; 1259 7739671 SEQUENCE django_migrations_id_seq balisong
pg_restore: error: could not set default_table_access_method: ERROR:  zero-length delimited identifier at or near """"
LINE 1: SET default_table_access_method = "";

whtsky avatar Jan 22 '21 08:01 whtsky

What version of Postgres and pg_dump/pg_restore?

gmr avatar Mar 18 '21 21:03 gmr

>> pg_dump --version
pg_dump (PostgreSQL) 13.1
>> postgres --version
postgres (PostgreSQL) 13.1

whtsky avatar Mar 19 '21 03:03 whtsky