-
Notifications
You must be signed in to change notification settings - Fork 2
Comparing changes
Open a pull request
base repository: postgresql-cfbot/postgresql
base: cf/5830~1
head repository: postgresql-cfbot/postgresql
compare: cf/5830
- 16 commits
- 75 files changed
- 2 contributors
Commits on Oct 14, 2025
-
This new identifier type will be used for 8-byte TOAST values, and can be useful for other purposes, not yet defined as of writing this patch. The following operators are added for this data type: - Casts with integer types and OID. - btree and hash operators - min/max functions. - Tests and documentation. XXX: Requires catversion bump.
Configuration menu - View commit details
-
Copy full SHA for 1904dea - Browse repository at this point
Copy the full SHA 1904deaView commit details -
Refactor some TOAST value ID code to use Oid8 instead of Oid
This change is a mechanical switch to change most of the code paths that assume TOAST value IDs to be Oids to become Oid8, easing an upcoming change to allow larger TOAST values, at 8 bytes. The areas touched are related to table AM, amcheck and logical decoding's reorder buffer. A good chunk of the changes involve switching printf() markers from %u to OID8_FORMAT.
Configuration menu - View commit details
-
Copy full SHA for e3f9b1c - Browse repository at this point
Copy the full SHA e3f9b1cView commit details -
Minimize footprint of TOAST_MAX_CHUNK_SIZE in heap and amcheck
This eases a follow-up change to support 8-byte TOAST value IDs, as the maximum chunk size allowed for a single chunk of TOASTed data depends on the size of the value ID.
Configuration menu - View commit details
-
Copy full SHA for 6550d1c - Browse repository at this point
Copy the full SHA 6550d1cView commit details -
Renames around varatt_external->varatt_external_oid
This impacts a few things: - VARTAG_ONDISK -> VARTAG_ONDISK_OID - TOAST_POINTER_SIZE -> TOAST_OID_POINTER_SIZE - TOAST_MAX_CHUNK_SIZE -> TOAST_OID_MAX_CHUNK_SIZE The "struct" around varatt_external is cleaned up in most places, while on it. This rename is in preparation of a follow-up commit that aims at adding support for multiple types of external on-disk TOAST pointers, where the OID type is only one subset of them.
Configuration menu - View commit details
-
Copy full SHA for 38b6119 - Browse repository at this point
Copy the full SHA 38b6119View commit details -
Refactor external TOAST pointer code for better pluggability
This commit introduces a new interface for external TOAST pointers, which is able to make a translation of the varlena pointers stored on disk to/from an new in-memory structure called toast_external. The types of varatt_external supported on disk need to be registered into a new subsystem in a new file, called toast_external.[c|h], then define a set of callbacks to allow the toasting and detoasting code to use it. A follow-up change will rely on this refactoring to introduce new vartag_external values with an associated varatt_external_* that is able, which would be used in int8 TOAST tables.
Configuration menu - View commit details
-
Copy full SHA for b261229 - Browse repository at this point
Copy the full SHA b261229View commit details -
Move static inline routines of varatt_external_oid to toast_external.c
This isolates most of the knowledge of varatt_external_oid into the local area where it is manipulated through the toast_external transition type, with the backend code not requiring it. Extension code should not need it either, as toast_external should be the layer to use when looking at external on-dist TOAST varlenas.
Configuration menu - View commit details
-
Copy full SHA for 3716bb9 - Browse repository at this point
Copy the full SHA 3716bb9View commit details -
Split VARATT_EXTERNAL_GET_POINTER for indirect and OID TOAST pointers
VARATT_EXTERNAL_GET_POINTER() is renamed to VARATT_INDIRECT_GET_POINTER() with the external on-disk TOAST pointers for OID values being now located within toast_external.c, splitting both concepts completely.
Configuration menu - View commit details
-
Copy full SHA for c9646a4 - Browse repository at this point
Copy the full SHA c9646a4View commit details -
Switch pg_column_toast_chunk_id() return value from oid to oid8
This is required for a follow-up patch that will add support for 8-byte TOAST values, with this function being changed so as it is able to support the largest TOAST value type available. XXX: Bump catalog version.
Configuration menu - View commit details
-
Copy full SHA for 59fc90a - Browse repository at this point
Copy the full SHA 59fc90aView commit details -
Add catcache support for OID8OID
This is required to be able to do catalog cache lookups of oid8 fields for toast values of the same type.
Configuration menu - View commit details
-
Copy full SHA for e399329 - Browse repository at this point
Copy the full SHA e399329View commit details -
Add support for TOAST chunk_id type in binary upgrades
This commit adds a new function, which would set the type of a chunk_id attribute for a TOAST table across upgrades. This piece currently works only with chunk_id = OIDOID, but it is required in a follow-up patch where support for chunk_id = OID8OID is supported on top of the existing one.
Configuration menu - View commit details
-
Copy full SHA for 4b40baa - Browse repository at this point
Copy the full SHA 4b40baaView commit details -
Enlarge OID generation to 8 bytes
This adds a new routine called GetNewObjectId8() in varsup.c, which is able to retrieve a 64b OID. GetNewObjectId() is kept compatible with its origin, where we still check that the lower 32 bits of the counter do not wraparound, handling the FirstNormalObjectId case. pg_resetwal -o/--next-oid is updated to be able to handle 8-byte OIDs.
Configuration menu - View commit details
-
Copy full SHA for 46f3b9a - Browse repository at this point
Copy the full SHA 46f3b9aView commit details -
Add relation option toast_value_type
This relation option gives the possibility to define the attribute type that can be used for chunk_id in a TOAST table when it is created initially. This parameter has no effect if a TOAST table exists, even after it is modified later on, even on rewrites. This can be set only to "oid" currently, and will be expanded with a second mode later. Note: perhaps it would make sense to introduce that only when support for 8-byte OID values are added to TOAST, the split is here to ease review.
Configuration menu - View commit details
-
Copy full SHA for f19f5e3 - Browse repository at this point
Copy the full SHA f19f5e3View commit details -
Add support for oid8 TOAST values
This commit adds the possibility to define TOAST tables with oid8 as value ID, based on the reloption toast_value_type. All the external TOAST pointers still rely on varatt_external and a single vartag, with all the values inserted in the bigint TOAST tables fed from the existing OID value generator. This will be changed in an upcoming patch that adds more vartag_external types and its associated structures, with the code being able to use a different external TOAST pointer depending on the attribute type of chunk_id in TOAST relations. All the changes done here are mechanical, with all the TOAST code able to do chunk ID lookups based on the two types now supported. XXX: Catalog version bump required.
Configuration menu - View commit details
-
Copy full SHA for 37544e0 - Browse repository at this point
Copy the full SHA 37544e0View commit details -
Add tests for TOAST relations with bigint as value type
This adds coverage for relations created with default_toast_type = 'int8', for external TOAST pointers both compressed and uncompressed.
Configuration menu - View commit details
-
Copy full SHA for b0fae0f - Browse repository at this point
Copy the full SHA b0fae0fView commit details -
Add new vartag_external for 8-byte TOAST values
This is a new type of external TOAST pointer, able to be fed 8-byte TOAST values. It uses a dedicated vartag_external, which is used when a TOAST table uses bigint for its chunk_id. The relevant callbacks are added to toast_external.c.
Configuration menu - View commit details
-
Copy full SHA for 327c1e6 - Browse repository at this point
Copy the full SHA 327c1e6View commit details -
[CF 5830] v7 - Support for 8-byte TOAST values (aka the TOAST infinit…
…e loop problem) This branch was automatically generated by a robot using patches from an email thread registered at: https://commitfest.postgresql.org/patch/5830 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): Michael Paquier
Commitfest Bot committedOct 14, 2025 Configuration menu - View commit details
-
Copy full SHA for 1ae2129 - Browse repository at this point
Copy the full SHA 1ae2129View commit details
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/5830~1...cf/5830