-
Notifications
You must be signed in to change notification settings - Fork 2
Permalink
Choose a base ref
{{ refName }}
default
Choose a head ref
{{ refName }}
default
Comparing changes
Choose two branches to see what’s changed or to start a new pull request.
If you need to, you can also or
learn more about diff comparisons.
Open a pull request
Create a new pull request by comparing changes across two branches. If you need to, you can also .
Learn more about diff comparisons here.
base repository: postgresql-cfbot/postgresql
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: cf/5924~1
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
...
head repository: postgresql-cfbot/postgresql
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: cf/5924
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
- 4 commits
- 31 files changed
- 2 contributors
Commits on Aug 9, 2025
-
Make type Datum be 8 bytes wide everywhere.
This still-WIP patch aims to make sizeof(Datum) be 8 on all platforms including 32-bit ones. The objective is to allow USE_FLOAT8_BYVAL to be true everywhere, and in consequence to remove a lot of code that is specific to pass-by-reference handling of float8, int8, etc. In this way we can reduce the maintenance effort involved in supporting 32-bit platforms, without going so far as to actually desupport them. Since Datum is strictly an in-memory concept, this has no impact on on-disk storage, though an initdb or pg_upgrade will be needed to fix affected pg_type.typbyval entries. We can expect that this change will make 32-bit builds a bit slower and more memory-hungry, although being able to use pass-by-value handling of 8-byte types may buy back some of that. But we stopped optimizing for 32-bit cases a long time ago, and this seems like just another step on that path. This initial patch simply forces the correct type definition and USE_FLOAT8_BYVAL setting, and cleans up a couple of minor compiler complaints that ensued. This is sufficient for testing purposes. In the wake of a bunch of Datum-conversion cleanups by Peter Eisentraut, this now compiles cleanly with gcc on a 32-bit platform. (I'd only tested the previous version with clang, which it turns out is less picky than gcc about width-changing coercions.) If we pursue this path, we would of course want to remove all the now-dead code (search for mentions of SIZEOF_DATUM and USE_FLOAT8_BYVAL to find likely places to clean up). I have not bothered with that yet. A more interesting question is whether there are comments or calculations that need adjustment. There is probably an effect on the largest array that we can support in 32-bit mode, for example. Discussion: https://postgr.es/m/[email protected]
Configuration menu - View commit details
-
Copy full SHA for a703f5e - Browse repository at this point
Copy the full SHA a703f5eView commit details -
Grab the low-hanging fruit from forcing sizeof(Datum) to 8.
Remove conditionally-compiled code for smaller Datum widths. I also fixed up a few more places that were not using DatumGetIntXX where they should. One thing I remembered while preparing this part is that SP-GiST stores pass-by-value prefix keys as Datums, so that the on-disk representation depends on sizeof(Datum). That's even more unfortunate than the existing commentary makes it out to be, because now there is a hazard that the change of sizeof(Datum) will break SP-GiST indexes on 32-bit machines. It appears that there are no existing SP-GiST opclasses that are actually affected; and if there are some that I didn't find, the number of installations that are using them on 32-bit machines is doubtless tiny. So I'm proceeding on the assumption that we can get away with this, but it's something to worry about. (gininsert.c looks like it has a similar problem, but it's okay because the "tuples" it's constructing are just transient data within the tuplesort step. That's pretty poorly documented though, so I added some comments.) Discussion: https://postgr.es/m/[email protected]
Configuration menu - View commit details
-
Copy full SHA for fb6fac5 - Browse repository at this point
Copy the full SHA fb6fac5View commit details -
Grab the low-hanging fruit from forcing USE_FLOAT8_BYVAL to true.
Remove conditionally-compiled code for the other case. I did not bother removing uses of the FLOAT8PASSBYVAL macro, except for getting rid of it in pg_type.dat so that initdb can skip the step of replacing it. Other references could be replaced with "true" but it would save nothing. I also left the associated pg_control and Pg_magic_struct fields in place. Perhaps we should get rid of them, but it would save little. Discussion: https://postgr.es/m/[email protected]
Configuration menu - View commit details
-
Copy full SHA for 8e64223 - Browse repository at this point
Copy the full SHA 8e64223View commit details -
[CF 5924] v1 - Making type Datum be 8 bytes everywhere
This branch was automatically generated by a robot using patches from an email thread registered at: https://commitfest.postgresql.org/patch/5924 The branch will be overwritten each time a new patch version is posted to the thread, and also periodically to check for bitrot caused by changes on the master branch. Patch(es): https://www.postgresql.org/message-id/[email protected] Author(s): Tom Lane
Commitfest Bot committedAug 9, 2025 Configuration menu - View commit details
-
Copy full SHA for aca62c3 - Browse repository at this point
Copy the full SHA aca62c3View commit details
Loading
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff cf/5924~1...cf/5924