-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade to Postgres 16 #225
Conversation
26f4c4c
to
bd15fd5
Compare
@msepga FWIW, I think the following log output when building may be worth investigating: (1)
That looks like we maybe got the wrong type somewhere for AclMode - possibly that needs to be added somewhere in the extraction logic that is used as a source for generating those files. (2)
It appears JOIN_RIGHT_ANTI is only used by the planner, not during raw parsing, at least if I read https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=16dc2703c5413534d4989e08253e8f4fcb0e2aab correctly. So I think that just needs to be added next to JOIN_ANTI in that case statement, to avoid the warning: libpg_query/src/postgres_deparse.c Line 3302 in bd15fd5
|
bd15fd5
to
06e7e62
Compare
Looks like the valgrind issue was actually triggered by chance here; the new Patched in 397ccc9. |
Hi @msepga, I'm starting to upgrade my pglast to this... I see that the extracted list of node tags are missing the usual |
397ccc9
to
ebeba2d
Compare
Thanks for spotting that @lelit 🙂 Fixed in 3a64b99 & regenerated in f716046. |
I'm not sure if we have a process to keep the different branches in sync, but it looks like 16-latest is 3 commits behind 15-latest. This PR includes one of those commits 16-latest...15-latest |
I almost completed the upgrade of pglast (see its v6 branch) and all tests are green 🥳 On the GH Actions, there's a failure on the job that builds a 32bit wheel: it's related to the fingerprinting functionality, does that ring any bell to you? |
Excellent, thanks for the testing! FYI, I discussed the plan for releasing this PR with @msepga earlier today - the plan is to merge most of the open PRs into 15-latest first, then rebase this, and then make the actual 16-latest release at the end of the week. Thus, I'd recommend not making an official release of the pglast v6 branch just yet, until we tagged a release here, just to avoid any unexpected changes when we do that rebase.
Copying the error for easier context:
This looks to me like that 32-bit build is using the wrong setting for SIZEOF_DATUM - we don't really support 32-bit builds, but if you wanted to make them work, you'd have to override the SIZEOF_VOID_P and other size-related flags defined in I don't think that's a new problem on the 16 branch, though it could be that for some reason this worked by coincidence in earlier versions. For now I'd suggest we discuss 32-bit issues separately from this PR. |
Sure, there's no hurry.
Thank you, I will try to understand what's going on.
Ok, will report back somewhere else if I find something interesting. |
This is a typedef to `Oid`.
Removed in upstream Postgres as part of b1099eca8f38ff5cfaf0901bb91cb6a22f909bc6
We pass the file contents to the Postgres scanner, which assumes it is given a string as input. As such, it uses `strlen`. `mmap` doesn't provide us with a terminal null character, so we rely on empty pages to provide this. In the case of the `incremental_sort.sql` test, it is 12288 bytes, a multiple of exactly 3 of the typical 4096 page size. As such, this test ends up not getting *any* null terminators from `mmap`, so reading can overrun the buffer. Now, we just use a plain read and append `0` to the buffer to avoid the problem.
ebeba2d
to
37f790a
Compare
5c608b9
to
8315bd2
Compare
8315bd2
to
0146447
Compare
74f3d95
to
997ec09
Compare
997ec09
to
8a20069
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ I've tested this, reviewed the files to make sure we don't pull in unnecessary code, and confirmed that the protobuf compiler now (after the update to 25.1) produces the exact protobuf/
folder contents for me locally.
Nicely done 🥳
Also, FYI, I pushed up some more deparser fixes in #229 -- we could merge those in separately after this is merged, or you can pull this into this PR, as you prefer.
Per Lukas comment (pganalyze/libpg_query#225 (comment)) “we don't really support 32-bit builds”. I tried to figure out what could cause the problem, but failed to stop significant differences in the pre-computed config.h coming with libpg_query v4 and v5... I will consider trying to fix that should someone explicitly ask to support old processors.
@lelit FWIW, it appears there was actually a new issue on 16, which is that we were missing some of the functions required when building with 32-bit. I ended up putting a bit of effort into this, so that we can actually support 32-bit out of the box with some extra define/undefs + extracting a bit more code. See #232 |
TODO: