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
  • 26 files changed
  • 2 contributors

Commits on Apr 2, 2025

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

    This new DDL command merges several partitions into the one partition of the
    target table.  The target partition is created using new
    createPartitionTable() function with parent partition as the template.
    
    This commit comprises quite naive implementation which works in 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 come in handy in certain cases even as is.
    Also, it could be used as a foundation for future implementations with lesser
    locking and possibly parallel.
    
    Discussion: https://postgr.es/m/c73a1746-0cd0-6bdd-6b23-3ae0b7c0c582%40postgrespro.ru
    Author: Dmitry Koval
    Reviewed-by: Matthias van de Meent, Laurenz Albe, Zhihong Yu, Justin Pryzby
    Reviewed-by: Alvaro Herrera, Robert Haas, Stephane Tachoires
    
    Fixes (summary information).
    Authors: Alexander Korotkov, Tender Wang, Richard Guo, Dagfinn Ilmari Mannsaker
    Authors: Fujii Masao
    Reviewed-by: Alexander Korotkov, Robert Haas, Justin Pryzby, Pavel Borisov
    Reviewed-by: Masahiko Sawada
    Reported-by: Alexander Lakhin, Justin Pryzby, Kyotaro Horiguchi
    Reported-by: Daniel Gustafsson, Tom Lane, Noah Misch
    akorotkov authored and Commitfest Bot committed Apr 2, 2025
    Configuration menu
    Copy the full SHA
    1dd8712 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 parititions.
    Just like ALTER TABLE ... MERGE PARTITIONS ... command, new patitions are
    created using createPartitionTable() function with parent partition as the
    template.
    
    This commit comprises quite naive implementation which works in 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 come in handy in certain cases even as is.
    Also, it could be used as a foundation for future implementations with lesser
    locking and possibly parallel.
    
    Discussion: https://postgr.es/m/c73a1746-0cd0-6bdd-6b23-3ae0b7c0c582%40postgrespro.ru
    Author: Dmitry Koval
    Reviewed-by: Matthias van de Meent, Laurenz Albe, Zhihong Yu, Justin Pryzby
    Reviewed-by: Alvaro Herrera, Robert Haas, Stephane Tachoires
    
    Fixes (summary information).
    Authors: Alexander Korotkov, Tender Wang, Richard Guo, Dagfinn Ilmari Mannsaker
    Authors: Fujii Masao
    Reviewed-by: Alexander Korotkov, Robert Haas, Justin Pryzby, Pavel Borisov
    Reviewed-by: Masahiko Sawada
    Reported-by: Alexander Lakhin, Justin Pryzby, Kyotaro Horiguchi
    Reported-by: Daniel Gustafsson, Tom Lane, Noah Misch
    akorotkov authored and Commitfest Bot committed Apr 2, 2025
    Configuration menu
    Copy the full SHA
    1eec0d7 View commit details
    Browse the repository at this point in the history
  3. [CF 3659] v37 - 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/[email protected]
    Author(s): Dmitry Koval
    Commitfest Bot committed Apr 2, 2025
    Configuration menu
    Copy the full SHA
    d377521 View commit details
    Browse the repository at this point in the history
Loading