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/3659~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/3659
Choose a head ref
  • 3 commits
  • 27 files changed
  • 8 contributors

Commits on Dec 14, 2025

  1. Implement ALTER TABLE ... MERGE PARTITIONS ... command

    This new DDL command merges several partitions into a single partition of the
    target table.  The target partition is created using the new
    createPartitionTable() function with the parent partition as the template.
    
    This commit comprises a quite naive implementation which works in a single
    process and holds the ACCESS EXCLUSIVE LOCK on the parent table during all
    the operations, including the tuple routing.  This is why this new DDL
    command can't be recommended for large partitioned tables under a high load.
    However, this implementation comes in handy in certain cases, even as it is.
    Also, it could serve as a foundation for future implementations with less
    locking and possibly parallelism.
    
    Discussion: https://postgr.es/m/c73a1746-0cd0-6bdd-6b23-3ae0b7c0c582%40postgrespro.ru
    Author: Dmitry Koval <[email protected]>
    Co-authored-by: Alexander Korotkov <[email protected]>
    Co-authored-by: Tender Wang <[email protected]>
    Co-authored-by: Richard Guo <[email protected]>
    Co-authored-by: Dagfinn Ilmari Mannsaker <[email protected]>
    Co-authored-by: Fujii Masao <[email protected]>
    Co-authored-by: Jian He <[email protected]>
    Reviewed-by: Matthias van de Meent <[email protected]>
    Reviewed-by: Laurenz Albe <[email protected]>
    Reviewed-by: Zhihong Yu <[email protected]>
    Reviewed-by: Justin Pryzby <[email protected]>
    Reviewed-by: Alvaro Herrera <[email protected]>
    Reviewed-by: Robert Haas <[email protected]>
    Reviewed-by: Stephane Tachoires <[email protected]>
    Reviewed-by: Jian He <[email protected]>
    Reviewed-by: Alexander Korotkov <[email protected]>
    Reviewed-by: Pavel Borisov <[email protected]>
    Reviewed-by: Masahiko Sawada <[email protected]>
    Reviewed-by: Alexander Lakhin <[email protected]>
    Reviewed-by: Kyotaro Horiguchi <[email protected]>
    Reviewed-by: Daniel Gustafsson <[email protected]>
    Reviewed-by: Tom Lane <[email protected]>
    Reviewed-by: Noah Misch <[email protected]>
    7 people authored and Commitfest Bot committed Dec 14, 2025
    Configuration menu
    Copy the full SHA
    d8e223e View commit details
    Browse the repository at this point in the history
  2. Implement ALTER TABLE ... SPLIT PARTITION ... command

    This new DDL command splits a single partition into several partitions.  Just
    like the ALTER TABLE ... MERGE PARTITIONS ... command, new partitions are
    created using the createPartitionTable() function with the parent partition
    as the template.
    
    This commit comprises a quite naive implementation which works in a single
    process and holds the ACCESS EXCLUSIVE LOCK on the parent table during all
    the operations, including the tuple routing.  This is why the new DDL command
    can't be recommended for large, partitioned tables under high load.  However,
    this implementation comes in handy in certain cases, even as it is.  Also, it
    could serve as a foundation for future implementations with less locking and
    possibly parallelism.
    
    Discussion: https://postgr.es/m/c73a1746-0cd0-6bdd-6b23-3ae0b7c0c582%40postgrespro.ru
    Author: Dmitry Koval <[email protected]>
    Co-authored-by: Alexander Korotkov <[email protected]>
    Co-authored-by: Tender Wang <[email protected]>
    Co-authored-by: Richard Guo <[email protected]>
    Co-authored-by: Dagfinn Ilmari Mannsaker <[email protected]>
    Co-authored-by: Fujii Masao <[email protected]>
    Co-authored-by: Jian He <[email protected]>
    Reviewed-by: Matthias van de Meent <[email protected]>
    Reviewed-by: Laurenz Albe <[email protected]>
    Reviewed-by: Zhihong Yu <[email protected]>
    Reviewed-by: Justin Pryzby <[email protected]>
    Reviewed-by: Alvaro Herrera <[email protected]>
    Reviewed-by: Robert Haas <[email protected]>
    Reviewed-by: Stephane Tachoires <[email protected]>
    Reviewed-by: Jian He <[email protected]>
    Reviewed-by: Alexander Korotkov <[email protected]>
    Reviewed-by: Pavel Borisov <[email protected]>
    Reviewed-by: Masahiko Sawada <[email protected]>
    Reviewed-by: Alexander Lakhin <[email protected]>
    Reviewed-by: Kyotaro Horiguchi <[email protected]>
    Reviewed-by: Daniel Gustafsson <[email protected]>
    Reviewed-by: Tom Lane <[email protected]>
    Reviewed-by: Noah Misch <[email protected]>
    7 people authored and Commitfest Bot committed Dec 14, 2025
    Configuration menu
    Copy the full SHA
    a6c6c83 View commit details
    Browse the repository at this point in the history
  3. [CF 3659] v68 - Add SPLIT PARTITION/MERGE PARTITIONS commands

    This branch was automatically generated by a robot using patches from an
    email thread registered at:
    
    https://commitfest.postgresql.org/patch/3659
    
    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/CAPpHfdta0DMb3XjePJJWf1xbAndE8w2uYPaWEOFBGQ=xsDkfiQ@mail.gmail.com
    Author(s): Dmitry Koval
    Commitfest Bot committed Dec 14, 2025
    Configuration menu
    Copy the full SHA
    3287bc6 View commit details
    Browse the repository at this point in the history
Loading