Skip to content

Postgres 15 support - #729

Merged
eeeebbbbrrrr merged 1 commit into
pgcentralfoundation:developfrom
syvb:sv/pg15
Oct 31, 2022
Merged

eeeebbbbrrrr merged 1 commit into
pgcentralfoundation:developfrom
syvb:sv/pg15

Conversation

@syvb

@syvb syvb commented Oct 3, 2022 •

Copy link
Copy Markdown
Contributor

Adds support for PostgreSQL 15.

Main changes:

  • Existing extension crates need to add a pg15 feature to indicate compatibility with PostgreSQL 15. cargo pgx new automatically adds the feature for new extensions.
  • pg_sys::String now exists, which conflicts with the std String when importing pg_sys::*
  • There is now a abi_extra field in the Pg_magic_func that is always "PostgreSQL", but might be different on PostgreSQL forks with an incompatible ABI
  • pg_sys::Value doesn't exist anymore

Comment thread pgx/src/lib.rs Outdated
@syvb
syvb force-pushed the sv/pg15 branch 2 times, most recently from 97053ed to 4315d27 Compare October 3, 2022 17:01
@workingjubilee

workingjubilee commented Oct 3, 2022 •

Copy link
Copy Markdown
Member

pg_sys::String now exists, which conflicts with the std String when importing pg_sys::*

use pg_sys::{String as PgString}; is an option for this case. A glob import of pgx-pg-sys is... not recommended, at least in user code. We may have to handle it here, of course...

@syvb
syvb force-pushed the sv/pg15 branch 3 times, most recently from acd72dc to 4840ad2 Compare October 12, 2022 19:42
@syvb

syvb commented Oct 14, 2022 •

Copy link
Copy Markdown
Contributor Author

PostgreSQL 15 is released! 🎉

I updated the PR so that it runs PostgreSQL 15 in CI now that APT packages are available. I've also removed the code that used the release candidate version so that it always uses the actual release now.

@eeeebbbbrrrr

Copy link
Copy Markdown
Contributor

PostgreSQL 15 is released! 🎉

I updated the PR so that it runs PostgreSQL 15 in CI now that APT packages are available. I've also removed the code that used the release candidate version so that it always uses the actual release now.

amazing! Thanks a billion. We'll get this merged next week.

I think we're kinda already heading towards a 0.5.1, so this will be awesome to get included.

Also, it's probably close enough for us to go ahead and remove v10 support. I'm planning on volunteering @BradyBonnette for that.

@thomcc

thomcc commented Oct 19, 2022

Copy link
Copy Markdown
Contributor

use pg_sys::{String as PgString}; is an option for this case. A glob import of pgx-pg-sys is... not recommended, at least in user code. We may have to handle it here, of course...

Alternatively, doing nothing here would push folks not to glob import pg_sys, which is kind of a good thing... I suppose that kind of change might be better done over a major bump, though.

@syvb

syvb commented Oct 19, 2022

Copy link
Copy Markdown
Contributor Author

Alternatively, doing nothing here would push folks not to glob import pg_sys, which is kind of a good thing... I suppose that kind of change might be better done over a major bump, though.

The amount of breakage from adding String to pg_sys would probably be minimal – I was only able to find three public uses of such a glob import (and only one, pgx_fdw, would actually break from this change and that isn't maintained anyways).

@workingjubilee

Copy link
Copy Markdown
Member

That extension will require more updates to build in any case, unfortunately, since we changed a fair number of API details it relies on.

@syvb

syvb commented Oct 27, 2022

Copy link
Copy Markdown
Contributor Author

Any update on when we might be able to get this PR in?

@eeeebbbbrrrr

Copy link
Copy Markdown
Contributor

this looks pretty good.

I hacked @zombodb to use this and after a few tweaks for feature = "pg15" here and there it compiled and passed all its tests. If there was a problem, ZDB would have found it!

@eeeebbbbrrrr
eeeebbbbrrrr merged commit 3e1a8e2 into pgcentralfoundation:develop Oct 31, 2022
@eeeebbbbrrrr

Copy link
Copy Markdown
Contributor

Thanks @Smittyvb! We appreciate the contribution.

@syvb
syvb deleted the sv/pg15 branch October 31, 2022 14:42
eeeebbbbrrrr added a commit that referenced this pull request Nov 2, 2022
usamoi pushed a commit to tensorchord/pgrx that referenced this pull request Mar 6, 2025
usamoi pushed a commit to tensorchord/pgrx that referenced this pull request Mar 6, 2025
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.

4 participants