Skip to content

Latest commit

 

History

History
108 lines (72 loc) · 2.43 KB

updating-postgres.md

File metadata and controls

108 lines (72 loc) · 2.43 KB

Updating Postgres

Minor Versions

When upgrading to a new minor version of Postgres, please follow these steps:

Example: 15.4 is the new minor version to upgrade to from 15.3.

  1. Clone the Neon Postgres repository if you have not done so already.

    git clone [email protected]:neondatabase/postgres.git
  2. Add the Postgres upstream remote.

    git remote add upstream https://git.postgresql.org/git/postgresql.git
  3. Create a new branch based on the stable branch you are updating.

    git checkout -b my-branch REL_15_STABLE_neon
  4. Tag the last commit on the stable branch you are updating.

    git tag REL_15_3_neon
  5. Push the new tag to the Neon Postgres repository.

    git push origin REL_15_3_neon
  6. Find the release tags you're looking for. They are of the form REL_X_Y.

  7. Rebase the branch you created on the tag and resolve any conflicts.

    git fetch upstream REL_15_4
    git rebase REL_15_4
  8. Run the Postgres test suite to make sure our commits have not affected Postgres in a negative way.

    make check
    # OR
    meson test -C builddir
  9. Push your branch to the Neon Postgres repository.

    git push origin my-branch
  10. Clone the Neon repository if you have not done so already.

    git clone [email protected]:neondatabase/neon.git
  11. Create a new branch.

  12. Change the revisions.json file to point at the HEAD of your Postgres branch.

  13. Update the Git submodule.

    git submodule set-branch --branch my-branch vendor/postgres-v15
    git submodule update --remote vendor/postgres-v15
  14. Run the Neon test suite to make sure that Neon is still good to go on this minor Postgres release.

    ./scripts/poetry -k pg15
  15. Commit your changes.

  16. Create a pull request, and wait for CI to go green.

  17. Force push the rebased Postgres branches into the Neon Postgres repository.

    git push --force origin my-branch:REL_15_STABLE_neon

    It may require disabling various branch protections.

  18. Update your Neon PR to point at the branches.

    git submodule set-branch --branch REL_15_STABLE_neon vendor/postgres-v15
    git commit --amend --no-edit
    git push --force origin
  19. Merge the pull request after getting approval(s) and CI completion.