Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds PG17beta2 support #7661

Draft
wants to merge 47 commits into
base: main
Choose a base branch
from
Draft

Adds PG17beta2 support #7661

wants to merge 47 commits into from

Commits on Jul 23, 2024

  1. Enable configure

    naisila committed Jul 23, 2024
    Configuration menu
    Copy the full SHA
    ae3ed7d View commit details
    Browse the repository at this point in the history

Commits on Jul 25, 2024

  1. Rename foreach_ macros to foreach_declared_ macros

    PG17 added foreach_ptr, foreach_int and foreach_oid macros
    Relevant PG commit
    14dd0f27d7cd56ffae9ecdbe324965073d01a9ff
    postgres/postgres@14dd0f2
    
    We already have these macros, but they are different with the
    PG17 ones because our macros take a DECLARED variable, whereas
    the PG16 macros declare a locally-scoped loop variable themselves.
    
    Hence I am renaming our macros to foreach_declared_
    naisila committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    3f5a1e0 View commit details
    Browse the repository at this point in the history
  2. Remove ExecFreeExprContext call

    Relevant PG commit
    d060e921ea5aa47b6265174c32e1128cebdbc3df
    postgres/postgres@d060e92
    naisila committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    a816d1b View commit details
    Browse the repository at this point in the history
  3. PG17 uses streaming IO in analyze, fix scan_analyze_next_block function

    Relevant PG commit
    041b96802efa33d2bc9456f2ad946976b92b5ae1
    postgres/postgres@041b968
    naisila committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    646ff0a View commit details
    Browse the repository at this point in the history
  4. Define ObjectClass for PG17+ only since it's removed

    Relevant PG commit:
    89e5ef7e21812916c9cf9fcf56e45f0f74034656
    postgres/postgres@89e5ef7
    naisila committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    85a3ed0 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    2434eff View commit details
    Browse the repository at this point in the history
  6. Remove ReorderBufferTupleBuf structure.

    Relevant PG commit:
    08e6344fd6423210b339e92c069bb979ba4e7cd6
    postgres/postgres@08e6344
    naisila committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    2076339 View commit details
    Browse the repository at this point in the history
  7. Define colliculocale and daticulocale since they have been renamed

    Relevant PG commit:
    f696c0cd5f299f1b51e214efc55a22a782cc175d
    postgres/postgres@f696c0c
    naisila committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    e9fe257 View commit details
    Browse the repository at this point in the history
  8. makeStringConst defined in PG17

    Relevant PG commit:
    de3600452b61d1bc3967e9e37e86db8956c8f577
    postgres/postgres@de36004
    naisila committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    e33736e View commit details
    Browse the repository at this point in the history
  9. RangeVarCallbackOwnsTable was replaced by RangeVarCallbackMaintainsTable

    Relevant PG commit:
    ecb0fd33720fab91df1207e85704f382f55e1eb7
    postgres/postgres@ecb0fd3
    naisila committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    4eafd3a View commit details
    Browse the repository at this point in the history
  10. attstattarget is nullable, define pg compatible functions for it

    Relevant PG commit:
    4f622503d6de975ac87448aea5cea7de4bc140d5
    postgres/postgres@4f62250
    naisila committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    be2bec0 View commit details
    Browse the repository at this point in the history
  11. stxstattarget is nullable in PG17, write compat functions for it

    Relevant PG commit:
    012460ee93c304fbc7220e5b55d9d0577fc766ab
    postgres/postgres@012460e
    naisila committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    0176974 View commit details
    Browse the repository at this point in the history
  12. Use ResourceOwner to track WaitEventSet in PG17

    Relevant PG commit:
    50c67c2019ab9ade8aa8768bfe604cd802fe8591
    postgres/postgres@50c67c2
    naisila committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    dd19847 View commit details
    Browse the repository at this point in the history
  13. getIdentitySequence now uses Relation instead of relation_id

    Relevant PG commit:
    509199587df73f06eda898ae13284292f4ae573a
    postgres/postgres@5091995
    naisila committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    022ca99 View commit details
    Browse the repository at this point in the history
  14. Remove no-op tuplestore_donestoring function

    Relevant PG commit:
    75680c3d805e2323cd437ac567f0677fdfc7b680
    postgres/postgres@75680c3
    naisila committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    e0a0874 View commit details
    Browse the repository at this point in the history
  15. MergeAction can have 3 merge kinds (now enum) in PG17, write compat

    Relevant PG commit:
    0294df2f1f842dfb0eed79007b21016f486a3c6c
    postgres/postgres@0294df2
    naisila committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    49f7bff View commit details
    Browse the repository at this point in the history
  16. EXPLAIN (MEMORY) is added, make changes to ExplainOnePlan

    Relevant PG commit:
    5de890e3610d5a12cdaea36413d967cf5c544e20
    postgres/postgres@5de890e
    naisila committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    a23bf88 View commit details
    Browse the repository at this point in the history
  17. LIMIT_OPTION_DEFAULT has been removed as it's useless, use LIMIT_OPTI…

    …ON_COUNT
    
    Relevant PG commit:
    a6be0600ac3b71dda8277ab0fcbe59ee101ac1ce
    postgres/postgres@a6be060
    naisila committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    651bcc7 View commit details
    Browse the repository at this point in the history
  18. write compat for create_foreignscan_path bcs of more arguments in PG17

    Relevant PG commit:
    9e9931d2bf40e2fea447d779c2e133c2c1256ef3
    postgres/postgres@9e9931d
    naisila committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    ec9beb5 View commit details
    Browse the repository at this point in the history
  19. pgprocno and lxid have been combined into a struct in PGPROC

    Relevant PG commits:
    28f3915b73f75bd1b50ba070f56b34241fe53fd1
    postgres/postgres@28f3915
    
    ab355e3a88de745607f6dd4c21f0119b5c68f2ad
    postgres/postgres@ab355e3
    
    024c521117579a6d356050ad3d78fdc95e44eefa
    postgres/postgres@024c521
    naisila committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    140a443 View commit details
    Browse the repository at this point in the history
  20. add pg17 build test

    naisila committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    76f60a7 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    728fe5c View commit details
    Browse the repository at this point in the history
  22. Ruleutils_17 Add more SQL/JSON constructor functions

    Relevant PG commit:
    03734a7fed7d924679770adb78a7db8a37d14188
    postgres/postgres@03734a7
    naisila committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    978fdc2 View commit details
    Browse the repository at this point in the history
  23. Ruleutils_17 Track nesting depth correctly when drilling down into RE…

    …CORD Vars.
    
    Relevant PG commit:
    e0e492e5a928e9c9eda01eeebadcfc36f9f8e7b7
    postgres/postgres@e0e492e
    naisila committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    37ac804 View commit details
    Browse the repository at this point in the history
  24. Ruleutils_17 Tidy-up some appendStringInfo*() usages

    Relevant PG commit:
    2075ba9dc9af8833b1147996c15246e44a1e4fab
    postgres/postgres@2075ba9
    naisila committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    31def24 View commit details
    Browse the repository at this point in the history
  25. Ruleutils_17 Add support for AT LOCAL

    Relevant PG commit:
    97957fdbaa429c7c582d4753b108cb1e23e1b28a
    postgres/postgres@97957fd
    naisila committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    39ec86a View commit details
    Browse the repository at this point in the history
  26. Ruleutils_17 Update copyright for 2024

    Relevant PG commit:
    29275b1d177096597675b5c6e7e7c9db2df8f4df
    postgres/postgres@29275b1
    naisila committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    fe3414f View commit details
    Browse the repository at this point in the history
  27. Ruleutils_17 Remove unused #include's from backend .c files

    Relevant PG commit:
    dbbca2cf299b81299112ca6ada671a36235ec008
    postgres/postgres@dbbca2c
    naisila committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    2e4bc1f View commit details
    Browse the repository at this point in the history
  28. Ruleutils_17 Fix EXPLAIN output for subplans in MERGE.

    Relevant PG commit:
    33e729c5148c3a697abc552621b34bdc5fd497ed
    postgres/postgres@33e729c
    naisila committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    61b92ee View commit details
    Browse the repository at this point in the history
  29. Ruleutils_17 Add RETURNING support to MERGE.

    Relevant PG commit:
    c649fa24a42ba89bf5460c7110e4fc8eeca65959
    postgres/postgres@c649fa2
    naisila committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    c6c1ff2 View commit details
    Browse the repository at this point in the history
  30. Ruleutils_17 Improve EXPLAIN's display of SubPlan nodes and output pa…

    …rameters.
    
    Relevant PG commit:
    fd0398fcb099980fbedbb7750356ef234408c1c9
    postgres/postgres@fd0398f
    naisila committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    6889367 View commit details
    Browse the repository at this point in the history
  31. Ruleutils_17 Add SQL/JSON query functions

    Relevant PG commit:
    6185c9737cf48c9540782d88f12bd2912d6ca1cc
    postgres/postgres@6185c97
    naisila committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    d2648f4 View commit details
    Browse the repository at this point in the history
  32. Ruleutils_17 Add support for MERGE ... WHEN NOT MATCHED BY SOURCE

    Relevant PG commit:
    0294df2f1f842dfb0eed79007b21016f486a3c6c
    postgres/postgres@0294df2
    naisila committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    6b4889f View commit details
    Browse the repository at this point in the history
  33. Ruleutils_17 Add basic JSON_TABLE() functionality

    Relevant PG commit:
    de3600452b61d1bc3967e9e37e86db8956c8f577
    postgres/postgres@de36004
    naisila committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    662fc76 View commit details
    Browse the repository at this point in the history
  34. Ruleutils_17 Implement ALTER TABLE ... SPLIT PARTITION ... command

    Relevant PG commit:
    87c21bb9412c8ba2727dec5ebcd74d44c2232d11
    postgres/postgres@87c21bb
    naisila committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    eefe0ae View commit details
    Browse the repository at this point in the history
  35. Ruleutils_17 Fix JsonExpr deparsing to emit QUOTES and WRAPPER correctly

    Relevant PG commit:
    f6a2529920cff76cb6e37ea840122574404dde8b
    postgres/postgres@f6a2529
    naisila committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    661fcd6 View commit details
    Browse the repository at this point in the history
  36. Ruleutils_17 JSON_TABLE: Add support for NESTED paths and columns

    Relevant PG commit:
    bb766cde63b4f624d029b34c9cdd3d0a94fd5b46
    postgres/postgres@bb766cd
    naisila committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    9c06754 View commit details
    Browse the repository at this point in the history
  37. Ruleutils_17 Fixup various StringInfo function usages

    Relevant PG commit:
    8461424fd717877ead0706984ef9b6440b2a97ad
    postgres/postgres@8461424
    naisila committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    c9f9d37 View commit details
    Browse the repository at this point in the history
  38. Ruleutils_17 Fix an assortment of typos

    Relevant PG commit:
    a42fc1c903b54ba94374e5e0c08905b9a1479f19
    postgres/postgres@a42fc1c
    naisila committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    8e6dc39 View commit details
    Browse the repository at this point in the history
  39. Ruleutils_17 Fix another couple of outdated comments for MERGE RETURN…

    …ING.
    
    Relevant PG commit:
    5c5bccef211cfc98e0d6c4bc1af40a33c8ac2488
    postgres/postgres@5c5bcce
    naisila committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    bd10f1a View commit details
    Browse the repository at this point in the history
  40. Configuration menu
    Copy the full SHA
    df9c7b4 View commit details
    Browse the repository at this point in the history

