Skip to content
Permalink

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/5830~1
Choose a base ref
...
head repository: postgresql-cfbot/postgresql
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: cf/5830
Choose a head ref
  • 16 commits
  • 75 files changed
  • 2 contributors

Commits on Oct 14, 2025

  1. Implement oid8 data type

    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.
    michaelpq authored and Commitfest Bot committed Oct 14, 2025
    Configuration menu
    Copy the full SHA
    1904dea View commit details
    Browse the repository at this point in the history
  2. 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.
    michaelpq authored and Commitfest Bot committed Oct 14, 2025
    Configuration menu
    Copy the full SHA
    e3f9b1c View commit details
    Browse the repository at this point in the history
  3. 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.
    michaelpq authored and Commitfest Bot committed Oct 14, 2025
    Configuration menu
    Copy the full SHA
    6550d1c View commit details
    Browse the repository at this point in the history
  4. 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.
    michaelpq authored and Commitfest Bot committed Oct 14, 2025
    Configuration menu
    Copy the full SHA
    38b6119 View commit details
    Browse the repository at this point in the history
  5. 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.
    michaelpq authored and Commitfest Bot committed Oct 14, 2025
    Configuration menu
    Copy the full SHA
    b261229 View commit details
    Browse the repository at this point in the history
  6. 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.
    michaelpq authored and Commitfest Bot committed Oct 14, 2025
    Configuration menu
    Copy the full SHA
    3716bb9 View commit details
    Browse the repository at this point in the history
  7. 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.
    michaelpq authored and Commitfest Bot committed Oct 14, 2025
    Configuration menu
    Copy the full SHA
    c9646a4 View commit details
    Browse the repository at this point in the history
  8. 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.
    michaelpq authored and Commitfest Bot committed Oct 14, 2025
    Configuration menu
    Copy the full SHA
    59fc90a View commit details
    Browse the repository at this point in the history
  9. 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.
    michaelpq authored and Commitfest Bot committed Oct 14, 2025
    Configuration menu
    Copy the full SHA
    e399329 View commit details
    Browse the repository at this point in the history
  10. 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.
    michaelpq authored and Commitfest Bot committed Oct 14, 2025
    Configuration menu
    Copy the full SHA
    4b40baa View commit details
    Browse the repository at this point in the history
  11. 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.
    michaelpq authored and Commitfest Bot committed Oct 14, 2025
    Configuration menu
    Copy the full SHA
    46f3b9a View commit details
    Browse the repository at this point in the history
  12. 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.
    michaelpq authored and Commitfest Bot committed Oct 14, 2025
    Configuration menu
    Copy the full SHA
    f19f5e3 View commit details
    Browse the repository at this point in the history
  13. 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.
    michaelpq authored and Commitfest Bot committed Oct 14, 2025
    Configuration menu
    Copy the full SHA
    37544e0 View commit details
    Browse the repository at this point in the history
  14. 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.
    michaelpq authored and Commitfest Bot committed Oct 14, 2025
    Configuration menu
    Copy the full SHA
    b0fae0f View commit details
    Browse the repository at this point in the history
  15. 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.
    michaelpq authored and Commitfest Bot committed Oct 14, 2025
    Configuration menu
    Copy the full SHA
    327c1e6 View commit details
    Browse the repository at this point in the history
  16. [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 committed Oct 14, 2025
    Configuration menu
    Copy the full SHA
    1ae2129 View commit details
    Browse the repository at this point in the history
Loading