neon icon indicating copy to clipboard operation
neon copied to clipboard

Refactor build system to prepare for building multiple Postgres versions.

Open hlinnaka opened this issue 2 years ago • 3 comments

Rename "vendor/postgres" to "vendor/postgres-v14"

Change Postgres build and install directory paths to be version-specific:

  • tmp_install/build -> pg_install/build/14
  • tmp_install/* -> pg_install/14/*

And Makefile targets:

  • "make postgres" -> "make postgres-v14"
  • "make postgres-headers" -> "make postgres-v14-headers"
  • etc.

Add Makefile aliases:

  • "make postgres" to build "postgres-v14" and in future, "postgres-v15"
  • similarly for "make postgres-headers"

hlinnaka avatar Jul 26 '22 14:07 hlinnaka

@lubennikovaav, have you thought how we would build v14 and v15 side-by-side? I'm thinking something like this

hlinnaka avatar Jul 26 '22 14:07 hlinnaka

Here's what it will look like when we add v15 to it: https://github.com/neondatabase/neon/commit/ead121be1d92bbe9aa85b651ba50afebe71fd93b.

Lots of stuff remains to do, of course, like building postgres_ffi for both versions, refactoring code to isolate version-specific stuff to separate modules, carrying a postgres version number to all places that need it. But this is how the build scripts could look like.

hlinnaka avatar Jul 26 '22 14:07 hlinnaka

rebased

hlinnaka avatar Aug 11 '22 09:08 hlinnaka

This was obsoleted by PR #2337, closing.

hlinnaka avatar Sep 06 '22 10:09 hlinnaka