1

I'm dealing with an older PostgreSQL database running on version 9.2.15. I aim to upgrade it to the latest version 16.1 without losing data if possible. Should I perform incremental updates to major versions in between ? If so, which specific versions should I consider in the process ?

Any feedback would be appreciated. Thanks.

6
  • How large is the database? There's a huge difference for available options on 10MiB, 10GiB or 10TiB databases. Commented Jan 22, 2024 at 10:36
  • You can directly upgrade from 9.2 to v16. Commented Jan 22, 2024 at 10:54
  • The database is pretty large, it has about 17GiB Commented Jan 22, 2024 at 11:16
  • 2
    That's small enough to fit on a £5 USB stick. Install postgresql 16 (assuming your system easily supports two simultaneous installations), and use it's pg_dump and pg_restore to move your database(s) over. Test things out before deleting the v9. Commented Jan 22, 2024 at 11:53
  • 2
    There are a lot of differences between 9.2 and 16, for instance plpython2u is no longer supported. I would go through the release notes for the first release of each version to see what the breaking changes are starting with 9.3. Commented Jan 22, 2024 at 16:23

1 Answer 1

0

I'm in the same process. Have a look at this document, it's specific for OpenACS, but the problems should be the same everywhere.

There are several incompatibilities, so your application might fail on PG16. You need to fix these first. Later the actual upgrade should be just a pg_dump followed by a psql -f dump.sql.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.