Commits on Jul 29, 2024

  1. Check if there are blocks left in columnar_scan_analyze_next_block

    In PG17, the outer loop in acquire_sample_rows() changed
    from
    while (BlockSampler_HasMore(&bs))
    to
    while (table_scan_analyze_next_block(scan, stream))
    
    Relevant PG commit:
    041b96802efa33d2bc9456f2ad946976b92b5ae1
    postgres/postgres@041b968
    
    It is expected that the scan_analyze_next_block function will
    check if there are any blocks left. So we add that check in
    columnar_scan_analyze_next_block
    naisila committed Jul 29, 2024
    Configuration menu
    Copy the full SHA
    7eb0ad5 View commit details
    Browse the repository at this point in the history
  2. Check whether table AM is default

    PG 17 added support for DEFAULT in ALTER TABLE .. SET ACCESS METHOD
    
    Relevant PG commit:
    d61a6cad6418f643a5773352038d0dfe5d3535b8
    postgres/postgres@d61a6ca
    
    In that case, name in AlterTableCmd would be null.
    Add a null check here to avoid crash.
    naisila committed Jul 29, 2024
    Configuration menu
    Copy the full SHA
    71b9974 View commit details
    Browse the repository at this point in the history

Commits on Jul 30, 2024

  1. colliculocale daticulocale renamed to colllocale datlocale, fix some …

    …tests
    
    Fix pg15 pg16 multi_mx_create_table multi_schema_support
    
    Relevant PG commit:
    postgres/postgres@f696c0c
    f696c0cd5f299f1b51e214efc55a22a782cc175d
    naisila committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    17a2ed0 View commit details
    Browse the repository at this point in the history
  2. Use datlocale in check_database_on_all_nodes function for PG17

    This commit also has to do with renaming of
    daticulocale to datlocale
    
    Relevant PG commit:
    f696c0cd5f299f1b51e214efc55a22a782cc175d
    postgres/postgres@f696c0c
    
    Keeping this commit separate from the previous one because
    these changes will be different once we drop PG15 support.
    
    For now I renamed pg_ge_15_options to pg_ge_15_17_options
    and together with it I changed the meaning of the variable.
    
    However when we drop PG14 support, we will use pg_ge_17_options
    and delete pg_ge_15_options altogether
    naisila committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    ba0b06b View commit details
    Browse the repository at this point in the history

Commits on Jul 31, 2024

  1. Add COLLPROVIDER_BUILTIN option

    Relevant PG commit:
    f69319f2f1fb16eda4b535bcccec90dff3a6795e
    postgres/postgres@f69319f
    naisila committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    6c12b10 View commit details
    Browse the repository at this point in the history

Commits on Nov 8, 2024

  1. Fix Test Failure in multi-mx in PG17 (#7722)

    This PR addresses a regression test failure in the multi-mx feature of
    Citus with the new PostgreSQL 17 version. The regression was identified
    during the execution of multi-node tests, specifically targeting
    compatibility issues introduced with PostgreSQL 17.
    
    ---------
    
    Co-authored-by: Mehmet YILMAZ <[email protected]>
    m3hm3t and m7hm7t authored Nov 8, 2024
    Configuration menu
    Copy the full SHA
    70cf729 View commit details
    Browse the repository at this point in the history