Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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/5160~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/5160
Choose a head ref
  • 5 commits
  • 18 files changed
  • 2 contributors

Commits on May 29, 2025

  1. Specs to reproduce the issues with CREATE INDEX CONCURRENTLY and REIN…

    …DEX CONCURRENTLY in scenarios involving INSERT ON CONFLICT DO UPDATE. These tests reproduce different error cases related to "duplicate key value violates unique constraint" where this error should not occur by design.
    
    * REINDEX CONCURRENTLY and UPSERT with inferred index
    * CREATE INDEX CONCURRENTLY and UPSERT with inferred indexes
    * REINDEX CONCURRENTLY on a partitioned table
    * REINDEX CONCURRENTLY with specified constraint name
    * CREATE INDEX CONCURRENTLY with predicates
    
    In each of these scenarios, the expected behavior is that the INSERT ON CONFLICT DO UPDATE should handle conflicts gracefully without raising a "duplicate key value violates unique constraint" error. However, due to the concurrent operations on the indexes, this error is encountered.
    michail-nikolaev authored and Commitfest Bot committed May 29, 2025
    Configuration menu
    Copy the full SHA
    e621150 View commit details
    Browse the repository at this point in the history
  2. Modify the infer_arbiter_indexes function to consider both indisvalid…

    … and indisready indexes. Ensure that at least one indisvalid index is still required.
    
    The change ensures that all concurrent transactions utilize the same set of indexes as arbiters. This uniformity is required to avoid conditions that could lead to "duplicate key value violates unique constraint" errors during UPSERT operations.
    
    The patch resolves the issues in the following specs:
    * reindex_concurrently_upsert
    * index_concurrently_upsert
    * index_concurrently_upsert_predicate
    
    Despite the patch, the following specs are still affected:
    * reindex_concurrently_upsert_partitioned
    * reindex_concurrently_upsert_on_constraint
    michail-nikolaev authored and Commitfest Bot committed May 29, 2025
    Configuration menu
    Copy the full SHA
    11035e7 View commit details
    Browse the repository at this point in the history
  3. Modify the infer_arbiter_indexes function to also look for indexes th…

    …at match the specified named constraint to be used as arbiters. This ensures that the same set of arbiter indexes is used for all concurrent transactions in cases where REINDEX CONCURRENTLY processes an index used as a named constraint.
    
    The patch resolves the issues in the following specs:
    * reindex_concurrently_upsert_on_constraint
    
    Despite the patch, the following specs are still affected:
    * reindex_concurrently_upsert_partitioned
    michail-nikolaev authored and Commitfest Bot committed May 29, 2025
    Configuration menu
    Copy the full SHA
    77e7218 View commit details
    Browse the repository at this point in the history
  4. Modify the ExecInitPartitionInfo function to consider partitioned ind…

    …exes that are potentially processed by REINDEX CONCURRENTLY as arbiters as well.
    
    This is necessary to ensure that all concurrent transactions use the same set of arbiter indexes.
    
    The patch resolves the issues in the following specs:
    * reindex_concurrently_upsert_partitioned
    michail-nikolaev authored and Commitfest Bot committed May 29, 2025
    Configuration menu
    Copy the full SHA
    3c7afd5 View commit details
    Browse the repository at this point in the history
  5. [CF 5160] v9 - Issues with ON CONFLICT UPDATE and REINDEX CONCURRENTLY

    This branch was automatically generated by a robot using patches from an
    email thread registered at:
    
    https://commitfest.postgresql.org/patch/5160
    
    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/CADzfLwWtK9R3GvEp7ANfO3pE3dbpD3T99f9aGFMwV4HSerHE5w@mail.gmail.com
    Author(s): Michail Nikolaev
    Commitfest Bot committed May 29, 2025
    Configuration menu
    Copy the full SHA
    7112d41 View commit details
    Browse the repository at this point in the history
Loading