Search Postgresql Archives

Re: pg_restore unexpected end of file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9/7/23 23:29, Les wrote:
I'm trying to migrate a database from version 11 to version 15.

I have created a dump file on v11:

pg_dump --dbname=not_telling -Fc --no-owner > dump

--no-owner is ignored for non-text outputs. It is handled on the pg_restore end.


Then I was trying to import it on v15:

pg_restore -v --dbname=not_telling --no-user /restore/dump

I'm guessing it was actually --no-owner not --no-user?

pg_restore: error: could not read from input file: end of file

Are:

> dump

and

/restore/dump

pointing at the same thing?

Was the dump file transferred from one location to another?

If so how?

Is the custom dump format of v11 compatible with v15?

Yes it is.

https://www.postgresql.org/docs/current/app-pgdump.html

"Because pg_dump is used to transfer data to newer versions of PostgreSQL, the output of pg_dump can be expected to load into PostgreSQL server versions newer than pg_dump's version. pg_dump can also dump from PostgreSQL servers older than its own version. (Currently, servers back to version 9.2 are supported.) However, pg_dump cannot dump from PostgreSQL servers newer than its own major version; it will refuse to even try, rather than risk making an invalid dump. Also, it is not guaranteed that pg_dump's output can be loaded into a server of an older major version — not even if the dump was taken from a server of that version. Loading a dump file into an older server may require manual editing of the dump file to remove syntax not understood by the older server. Use of the --quote-all-identifiers option is recommended in cross-version cases, as it can prevent problems arising from varying reserved-word lists in different PostgreSQL versions."


Thank you,

    Laszlo


--
Adrian Klaver
adrian.klaver@xxxxxxxxxxx






[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux