Skip to content

PG-2029 Meson support#531

Open
jeltz wants to merge 9 commits intopercona:mainfrom
jeltz:meson
Open

PG-2029 Meson support#531
jeltz wants to merge 9 commits intopercona:mainfrom
jeltz:meson

Conversation

@jeltz
Copy link
Copy Markdown
Collaborator

@jeltz jeltz commented Mar 15, 2026

Meson gives a more modern development experience while making some features easier to implement in the future. This Meson file calls pg_config directly to get the paths but does not get any of the compiler flags from pg_config.

This PR moves the CI to use Meson but since the build and QA teams need extra time to migrate to Meson we keep the makefile and add a new CI job which checks so we do not break it.

Please tell me if this PR is too big and should be split for ease of review.

Pros:

  • More modern development experience
  • Makes it easier for us if we want to set our own code style with own warnings
  • Parallel TAP tests
  • We can use basically the same code for C++ projects like pg_oidc_validator
  • Easier to add Windows support (maybe a downside 😨)

Cons:

  • We need to re-implement platform support ourselves in some cases since we no longer can use the Makefile.{plaform} files
  • Maybe we still need a simple makefile for PGXN compat, but that is not an issue for pg_tde but for our other extensions that is an issue

@jeltz jeltz force-pushed the meson branch 15 times, most recently from 8ddfd65 to 786f289 Compare March 16, 2026 08:10
@jeltz jeltz changed the title Expermintal Meson support PG-2029 Expermintal Meson support Mar 16, 2026
@jeltz jeltz force-pushed the meson branch 14 times, most recently from 04a1ef9 to a54e804 Compare March 19, 2026 09:13
@jeltz jeltz force-pushed the meson branch 8 times, most recently from b0a8a87 to 4b2b23b Compare March 30, 2026 21:34
@jeltz jeltz changed the title PG-2029 Experimental Meson support PG-2029 Meson support Mar 30, 2026
@jeltz jeltz force-pushed the meson branch 10 times, most recently from 280b942 to 475d264 Compare April 1, 2026 01:44
jeltz added 5 commits April 2, 2026 10:38
To give a more modern development expereince we plan to replace our
current make and PGXS based build system with one which uses Meson and
pg_config to achieve the same thing.

Potential advantages:

- More modern and pleasant expereince
- Parallel tests
- Allows for Windows support

Potential disadvantages:

- We may have to manually implement support for odd platforms
This is split out from the previous commit to amke the history easier to
read and the commits easier to review.
One of the weird things with the Meson tests for pg_tde is that they are
actually install tests so we need to manually run meson install before
running meson test.
One of the nice advantages of meson is that test can be run in parallel
which we now can take advantage of.
Based on Makefile.darwin in the PostgreSQL project.
jeltz added 4 commits April 2, 2026 11:50
Since we plan to only support Meson builds in the future let's move all
of our CI jobs over to using Meson. For simplicty we put the build
directory outside of the git repository. Also this apparently this fixed
a bug in our code formatting job for the frotnend tools so let's also
commit the changed formatting.

Disable the test timeout in meson since the default timeout is an issue
when running with sanitizers.
While we are moving our development builds and CI directly from make to
Meson our QA farm and packaging needs more time to migrate to Meson, so
to make sure our make file does not break we add a simple CI job which
builds pg_tde using make and then runs the test cases.
Now that we are using Meson it is even more annoying that some of our
TAP tests write to t/results. And to make it more useful we make sure to
output absolute paths on test failure so people easily can use diff.
The instructions are still wrong after this but I did some quick
corrections to even be able to update it for adding Meosn support.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants