I took a backup of the Postgres database version 15, and now I want to restore that data to Postgres version 13.1.2? is it possible?

  • What command line did you use?
    – jjanes
    Sep 19, 2023 at 14:49

1 Answer 1


It is not supported to downgrade PostgreSQL, no matter what.

The only way to success is the following cumbersome route:

  • Take a plain-format dump with

    pg_dump -f dump.sql dbname

    You need to use pg_dump from version 15 for that

  • Try to restore the dump to version 13 using psql. That will fail. Look at the error messages and edit dump.sql, manually changing the SQL syntax to avoid the error. Then try to restore again, and so on until all errors are gone.

I hope 13.1.2 is a typo, and you mean 13.12.

  • Thanks! Yes, 13.1.2 was indeed a typo Sep 21, 2023 at 12:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.