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: 4eda42e
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: eea800c
Choose a head ref
  • 6 commits
  • 78 files changed
  • 3 contributors

Commits on Dec 8, 2025

  1. Add hash_make macros

    This adds a bunch of hash_make* and shmem_hash_make* macros to make it
    easier and less error prone to create HTABs. These macros are
    implemented as wrappers around the already existing hash_create
    function. Using the new macros is preferred, due to the additional
    compile time checks that they bring.
    
    Co-Authored-By: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
    2 people authored and Commitfest Bot committed Dec 8, 2025
    Configuration menu
    Copy the full SHA
    ed67a9a View commit details
    Browse the repository at this point in the history
  2. Use hash_make macros throughout the codebase

    This shows how our code base looks when using the new APIs. This has
    some typesafety, readability and maintanability benefits, but it also
    introduces some backpatching problems. These backpatching problems
    cannot be resolved by backporting the new hash_make macros, because some
    of them require C11 (which we only require on master for now). I think
    it's unlikely that we'll need to backpatch things in code that creates
    hashtables though, so it could still be worth it to do this complete
    refactor.
    
    At the very least we should choose a few places where we use the new
    macros to make sure they have coverage.
    JelteF authored and Commitfest Bot committed Dec 8, 2025
    Configuration menu
    Copy the full SHA
    322cd97 View commit details
    Browse the repository at this point in the history
  3. Inline functions that have now become trivial

    JelteF authored and Commitfest Bot committed Dec 8, 2025
    Configuration menu
    Copy the full SHA
    ba2680d View commit details
    Browse the repository at this point in the history
  4. Add foreach_hash macro

    For lists we've had a new foreach style macros since 14dd0f2. This
    adds a similar macro for hash tables. This new foreach_hash macro makes
    iterating over the items in an HTAB as simple as iterating over the
    items in a List. The only additional thing to keep in mind is that when
    exiting the loop early you need to call foreach_hash_term.
    JelteF authored and Commitfest Bot committed Dec 8, 2025
    Configuration menu
    Copy the full SHA
    46bd266 View commit details
    Browse the repository at this point in the history
  5. Use foreach_hash macro throughout the codebase

    This starts using the new foreach_hash macro throughout the codebase.
    This makes code easier to read, but obviously does introduce
    backpatching problems. We can choose not to do this refactor to avoid
    that. Or we could instead choose to do the refactor and then backpatch
    these new macros so they can be used in backpatched code.
    
    At the very least we should choose a few places where we use the new
    macros to make sure they have coverage.
    JelteF authored and Commitfest Bot committed Dec 8, 2025
    Configuration menu
    Copy the full SHA
    4ca7276 View commit details
    Browse the repository at this point in the history
  6. [CF 6276] v3 - Safer hash table initialization macro

    This branch was automatically generated by a robot using patches from an
    email thread registered at:
    
    https://commitfest.postgresql.org/patch/6276
    
    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/DESS1U66SWHO.2JT1YL2Q20K0F@jeltef.nl
    Author(s): Bertrand Drouvot
    Commitfest Bot committed Dec 8, 2025
    Configuration menu
    Copy the full SHA
    eea800c View commit details
    Browse the repository at this point in the history
Loading