)]}'
{
  "log": [
    {
      "commit": "24de724c7b72d9185325eb45e81748737abd5e98",
      "tree": "8397c38fa46c7e5de817f99dcb495139f2350791",
      "parents": [
        "81d0ae1fac387ad2c0ea0a7f73d9a77def3da2d6"
      ],
      "author": {
        "name": "Denis Efimov",
        "email": "71937078+doefimov@users.noreply.github.com",
        "time": "Fri Nov 20 13:31:30 2026 +0300"
      },
      "committer": {
        "name": "Dianjin Wang",
        "email": "wangdianjin@gmail.com",
        "time": "Mon Nov 23 19:19:33 2026 +0800"
      },
      "message": "Honor the parent make job limit when building PAX\n\nUse recursive $(MAKE) for the CMake-generated build and install\ntargets so they inherit the parent jobserver. The fixed -j8 and\n-j10 values bypassed the parent\u0027s limit.\n"
    },
    {
      "commit": "81d0ae1fac387ad2c0ea0a7f73d9a77def3da2d6",
      "tree": "9c5ec53759328688977fe08e3f35994af519be58",
      "parents": [
        "1efc644d32b97f92699beff9afb9247f4af7e776"
      ],
      "author": {
        "name": "reshke",
        "email": "reshke@double.cloud",
        "time": "Mon Nov 23 11:12:19 2026 +0500"
      },
      "committer": {
        "name": "Dianjin Wang",
        "email": "wangdianjin@gmail.com",
        "time": "Mon Nov 23 16:41:48 2026 +0800"
      },
      "message": "Fix zero-length memcpy calls in backend utilities\n\nUBSan reported: \"null pointer passed as memcpy argument 2\" in append_string_to_pipe_chunk -\u003e write_message_to_server_log and readSharedLocalSnapshot_forCursor -\u003e readerFillLocalSnapshot.\n\nRocky Linux 10 reported: \"-Werror\u003dstringop-overread: memcpy reading 4048 or more bytes from a region of size 1\" when NULL log fields were normalized to an empty string.\n\nKeep absent log fields at zero length, skip zero-byte copies, and skip the xip copy when there are no in-progress transactions.\n"
    },
    {
      "commit": "1efc644d32b97f92699beff9afb9247f4af7e776",
      "tree": "dce10bc57eacad5d1b3fd6195423e8dfa3317966",
      "parents": [
        "fe39ff3c7d60bb5c24f3a8e59fb0ed48bc7d40b9"
      ],
      "author": {
        "name": "reshke",
        "email": "reshke@double.cloud",
        "time": "Mon Nov 23 11:06:51 2026 +0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Mon Nov 23 11:06:51 2026 +0500"
      },
      "message": "Check external table protocol permissions in utility mode (#2346)\n\nRun the existing external table protocol permission checks in utility\nsessions as well as coordinator sessions. Execution segments continue to\nuse the checks already performed by the coordinator.\n\nFixes #1992"
    },
    {
      "commit": "fe39ff3c7d60bb5c24f3a8e59fb0ed48bc7d40b9",
      "tree": "d7a778a4910600d96efc9435a48f9bc0095782c4",
      "parents": [
        "60429d272f8e17eaa6aec89f8fa6f9ddf30d9065"
      ],
      "author": {
        "name": "Dianjin Wang",
        "email": "wangdianjin@gmail.com",
        "time": "Sun Nov 22 16:53:58 2026 +0800"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Sun Nov 22 08:53:58 2026 +0000"
      },
      "message": "CI: run the pg_dump TAP tests (#2243)\n\nAdd `src/bin/pg_dump` TAP tests to the `ic-tap` CI job on Rocky 8, 9, and 10. Fix regressions exposed by the REL\\_16\\_9 merge: restore dumping of default type encodings, correct the aggregate metadata query, avoid duplicate schema creation, and restore dynamic table ownership through `ALTER MATERIALIZED VIEW`.\n\nRecord the initial privileges of `cdb_schema` catalog relations after running the `cdb_init.d` scripts, so `pg_dump` does not emit those grants as per-database changes. Adapt `002_pg_dump.pl` to Cloudberry’s supported features and PostgreSQL 16 output, and update the new comments to say “Cloudberry.”\n\nThe pg\\_dump TAP tests pass **11,420/11,420** on Rocky 8, 9, and 10.\n\nBackpatch-through: REL\\_2\\_STABLE  \nFull disclosure:  pr is assisted-by Claude Code, review by reshke"
    },
    {
      "commit": "60429d272f8e17eaa6aec89f8fa6f9ddf30d9065",
      "tree": "7ccf49075903c743ed886f12766b60b45b7169b6",
      "parents": [
        "f00989e77363edfa31b1176a0d2c70b83de4d5c3"
      ],
      "author": {
        "name": "Dianjin Wang",
        "email": "wangdianjin@gmail.com",
        "time": "Sun Nov 22 10:22:51 2026 +0800"
      },
      "committer": {
        "name": "Dianjin Wang",
        "email": "wangdianjin@gmail.com",
        "time": "Sun Nov 22 12:07:29 2026 +0800"
      },
      "message": "Do not log rmgr registration in single-user mode\n\nWith --enable-pax, every backend loads pax through the built-in list in\nutils/process_shared_preload_libraries.h.  pax registers a custom\nresource manager, and RegisterCustomRmgr() reports this at LOG.  A\nsingle-user backend writes LOG messages to stderr, so each initdb run\nprints this during post-bootstrap initialization:\n\n  performing post-bootstrap initialization ... \u003ctime\u003e,...,\"LOG\",\n  \"00000\",\"registered custom resource manager \"\"Pax resource manager\"\"\n  with ID 199\",...\n\nThe initdb TAP test expects one initdb run to write nothing to stderr,\nso the test fails on each build with pax, which includes the CI build.\n\nReport the message at DEBUG1 when there is no postmaster.  A postmaster\nstill reports it at LOG.\n\n#2229 fixed src/bin/initdb/t/001_initdb.pl after the REL_16_9 merge,\nbut CI does not run this test, so the next break can go unnoticed.\nAdd it to the ic-tap job, which runs on Rocky 8, 9 and 10.\n\nAssisted-by: Claude Code\n"
    },
    {
      "commit": "f00989e77363edfa31b1176a0d2c70b83de4d5c3",
      "tree": "eabed80d4e345e969d5edad964196ebf23fc1b85",
      "parents": [
        "a9c906e362013be3c62f32513656159b3d7e35b4"
      ],
      "author": {
        "name": "Dianjin Wang",
        "email": "wangdianjin@gmail.com",
        "time": "Mon Oct 26 17:10:46 2026 +0800"
      },
      "committer": {
        "name": "Dianjin Wang",
        "email": "wangdianjin@gmail.com",
        "time": "Sat Nov 21 22:14:54 2026 +0800"
      },
      "message": "Stop mocks of noreturn functions from returning\n\nThe unit test mocks that mocker.py generates end every void function\nwith a plain mock() call.  For the functions declared\npg_attribute_noreturn() that means the mock falls off its end, and GCC\nwarns on every build of the unit tests:\n\n  elog_mock.c: warning: \u0027noreturn\u0027 function does return\n\nIt does so for ReThrowError, pg_re_throw, ExceptionalCondition,\nMemoryContextError, add_size_error, mul_size_error and WalSndShutdown.\n\nHave mocker.py collect the functions declared pg_attribute_noreturn()\nin the source file and in the headers it includes, following includes\nthrough the file\u0027s own directory and src/include, and end their mocks\nwith abort().  The tests leave these mocks through a side effect that\nlongjmps, so the abort() is never reached; a test that forgot to set\none now stops there instead of running on past a call the compiler\nassumed never returns.\n\nThe generated mocks differ from before only by those seven abort()\ncalls.\n\nAssisted-by: Claude Code\n"
    },
    {
      "commit": "a9c906e362013be3c62f32513656159b3d7e35b4",
      "tree": "dbb8bc43134b3fa6c7746824857be9cfe5a2991a",
      "parents": [
        "d44a78843ec4a930d4a481c7072de6979d10ed72"
      ],
      "author": {
        "name": "Dianjin Wang",
        "email": "wangdianjin@gmail.com",
        "time": "Fri Oct 23 10:46:08 2026 +0800"
      },
      "committer": {
        "name": "Dianjin Wang",
        "email": "wangdianjin@gmail.com",
        "time": "Sat Nov 21 18:44:46 2026 +0800"
      },
      "message": "Fix uninitialised LOCALLOCK read in lock unit test\n\ntest__RemoveLocalLock_Null inserts a LOCALLOCK with hash_search(), which\nsets only the key, then sets lockOwners to NULL and calls\nRemoveLocalLock(). That also reads numLockOwners, to walk lockOwners,\nand holdsStrongLockCount, and both are uninitialised. The test passes as\nlong as the memory happens to be zero; with glibc\u0027s MALLOC_PERTURB_ set,\nas meson test sets it, numLockOwners is garbage and the loop\ndereferences the NULL array.\n\nClear the entry past its key, as LockAcquireExtended() does for a new\none.\n\nAssisted-by: Claude Code\n\n"
    },
    {
      "commit": "d44a78843ec4a930d4a481c7072de6979d10ed72",
      "tree": "81a42957294e0becb9c4e6a0165af743156053dc",
      "parents": [
        "dad803b750b3c6bc90196700af53375f3e09dc7c"
      ],
      "author": {
        "name": "Dianjin Wang",
        "email": "wangdianjin@gmail.com",
        "time": "Mon Oct 26 17:01:54 2026 +0800"
      },
      "committer": {
        "name": "Dianjin Wang",
        "email": "wangdianjin@gmail.com",
        "time": "Sat Nov 21 16:46:42 2026 +0800"
      },
      "message": "Fix two compiler warnings in backend unit tests\n\nCompiled with the server\u0027s warning flags, two unit test sources warn:\n\n  ginpostinglist_fakes.c:67: warning: control reaches end of non-void\n  function [-Wreturn-type]\n  dfmgr_test.c:68: warning: function \u0027errdetail_internal_impl\u0027 might be\n  a candidate for \u0027gnu_printf\u0027 format attribute\n  [-Wsuggest-attribute\u003dformat]\n\nThe pg_fprintf() fake is declared to return int and returned nothing;\nit returns 0 now. errdetail_internal_impl(), which stands in for\nerrdetail() and errdetail_internal(), now carries their printf\nattribute, so its callers in dfmgr.c are format-checked as they are\nagainst the real functions, and it calls va_end(), which it never did.\n\n`make unittest-check` compiles the tests with CFLAGS\u003d-DUNITTEST alone,\nwhich is why it does not show these.\n\nAssisted-by: Claude Code\n"
    },
    {
      "commit": "dad803b750b3c6bc90196700af53375f3e09dc7c",
      "tree": "a72d8567f1a0c6a3ff11b4798607e196b98951dd",
      "parents": [
        "91443d5cfc3112fd5a9739a02c0558fccb1c0ebe"
      ],
      "author": {
        "name": "reshke",
        "email": "reshke@double.cloud",
        "time": "Sat Nov 21 08:07:24 2026 +0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Sat Nov 21 03:07:24 2026 +0000"
      },
      "message": "Allow sorted GatherSingle motion receivers (#2322)\n\n* Allow sorted GatherSingle motion receivers\n\nA replicated data-modifying CTE with ORDER BY reaches the sorted receiver with motionType GATHER_SINGLE, sendSorted set, and a non-NULL merge heap. It tripped the nodeMotion.c:441 assertion, which only allowed GATHER. Permit GATHER_SINGLE while retaining the sendSorted and heap checks.\n\nGDB backtrace (verbatim):\n#0  0x000079fa0d69ebec in pthread_kill () from /lib/x86_64-linux-gnu/libc.so.6\n#1  0x000079fa0d64527e in raise () from /lib/x86_64-linux-gnu/libc.so.6\n#2  0x000079fa0d6288ff in abort () from /lib/x86_64-linux-gnu/libc.so.6\n#3  0x0000646474bc5726 in ExceptionalCondition (conditionName\u003dconditionName@entry\u003d0x6464754da9a0 \"motion-\u003emotionType \u003d\u003d MOTIONTYPE_GATHER \u0026\u0026 motion-\u003esendSorted \u0026\u0026 hp !\u003d NULL\", fileName\u003dfileName@entry\u003d0x646475445062 \"nodeMotion.c\", lineNumber\u003dlineNumber@entry\u003d441) at assert.c:42\n#4  0x0000646474ef5260 in execMotionSortedReceiver (node\u003d0x6464a0549f48) at nodeMotion.c:441\n#5  ExecMotion (pstate\u003d0x6464a0549f48) at nodeMotion.c:152\n#6  0x0000646474e9cd8d in ExecProcNodeGPDB (node\u003d0x6464a0549f48) at execProcnode.c:672\n#7  ExecProcNodeFirst (node\u003d0x6464a0549f48) at execProcnode.c:633\n#8  0x0000646474e91e6a in ExecProcNode (node\u003d0x6464a0549f48) at ../../../src/include/executor/executor.h:305\n#9  ExecutePlan (queryDesc\u003dqueryDesc@entry\u003d0x6464a0453610, use_parallel_mode\u003d\u003coptimized out\u003e, use_parallel_mode@entry\u003dfalse, operation\u003doperation@entry\u003dCMD_SELECT, sendTuples\u003dsendTuples@entry\u003dtrue, numberTuples\u003dnumberTuples@entry\u003d0, direction\u003ddirection@entry\u003dForwardScanDirection, dest\u003d0x6464a0453580, execute_once\u003dtrue) at execMain.c:2899\n#10 0x0000646474e928a3 in standard_ExecutorRun (queryDesc\u003d0x6464a0453610, direction\u003dForwardScanDirection, count\u003d0, execute_once\u003dtrue) at execMain.c:1037\n#11 0x0000646474e92ffd in ExecutorRun (queryDesc\u003dqueryDesc@entry\u003d0x6464a0453610, direction\u003ddirection@entry\u003dForwardScanDirection, count\u003dcount@entry\u003d0, execute_once\u003dexecute_once@entry\u003dtrue) at execMain.c:845\n#12 0x00006464751738a8 in ProcessQuery (portal\u003dportal@entry\u003d0x6464a04ad358, stmt\u003dstmt@entry\u003d0x6464a05671f8, params\u003d\u003coptimized out\u003e, queryEnv\u003d0x0, dest\u003ddest@entry\u003d0x6464a0453580, qc\u003dqc@entry\u003d0x7fff171201c0, sourceText\u003d\u003coptimized out\u003e) at pquery.c:251\n#13 0x0000646475174022 in PortalRunMulti (portal\u003dportal@entry\u003d0x6464a04ad358, isTopLevel\u003disTopLevel@entry\u003dtrue, setHoldSnapshot\u003dsetHoldSnapshot@entry\u003dtrue, dest\u003ddest@entry\u003d0x6464a0453580, altdest\u003d0x6464757f90a0 \u003cdonothingDR\u003e, qc\u003dqc@entry\u003d0x7fff171201c0) at pquery.c:1497\n#14 0x0000646475174247 in FillPortalStore (portal\u003dportal@entry\u003d0x6464a04ad358, isTopLevel\u003disTopLevel@entry\u003dtrue) at pquery.c:1241\n#15 0x00006464751759dd in PortalRun (portal\u003dportal@entry\u003d0x6464a04ad358, count\u003dcount@entry\u003d9223372036854775807, isTopLevel\u003disTopLevel@entry\u003dtrue, run_once\u003drun_once@entry\u003dtrue, dest\u003ddest@entry\u003d0x6464a0567308, altdest\u003daltdest@entry\u003d0x6464a0567308, qc\u003d0x7fff171203e0) at pquery.c:975\n#16 0x000064647517025e in exec_simple_query (query_string\u003d0x6464a04138c8 \"WITH ins AS (INSERT INTO rep_order_assert VALUES (1),(1) RETURNING v) SELECT v FROM ins ORDER BY v;\") at postgres.c:2008\n#17 0x0000646475172a87 in PostgresMain (dbname\u003d\u003coptimized out\u003e, username\u003d\u003coptimized out\u003e) at postgres.c:5933\n#18 0x00006464750a4aab in BackendRun (port\u003d0x6464a044eec0) at postmaster.c:5095\n#19 BackendStartup (port\u003d0x6464a044eec0) at postmaster.c:4805\n#20 ServerLoop () at postmaster.c:2107\n#21 0x00006464750a5a8b in PostmasterMain (argc\u003dargc@entry\u003d7, argv\u003dargv@entry\u003d0x6464a040cee0) at postmaster.c:1750\n#22 0x0000646474bd9f3d in main (argc\u003d7, argv\u003d0x6464a040cee0) at main.c:260\n\n* Cover sorted GatherSingle in the WITH regression\n\nMove the replicated writable-CTE case into the existing WITH test and\nreuse its replicated table. Add one EXPLAIN (COSTS OFF) with captured\nexpected output, retaining both the ordered result and unsorted control.\nRemove the standalone test and its separate serial schedule entry.\n\nThe tested query path is:\n  WITH ins AS (INSERT INTO t_w_cte_relp VALUES (1),(1) RETURNING a)\n  SELECT a FROM ins ORDER BY a;\n\nValidation: the extracted block passed pg_regress (1/1), and its output\nmatched the new block in a full WITH run byte for byte. Existing fixture\nand resource-output differences in that full run are left unchanged.\n\n* Update optimizer expected output for sorted GatherSingle CTE\n\nThe optimizer regression runs the same with.sql against with_optimizer.out.\nIts newly added replicated-CTE block explicitly sets optimizer\u003doff, so this\nvariant must contain the captured PostgreSQL plan and result rows too.\nAdd that missing block without adding another SQL case or EXPLAIN.\n\nThe existing regression query is:\n  WITH ins AS (INSERT INTO t_w_cte_relp VALUES (1),(1) RETURNING a)\n  SELECT a FROM ins ORDER BY a;\n\nValidation: the added block matches the previously captured and passing\npg_regress result byte for byte; expected-file selection and the optimizer\nGUC gate were checked in the harness/planner sources. diff --check passes."
    },
    {
      "commit": "91443d5cfc3112fd5a9739a02c0558fccb1c0ebe",
      "tree": "f18501c57bf1bbe4970ff97819e385116a163e08",
      "parents": [
        "925f82888c9811931b452cceadf1cbbf6f5f11a0"
      ],
      "author": {
        "name": "Andrey Sokolov",
        "email": "sokolov.andrey.yurevich@gmail.com",
        "time": "Fri Nov 20 15:51:07 2026 +0300"
      },
      "committer": {
        "name": "Dianjin Wang",
        "email": "wangdianjin@gmail.com",
        "time": "Sat Nov 21 09:36:15 2026 +0800"
      },
      "message": "Remove unused variables\n\nFix the unused-but-set-variable warning from GCC 16\n"
    },
    {
      "commit": "925f82888c9811931b452cceadf1cbbf6f5f11a0",
      "tree": "487c9150bae81b71378a539390ce0b87acb7cf8d",
      "parents": [
        "cba3cd5fb518852faae0b8138b12c9856591861d"
      ],
      "author": {
        "name": "krylosov-aa",
        "email": "krylosov.andrew@gmail.com",
        "time": "Fri Sep 25 20:45:18 2026 +0300"
      },
      "committer": {
        "name": "Alena Rybakina",
        "email": "58230554+Alena0704@users.noreply.github.com",
        "time": "Sat Nov 21 03:11:25 2026 +0300"
      },
      "message": "Fix flaky bitmap_index_crash isolation2 test\n"
    },
    {
      "commit": "cba3cd5fb518852faae0b8138b12c9856591861d",
      "tree": "ac171959f8d4fa62beb40ce4482c81a890fdced6",
      "parents": [
        "935af7475a5a5c1027455769d7c05b49121892b4"
      ],
      "author": {
        "name": "Vladislav Shchetinin",
        "email": "45269644+Vlasdislav@users.noreply.github.com",
        "time": "Fri Nov 20 20:00:42 2026 +0300"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Fri Nov 20 17:00:42 2026 +0000"
      },
      "message": "Run gp_distribution_policy regression tests in CI"
    },
    {
      "commit": "935af7475a5a5c1027455769d7c05b49121892b4",
      "tree": "d7685e7162417831acc4589b446692323807ff9f",
      "parents": [
        "c88c43d018857cf1bebb4c8a448f145ab30555a4"
      ],
      "author": {
        "name": "nix-oss",
        "email": "spacex.h.6000@gmail.com",
        "time": "Tue Aug 18 17:16:38 2026 +0000"
      },
      "committer": {
        "name": "Dianjin Wang",
        "email": "wangdianjin@gmail.com",
        "time": "Fri Nov 20 15:57:11 2026 +0800"
      },
      "message": "Fix gpexpand tablespace detection with string/int OID mismatch\n\nPreviously, gpexpand compared tablespace OIDs returned as strings by\nos.listdir() against integer keys from the pg_tablespace query, so the\nchecks always evaluated to False. This skipped tablespace template\ngeneration and left broken symlinks on new segments.\n\n- read_tablespace_file() now casts the OID to int before the lookup\n- generate_tablespace_inputfile() now casts the OID to int before the\n  lookup\n- generate_tablespace_inputfile() now skips entries in pg_tblspc without\n  a pg_tablespace row instead of raising KeyError\n- Added unit tests covering both methods, including an entry in pg_tblspc\n  without a matching pg_tablespace row\n\nFixes #1885\n"
    },
    {
      "commit": "c88c43d018857cf1bebb4c8a448f145ab30555a4",
      "tree": "e61f118238a955b76b5c59cca9eb3b684776457b",
      "parents": [
        "ef06fd86abe61304510eb3ce0ccec6238d10eec4"
      ],
      "author": {
        "name": "reshke",
        "email": "reshke@double.cloud",
        "time": "Mon Nov 16 12:38:27 2026 +0500"
      },
      "committer": {
        "name": "Dianjin Wang",
        "email": "wangdianjin@gmail.com",
        "time": "Fri Nov 20 13:38:24 2026 +0800"
      },
      "message": "Fix flaky row-placement checks in distribution policy regression\n\nThe random-to-random REORGANIZE check can fail in CI with:\n\n  select check_redistributed(\u0027alter table t_reorganize set with\n    (reorganize\u003dtrue) distributed randomly\u0027, \u0027t_reorganize\u0027, \u0027t_reorganize\u0027);\n  expected: t\n  actual:   f\n\nThe helper compares only (gp_segment_id, count(*)), so moving rows between\nsegments can leave the compared counts unchanged. Compare each row and\nits segment instead, using EXCEPT ALL to preserve row multiplicities.\nThe fixture has 1000 distinct b values, making an entirely unchanged\nrandom placement negligible rather than merely requiring different counts.\n\nTruncate the INSERT targets before testing with forced redistribution.\nRecreating existing tables fails and leaves their earlier rows in place,\nwhich could make the helper report redistribution just because the row\ncount doubled. Keep the core and PAX test copies in sync.\n"
    },
    {
      "commit": "ef06fd86abe61304510eb3ce0ccec6238d10eec4",
      "tree": "f2d81abfc4d535527a26d99952957bcca39b79e4",
      "parents": [
        "1c48a582e71c54ee00168ed7d2f5046635ac1c85"
      ],
      "author": {
        "name": "liuxiaoyu",
        "email": "45345701+MisterRaindrop@users.noreply.github.com",
        "time": "Fri Nov 20 11:47:16 2026 +0800"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Fri Nov 20 11:47:16 2026 +0800"
      },
      "message": "Add the datalake gRPC contract (#2071)\n\nDefine the shared protocol between datalake_fdw and datalake_agent\nbefore implementing either side. Add Iceberg table operations, catalog\nand namespace management, and messages for scan fragments, written\nfiles and pushed-down predicates.\n\nPin operations to table UUIDs, metadata locations and baseline\nsnapshots. Specify optional-field semantics, exact 64-bit values,\ncredential handling, version negotiation, retry behavior and commit\noutcomes. Stream rewrite groups in both directions.\n\nDocument the mapping to IcebergMetaEngine and the rules for protocol\ncompatibility. Add CI checks that run the C++ and Java gRPC generators\nwith fatal warnings and validate the generated Java package.\n\nCloses #2010."
    },
    {
      "commit": "1c48a582e71c54ee00168ed7d2f5046635ac1c85",
      "tree": "19da0762fd32f9301e3b6c6afe867ac400367193",
      "parents": [
        "0d06a15100370922fa8841cb7b3ec26ea3fed8b2"
      ],
      "author": {
        "name": "Artur Nasretdinov",
        "email": "130306551+aartchik@users.noreply.github.com",
        "time": "Fri Nov 20 01:58:13 2026 +0300"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Thu Nov 19 22:58:13 2026 +0000"
      },
      "message": "Fix gzip external table reads (#2338)\n\nFix backend crashes when reading gzip files through file:// external tables.\n\nDecoder memory can be allocated in the memory context of a single CSV record. Resetting that context frees memory that the decoder still references. On the tested revision, this caused SIGABRT with double free or corruption when finishing decompression.\n\nThe fix switches to the scan\u0027s copycontext while reading external data, so decoder allocations survive per-row context resets. PG_FINALLY restores the caller\u0027s memory context on both success and error paths.\n\n---------\n\nCo-authored-by: Artur Nasredinov \u003carturnasredin@yandex-team.ru\u003e\nCo-authored-by: Leonid \u003c63977577+leborchuk@users.noreply.github.com\u003e"
    },
    {
      "commit": "0d06a15100370922fa8841cb7b3ec26ea3fed8b2",
      "tree": "a788c4e5fe8fd985ac3f2245ffe99e348304a030",
      "parents": [
        "1acd925c4e847c3bfeaec19d348c252be0e1edb8"
      ],
      "author": {
        "name": "Leonid Borchuk",
        "email": "xifos@yandex-team.ru",
        "time": "Thu Nov 19 13:26:49 2026 +0300"
      },
      "committer": {
        "name": "Leonid",
        "email": "63977577+leborchuk@users.noreply.github.com",
        "time": "Thu Nov 19 23:45:37 2026 +0300"
      },
      "message": "Fix stale shared snapshot DSM handle on error\n\nupdateSharedLocalSnapshot() unpinned the old shared snapshot DSM\nsegment before creating the replacement.  If dsm_create() failed,\ne.g. with \"No space left on device\" when /dev/shm is exhausted or\n\"too many dynamic shared memory segments\", the old segment was\nalready destroyed while the slot still held its handle.\n\nThe next snapshot growth in the same session then failed with\n\"cannot unpin unknown segment handle\", and at backend exit\nSharedSnapshotRemove() raised the same error from ProcKill() as\nFATAL, which made the postmaster reset the whole cluster.\n\nCreate, pin and publish the new segment first and unpin the old one\nonly afterwards, so an allocation error leaves the slot pointing to\na valid segment.\n\nAdd a fault injection point before dsm_create(), and one at the end\nof SharedSnapshotRemove() so that a test can wait until an exiting\nbackend has released its slot.  Add an isolation2 test that simulates\nthe failure and checks that the session keeps working afterwards and\nthat the slot is released cleanly at exit, both after a successful\nretry and directly after the error.\n\nSee: https://github.com/apache/cloudberry/issues/2165\n\nCo-authored-by: Alena Rybakina \u003c58230554+Alena0704@users.noreply.github.com\u003e\nCo-Authored-By: Claude Opus 5.5 \u003cnoreply@anthropic.com\u003e\n"
    },
    {
      "commit": "1acd925c4e847c3bfeaec19d348c252be0e1edb8",
      "tree": "f5b7d7defb6e66423a06f87998a6ecf3068b1db3",
      "parents": [
        "3af0a1e124b4d896d7339d1b4e5b8b5bb91a91db"
      ],
      "author": {
        "name": "Alena Rybakina",
        "email": "alenka.rybakina@gmail.com",
        "time": "Mon Nov 16 21:48:32 2026 +0300"
      },
      "committer": {
        "name": "Alena Rybakina",
        "email": "58230554+Alena0704@users.noreply.github.com",
        "time": "Thu Nov 19 19:51:13 2026 +0300"
      },
      "message": "Use ASF license headers for custom statistics tests\n"
    },
    {
      "commit": "3af0a1e124b4d896d7339d1b4e5b8b5bb91a91db",
      "tree": "7d3d56da34491fbbce6ef1b37f32c6c777f472dc",
      "parents": [
        "2447ab10bfb11877615d98e483192e50f6536a1d"
      ],
      "author": {
        "name": "Alena Rybakina",
        "email": "alenka.rybakina@gmail.com",
        "time": "Mon Nov 16 21:37:01 2026 +0300"
      },
      "committer": {
        "name": "Alena Rybakina",
        "email": "58230554+Alena0704@users.noreply.github.com",
        "time": "Thu Nov 19 19:51:13 2026 +0300"
      },
      "message": "Fix const correctness when writing statistics payload lengths\n"
    },
    {
      "commit": "2447ab10bfb11877615d98e483192e50f6536a1d",
      "tree": "37e8543dbcf50bcb5451231b2fd4b780ae54e692",
      "parents": [
        "0bf0613a17c7ea569c1e345149e1c238d90e12c0"
      ],
      "author": {
        "name": "Alena Rybakina",
        "email": "alenka.rybakina@gmail.com",
        "time": "Sun Nov 01 16:00:15 2026 +0300"
      },
      "committer": {
        "name": "Alena Rybakina",
        "email": "58230554+Alena0704@users.noreply.github.com",
        "time": "Thu Nov 19 19:51:13 2026 +0300"
      },
      "message": "Fix custom statistics startup, persistence, and registration\n\nUse the reserved shared memory block for fixed custom kinds instead of\nallocating it a second time. Frame persisted entries with their payload\nlength so removing a provider skips only its entries, while malformed\nor incompatible payloads still invalidate the statistics file. Advance\nthe statistics file format for the new framing.\n\nReject case-insensitive custom-name collisions with built-in as well as\ncustom kinds. Document provider removal and the shared name namespace.\n\nTest nonzero fixed, hash-keyed and named custom values across clean\nrestart, preservation of relation/database/WAL/resource-queue statistics\nwithout the provider, malformed payload rejection, and name collisions.\n\nValidation: assert-enabled macOS build and 25 assertions across the two\nrestart TAP tests. Local compiler overrides cover existing warnings in\nunrelated code.\n\nAssisted-by: ChatGPT\n"
    },
    {
      "commit": "0bf0613a17c7ea569c1e345149e1c238d90e12c0",
      "tree": "0c42d46a9178faf40819c3461cf6590c0ea9fdcb",
      "parents": [
        "ff562f464c05d13441e82cc421c7b0562e90df4c"
      ],
      "author": {
        "name": "Alena Rybakina",
        "email": "alenka.rybakina@gmail.com",
        "time": "Fri Oct 09 17:38:36 2026 +0300"
      },
      "committer": {
        "name": "Alena Rybakina",
        "email": "58230554+Alena0704@users.noreply.github.com",
        "time": "Thu Nov 19 19:51:13 2026 +0300"
      },
      "message": "Keep segment OID-reuse statistics warnings in the server log\n\nDistributed CREATE can encounter the same existing statistics entry on\nevery QE. Use LOG_SERVER_ONLY on executors while retaining WARNING on\nthe coordinator and utility connections. The counter reset is unchanged.\n\nValidated OID reuse on a coordinator and three primary segments: one\nclient warning, executor diagnostics only in server logs, and counters\nreset on every instance.\n"
    },
    {
      "commit": "ff562f464c05d13441e82cc421c7b0562e90df4c",
      "tree": "3c692bab1c6158a4f23725f704be08acac045eb6",
      "parents": [
        "5c05ab256341bde197e9cf1167790a57e7b58141"
      ],
      "author": {
        "name": "Alena Rybakina",
        "email": "alenka.rybakina@gmail.com",
        "time": "Thu Oct 08 00:00:00 2026 +0300"
      },
      "committer": {
        "name": "Alena Rybakina",
        "email": "58230554+Alena0704@users.noreply.github.com",
        "time": "Thu Nov 19 19:51:13 2026 +0300"
      },
      "message": "Allow custom statistics resets to preserve entry metadata\n\nAdd an optional reset_data_cb for variable-numbered statistics kinds.\nCall it under the existing entry lock before resetting the timestamp.\nKinds without the callback retain the existing zero-fill behavior.\n"
    },
    {
      "commit": "5c05ab256341bde197e9cf1167790a57e7b58141",
      "tree": "09b4cc52e2ea4a3ee1dec65f4a4e073a0b275726",
      "parents": [
        "2badad1c55682c2dc80470b831a8f224121c0f00"
      ],
      "author": {
        "name": "Alena Rybakina",
        "email": "alenka.rybakina@gmail.com",
        "time": "Thu Oct 01 17:18:19 2026 +0300"
      },
      "committer": {
        "name": "Alena Rybakina",
        "email": "58230554+Alena0704@users.noreply.github.com",
        "time": "Thu Nov 19 19:51:13 2026 +0300"
      },
      "message": "Preserve Cloudberry statistics persistence with pluggable kinds\n\nKeep resource queue statistics across clean restarts by enabling\nwrite_to_file for the Cloudberry resqueue kind, and cover persistence\nwith a restart TAP test. Advance the statistics file format identifier\nfor the pluggable statistics layout.\n"
    },
    {
      "commit": "2badad1c55682c2dc80470b831a8f224121c0f00",
      "tree": "f5c5a90ad6d0c458aae3c3a2d8eec52d531a6f81",
      "parents": [
        "259099e6bacc759e853afd4adda21c49288501da"
      ],
      "author": {
        "name": "Michael Paquier",
        "email": "michael@paquier.xyz",
        "time": "Fri Jul 25 11:17:48 2025 +0900"
      },
      "committer": {
        "name": "Alena Rybakina",
        "email": "58230554+Alena0704@users.noreply.github.com",
        "time": "Thu Nov 19 19:51:13 2026 +0300"
      },
      "message": "Lower bounds related to pgstats kinds\n\nThis commit changes stats kinds to have the following bounds, making\ntheir handling in core cheaper by default:\n- PGSTAT_KIND_CUSTOM_MIN 128 -\u003e 24\n- PGSTAT_KIND_MAX 256 -\u003e 32\n\nThe original numbers were rather high, and showed an impact on\nperformance in pgstat_report_stat() for the case of simple queries with\nits early-exit path if there are no pending statistics to flush.  This\nlogic will be improved more in a follow-up commit to bring the\nperformance of pgstat_report_stat() on par with v17 and older versions.\nLowering the bounds is a change worth doing on its own, independently of\nthe other improvement.\n\nThese new numbers should be enough to leave some room for the following\nyears for built-in and custom stats kinds, with stable ID numbers.  At\nleast that should be enough to start with this facility for extension\ndevelopers.  It can be always increased in the tree depending on the\nrequirements wanted.\n\nPer discussion with Andres Freund and Bertrand Drouvot.\n\nDiscussion: https://postgr.es/m/eb224uegsga2hgq7dfq3ps5cduhpqej7ir2hjxzzozjthrekx5@dysei6buqthe\nBackpatch-through: 18\n\nCloudberry: the injection_points test module does not exist here, so its\npart of the change is left out.\n\n(cherry picked from commit ac000fca743eff923d1feb4bc722d905901ae540)\n"
    },
    {
      "commit": "259099e6bacc759e853afd4adda21c49288501da",
      "tree": "0b59e15d854813be62c02cbce68a671cad9b5626",
      "parents": [
        "03dc433fcb94d76c43fa04e66e60dd63637985a7"
      ],
      "author": {
        "name": "Michael Paquier",
        "email": "michael@paquier.xyz",
        "time": "Tue Jan 14 12:43:07 2025 +0900"
      },
      "committer": {
        "name": "Alena Rybakina",
        "email": "58230554+Alena0704@users.noreply.github.com",
        "time": "Thu Nov 19 19:51:13 2026 +0300"
      },
      "message": "Move information about pgstats kinds into its own header pgstat_kind.h\n\nThis includes all the definitions for the various PGSTAT_KIND_* values,\nthe range allowed for custom stats kinds and some macros related all\nthat.\n\nOne use-case behind this split is the possibility to use this\ninformation for frontend tools, without having to rely on pgstat.h and a\nbackend footprint.\n\nAuthor: Michael Paquier\nReviewed-by: Bertrand Drouvot\nDiscussion: https://postgr.es/m/Z24fyb3ipXKR38oS@paquier.xyz\n\nCloudberry: there are no backend statistics here (PostgreSQL 18), so\nthe sixth variable-numbered kind is PGSTAT_KIND_RESQUEUE instead of\nPGSTAT_KIND_BACKEND.\n\n(cherry picked from commit d35ea27e51c05cbe3575d50a6b99d64f20a3a742)\n"
    },
    {
      "commit": "03dc433fcb94d76c43fa04e66e60dd63637985a7",
      "tree": "7ffe553cc3cbad98bc31ab8a3d2da8e3d3c8f6ae",
      "parents": [
        "189ea761491f922eabf8eb956038ebb293cf6ca4"
      ],
      "author": {
        "name": "Michael Paquier",
        "email": "michael@paquier.xyz",
        "time": "Fri Nov 22 10:12:26 2024 +0900"
      },
      "committer": {
        "name": "Alena Rybakina",
        "email": "58230554+Alena0704@users.noreply.github.com",
        "time": "Thu Nov 19 19:51:13 2026 +0300"
      },
      "message": "Add write_to_file to PgStat_KindInfo for pgstats kinds\n\nThis new field controls if entries of a stats kind should be written or\nnot to the on-disk pgstats file when shutting down an instance.  This\naffects both fixed and variable-numbered kinds.\n\nThis is useful for custom statistics by itself, and a patch is under\ndiscussion to add a new builtin stats kind where the write of the stats\nis not necessary.  All the built-in stats kinds, as well as the two\ncustom stats kinds in the test module injection_points, set this flag to\n\"true\" for now, so as stats entries are written to the on-disk pgstats\nfile.\n\nAuthor: Bertrand Drouvot\nReviewed-by: Nazir Bilal Yavuz\nDiscussion: https://postgr.es/m/Zz7T47nHwYgeYwOe@ip-10-97-1-34.eu-west-3.compute.internal\n\nCloudberry: the injection_points test module does not exist here (it\nappeared in PostgreSQL 17), so its part of the change is left out.\n\n(cherry picked from commit c06e71d1acaf490660ed4ae5c28b3079628746b0)\n"
    },
    {
      "commit": "189ea761491f922eabf8eb956038ebb293cf6ca4",
      "tree": "666439121505257e7183d5f5d2bf3aeaf98d3d09",
      "parents": [
        "32d170027df231cbb6f672a0483f1ad860dca936"
      ],
      "author": {
        "name": "Michael Paquier",
        "email": "michael@paquier.xyz",
        "time": "Thu Sep 05 14:36:57 2024 +0900"
      },
      "committer": {
        "name": "Alena Rybakina",
        "email": "58230554+Alena0704@users.noreply.github.com",
        "time": "Thu Nov 19 19:51:13 2026 +0300"
      },
      "message": "Fix two NULL pointer dereferences when reading custom pgstats from file\n\nThere were two spots in pgstat_read_statsfile() where is was possible to\nfinish with a null-pointer-dereference crash for custom pgstats kinds:\n- When reading stats for a fixed-numbered stats entry.\n- When reading a variable stats entry with name serialization.\nFor both cases, these issues were reachable by starting a server after\nchanging shared_preload_libraries so as the stats written previously\ncould not be loaded.\n\nThe code is changed so as the stats are ignored in this case, like the\nother code paths doing similar sanity checks.  Two WARNINGs are added to\nbe able to debug these issues.  A test is added for the case of\nfixed-numbered stats with the module injection_points.\n\nOversights in 7949d9594582, spotted while looking at a different report.\n\nDiscussion: https://postgr.es/m/Ztj0Jftsn4xXuXtl@paquier.xyz\n\nCloudberry: the injection_points test module does not exist here (it\nappeared in PostgreSQL 17), so its part of the change is left out.\n\n(cherry picked from commit 341e9a05e7b4c4fb2a1e539a5073dfd0e5b46735)\n"
    },
    {
      "commit": "32d170027df231cbb6f672a0483f1ad860dca936",
      "tree": "5fd68b11cdde4d145e6a876d788d14c6841fc6bb",
      "parents": [
        "a2550a2d1ad072ae58c0f7c480582a75968b0d70"
      ],
      "author": {
        "name": "Michael Paquier",
        "email": "michael@paquier.xyz",
        "time": "Mon Aug 05 11:43:33 2024 +0900"
      },
      "committer": {
        "name": "Alena Rybakina",
        "email": "58230554+Alena0704@users.noreply.github.com",
        "time": "Thu Nov 19 19:51:13 2026 +0300"
      },
      "message": "Add helper routines to retrieve data for custom fixed-numbered pgstats\n\nThis is useful for extensions to get snapshot and shmem data for custom\ncumulative statistics when these have a fixed number of objects, so as\nthese do not need to know about the snapshot internals, aka pgStatLocal.\n\nAn upcoming commit introducing an example template for custom cumulative\nstats with fixed-numbered objects will make use of these.  I have\nnoticed that this is useful for extension developers while hacking my\nown example, actually.\n\nAuthor: Michael Paquier\nReviewed-by: Dmitry Dolgov, Bertrand Drouvot\nDiscussion: https://postgr.es/m/Zmqm9j5EO0I4W8dx@paquier.xyz\n(cherry picked from commit 2eff9e678d350882f7a4b6ec6361927c9093051c)\n"
    },
    {
      "commit": "a2550a2d1ad072ae58c0f7c480582a75968b0d70",
      "tree": "23ebd199cfb35d13efcc7e90789770f61efc3e73",
      "parents": [
        "3ca3ddc494240d93e030705d8e925b3b5e2fa9dd"
      ],
      "author": {
        "name": "Michael Paquier",
        "email": "michael@paquier.xyz",
        "time": "Sun Aug 04 19:41:24 2024 +0900"
      },
      "committer": {
        "name": "Alena Rybakina",
        "email": "58230554+Alena0704@users.noreply.github.com",
        "time": "Thu Nov 19 19:51:13 2026 +0300"
      },
      "message": "Introduce pluggable APIs for Cumulative Statistics\n\nThis commit adds support in the backend for $subject, allowing\nout-of-core extensions to plug their own custom kinds of cumulative\nstatistics.  This feature has come up a few times into the lists, and\nthe first, original, suggestion came from Andres Freund, about\npg_stat_statements to use the cumulative statistics APIs in shared\nmemory rather than its own less efficient internals.  The advantage of\nthis implementation is that this can be extended to any kind of\nstatistics.\n\nThe stats kinds are divided into two parts:\n- The in-core \"builtin\" stats kinds, with designated initializers, able\nto use IDs up to 128.\n- The \"custom\" stats kinds, able to use a range of IDs from 128 to 256\n(128 slots available as of this patch), with information saved in\nTopMemoryContext.  This can be made larger, if necessary.\n\nThere are two types of cumulative statistics in the backend:\n- For fixed-numbered objects (like WAL, archiver, etc.).  These are\nattached to the snapshot and pgstats shmem control structures for\nefficiency, and built-in stats kinds still do that to avoid any\nredirection penalty.  The data of custom kinds is stored in a first\narray in snapshot structure and a second array in the shmem control\nstructure, both indexed by their ID, acting as an equivalent of the\nbuiltin stats.\n- For variable-numbered objects (like tables, functions, etc.).  These\nare stored in a dshash using the stats kind ID in the hash lookup key.\n\nInternally, the handling of the builtin stats is unchanged, and both\nfixed and variabled-numbered objects are supported.  Structure\ndefinitions for builtin stats kinds are renamed to reflect better the\ndifferences with custom kinds.\n\nLike custom RMGRs, custom cumulative statistics can only be loaded with\nshared_preload_libraries at startup, and must allocate a unique ID\nshared across all the PostgreSQL extension ecosystem with the following\nwiki page to avoid conflicts:\nhttps://wiki.postgresql.org/wiki/CustomCumulativeStats\n\nThis makes the detection of the stats kinds and their handling when\nreading and writing stats much easier than, say, allocating IDs for\nstats kinds from a shared memory counter, that may change the ID used by\na stats kind across restarts.  When under development, extensions can\nuse PGSTAT_KIND_EXPERIMENTAL.\n\nTwo examples that can be used as templates for fixed-numbered and\nvariable-numbered stats kinds will be added in some follow-up commits,\nwith tests to provide coverage.\n\nSome documentation is added to explain how to use this plugin facility.\n\nAuthor: Michael Paquier\nReviewed-by: Dmitry Dolgov, Bertrand Drouvot\nDiscussion: https://postgr.es/m/Zmqm9j5EO0I4W8dx@paquier.xyz\n(cherry picked from commit 7949d9594582ab49dee221e1db1aa5401ace49d4)\n"
    },
    {
      "commit": "3ca3ddc494240d93e030705d8e925b3b5e2fa9dd",
      "tree": "8d4e4bf2bd059a3a5cc910cf39188287f4b79b89",
      "parents": [
        "14c40a6f38c27c1ad4060747d3cd880601944962"
      ],
      "author": {
        "name": "Michael Paquier",
        "email": "michael@paquier.xyz",
        "time": "Sun Aug 04 03:07:20 2024 +0900"
      },
      "committer": {
        "name": "Alena Rybakina",
        "email": "58230554+Alena0704@users.noreply.github.com",
        "time": "Thu Nov 19 19:51:13 2026 +0300"
      },
      "message": "Fix incorrect format placeholders in pgstat.c\n\nThese should have been switched from %d to %u in 3188a4582a8c in the\ndebugging elogs added in ca1ba50fcb6f.  PgStat_Kind should never be\nhigher than INT32_MAX, but let\u0027s be clean.\n\nIssue noticed while hacking more on this area.\n\n(cherry picked from commit 028b4b21df26fee67b3ce75c6f14fcfd3c7cf2ee)\n"
    },
    {
      "commit": "14c40a6f38c27c1ad4060747d3cd880601944962",
      "tree": "9e246aac888544e31d74aa276db33daa9f201be1",
      "parents": [
        "9c5140fa9fa0cd5d34d3f339b357a2e9ae592945"
      ],
      "author": {
        "name": "Michael Paquier",
        "email": "michael@paquier.xyz",
        "time": "Tue Jul 30 15:08:21 2024 +0900"
      },
      "committer": {
        "name": "Alena Rybakina",
        "email": "58230554+Alena0704@users.noreply.github.com",
        "time": "Thu Nov 19 19:51:13 2026 +0300"
      },
      "message": "Add more debugging information when failing to read pgstats files\n\nThis is useful to know which part of a stats file is corrupted when\nreading it, adding to the server logs a WARNING with details about what\ncould not be read before giving up with the remaining data in the file.\n\nAuthor: Michael Paquier\nReviewed-by: Bertrand Drouvot\nDiscussion: https://postgr.es/m/Zp8o6_cl0KSgsnvS@paquier.xyz\n(cherry picked from commit ca1ba50fcb6f85ac603aecbc184c7c59886c2a7c)\n"
    },
    {
      "commit": "9c5140fa9fa0cd5d34d3f339b357a2e9ae592945",
      "tree": "c4b5339509a0932ebb16a36dd2532034461cd232",
      "parents": [
        "e8f867c13c9312469dd6d51b79f58147e856e516"
      ],
      "author": {
        "name": "Michael Paquier",
        "email": "michael@paquier.xyz",
        "time": "Fri Aug 02 04:49:34 2024 +0900"
      },
      "committer": {
        "name": "Alena Rybakina",
        "email": "58230554+Alena0704@users.noreply.github.com",
        "time": "Thu Nov 19 19:51:13 2026 +0300"
      },
      "message": "Switch PgStat_Kind from an enum to a uint32 type\n\nA follow-up patch is planned to make cumulative statistics pluggable,\nand using a type is useful in the internal routines used by pgstats as\nPgStat_Kind may have a value that was not originally in the enum removed\nhere, once made pluggable.\n\nWhile on it, this commit switches pgstat_is_kind_valid() to use\nPgStat_Kind rather than an int, to be more consistent with its existing\ncallers.  Some loops based on the stats kind IDs are switched to use\nPgStat_Kind rather than int, for consistency with the new time.\n\nAuthor: Michael Paquier\nReviewed-by: Dmitry Dolgov, Bertrand Drouvot\nDiscussion: https://postgr.es/m/Zmqm9j5EO0I4W8dx@paquier.xyz\n\nCloudberry: PGSTAT_KIND_RESQUEUE is kept as the sixth variable-numbered\nkind, so the IDs of the fixed-numbered kinds are shifted by one.\n\n(cherry picked from commit 3188a4582a8ce8223fba6e08636d8aaa4cbfd29f)\n"
    },
    {
      "commit": "e8f867c13c9312469dd6d51b79f58147e856e516",
      "tree": "95ed251eb43735e93ed723c249f94316714d7f64",
      "parents": [
        "87a6946af38690a43b90f3e698e3da475ac4ab09"
      ],
      "author": {
        "name": "Michael Paquier",
        "email": "michael@paquier.xyz",
        "time": "Thu Jul 11 16:12:04 2024 +0900"
      },
      "committer": {
        "name": "Alena Rybakina",
        "email": "58230554+Alena0704@users.noreply.github.com",
        "time": "Thu Nov 19 19:51:13 2026 +0300"
      },
      "message": "Add a new \u0027F\u0027 entry type for fixed-numbered stats in pgstats file\n\nThis new entry type is used for all the fixed-numbered statistics,\nmaking possible support for custom pluggable stats.  In short, we need\nto be able to detect more easily if a stats kind exists or not when\nreading back its data from the pgstats file without a dependency on the\norder of the entries read.  The kind ID of the stats is added to the\ndata written.\n\nThe data is written in the same fashion as previously, with the\nfixed-numbered stats first and the dshash entries next.  The read part\nbecomes more flexible, loading fixed-numbered stats into shared memory\nbased on the new entry type found.\n\nBump PGSTAT_FILE_FORMAT_ID.\n\nReviewed-by: Bertrand Drouvot\nDiscussion: https://postgr.es/m/Zot5bxoPYdS7yaoy@paquier.xyz\n(cherry picked from commit 9e4664d950c125a1ff7bb29cd1593ca37f8b0c01)\n"
    },
    {
      "commit": "87a6946af38690a43b90f3e698e3da475ac4ab09",
      "tree": "114dda1b6c301dbef736af495b375ab55eee62cb",
      "parents": [
        "71a67dc2933fc14c5920284f04e16ebf5abee963"
      ],
      "author": {
        "name": "Michael Paquier",
        "email": "michael@paquier.xyz",
        "time": "Thu Jul 11 09:21:40 2024 +0900"
      },
      "committer": {
        "name": "Alena Rybakina",
        "email": "58230554+Alena0704@users.noreply.github.com",
        "time": "Thu Nov 19 19:51:13 2026 +0300"
      },
      "message": "Add PgStat_KindInfo.init_shmem_cb\n\nThis new callback gives fixed-numbered stats the possibility to take\nactions based on the area of shared memory allocated for them.\n\nThis removes from pgstat_shmem.c any knowledge specific to the types\nof fixed-numbered stats, and the initializations happen in their own\nfiles.  Like b68b29bc8fec, this change is useful to make this area of\nthe code more pluggable, so as custom fixed-numbered stats can take\nactions after their shared memory area is initialized.\n\nReviewed-by: Bertrand Drouvot\nDiscussion: https://postgr.es/m/Zot5bxoPYdS7yaoy@paquier.xyz\n(cherry picked from commit 21471f18e9d9aa3383314ed8bc9163bc369109ae)\n"
    },
    {
      "commit": "71a67dc2933fc14c5920284f04e16ebf5abee963",
      "tree": "f969810245003ba74949bc159bf3d51cf3ec70ea",
      "parents": [
        "1743255a6eefeb9463a6772fd6a72b2fe2b41346"
      ],
      "author": {
        "name": "Michael Paquier",
        "email": "michael@paquier.xyz",
        "time": "Tue Jul 09 10:27:12 2024 +0900"
      },
      "committer": {
        "name": "Alena Rybakina",
        "email": "58230554+Alena0704@users.noreply.github.com",
        "time": "Thu Nov 19 19:51:13 2026 +0300"
      },
      "message": "Use pgstat_kind_infos to write fixed shared statistics\n\nThis is similar to 9004abf6206e, but this time for the write part of the\nstats file.  The code is changed so as, rather than referring to\nindividual members of PgStat_Snapshot in an order based on their\nPgStat_Kind value, a loop based on pgstat_kind_infos is used to retrieve\nthe contents to write from the snapshot structure, for a size of\nPgStat_KindInfo\u0027s shared_data_len.\n\nThis requires the addition to PgStat_KindInfo of an offset to track the\nlocation of each fixed-numbered stats in PgStat_Snapshot.  This change\nis useful to make this area of the code more easily pluggable, and\nreduces the knowledge of specific fixed-numbered kinds in pgstat.c.\n\nReviewed-by: Bertrand Drouvot\nDiscussion: https://postgr.es/m/Zot5bxoPYdS7yaoy@paquier.xyz\n(cherry picked from commit b68b29bc8feca0eb340cb857ff1d28d4099c7878)\n"
    },
    {
      "commit": "1743255a6eefeb9463a6772fd6a72b2fe2b41346",
      "tree": "3af98d8f4245281f9e842a7d7310012347215d26",
      "parents": [
        "7d1db961e280510c9196f73a8fb63f06f4ba85e8"
      ],
      "author": {
        "name": "Michael Paquier",
        "email": "michael@paquier.xyz",
        "time": "Wed Jul 03 13:09:20 2024 +0900"
      },
      "committer": {
        "name": "Alena Rybakina",
        "email": "58230554+Alena0704@users.noreply.github.com",
        "time": "Thu Nov 19 19:51:13 2026 +0300"
      },
      "message": "Replace hardcoded identifiers of pgstats file by #defines\n\nThis changes pgstat.c so as the three types of entries that can exist in\na pgstats file are not hardcoded anymore, replacing them with\ndescriptively-named macros, when reading and writing stats files:\n- \u0027N\u0027 for named entries, like replication slot stats.\n- \u0027S\u0027 for entries identified by a hash.\n- \u0027E\u0027 for the end-of-file\n\nThis has come up while working on making this area of the code more\npluggable.  The format of the stats file is unchanged, hence there is no\nneed to bump PGSTAT_FILE_FORMAT_ID.\n\nReviewed-by: Bertrand Drouvot\nDiscussion: https://postgr.es/m/Zmqm9j5EO0I4W8dx@paquier.xyz\n(cherry picked from commit 9fd02525793f3e06c72ee0da45303c21f7067ccf)\n"
    },
    {
      "commit": "7d1db961e280510c9196f73a8fb63f06f4ba85e8",
      "tree": "4f40741bce036eb356ac06c3b558579c10f158e5",
      "parents": [
        "dd4fa0df6a4f613f3378bcfbbeee039a4492a749"
      ],
      "author": {
        "name": "Michael Paquier",
        "email": "michael@paquier.xyz",
        "time": "Mon Jul 01 14:26:25 2024 +0900"
      },
      "committer": {
        "name": "Alena Rybakina",
        "email": "58230554+Alena0704@users.noreply.github.com",
        "time": "Thu Nov 19 19:51:13 2026 +0300"
      },
      "message": "Use pgstat_kind_infos to read fixed shared statistics\n\nShared statistics with a fixed number of objects are read from the stats\nfile in pgstat_read_statsfile() using members of PgStat_ShmemControl and\nfollowing an order based on their PgStat_Kind value.\n\nInstead of being explicit, this commit changes the stats read to iterate\nover the pgstat_kind_infos array to find the memory locations to read\ninto, based on a new shared_ctl_off in PgStat_KindInfo that can be used\nto define the position of this stats kind in shared memory.  This makes\nthe read logic simpler, and eases the introduction of future\nimprovements aimed at making this area more pluggable for external\nmodules.\n\nOriginal idea suggested by Andres Freund.\n\nAuthor: Tristan Partin\nReviewed-by: Andres Freund, Michael Paquier\nDiscussion: https://postgr.es/m/D12SQ7OYCD85.20BUVF3DWU5K7@neon.tech\n(cherry picked from commit 9004abf6206e815d25b7b763c756cf97b457f3cd)\n"
    },
    {
      "commit": "dd4fa0df6a4f613f3378bcfbbeee039a4492a749",
      "tree": "aa955eb97bc3ad419cc4149020ed42138f8a45fb",
      "parents": [
        "394e7c5c6f3e365f3a0f80dfbaa3853b44de8280"
      ],
      "author": {
        "name": "Michael Paquier",
        "email": "michael@paquier.xyz",
        "time": "Mon Jul 01 09:35:36 2024 +0900"
      },
      "committer": {
        "name": "Alena Rybakina",
        "email": "58230554+Alena0704@users.noreply.github.com",
        "time": "Thu Nov 19 19:51:13 2026 +0300"
      },
      "message": "Remove PgStat_KindInfo.named_on_disk\n\nThis field is used to track if a stats kind can use a custom format\nrepresentation on disk when reading or writing its stats case.  On HEAD,\nthis exists for replication slots stats, that need a mapping between an\ninternal index ID and the slot names.\n\nnamed_on_disk is currently used nowhere and the callbacks\nto_serialized_name and from_serialized_name are in charge of checking if\nthe serialization of the stats data should apply, so let\u0027s remove it.\n\nReviewed-by: Andres Freund\nDiscussion: https://postgr.es/m/ZmKVlSX_T5YvIOsd@paquier.xyz\n(cherry picked from commit b19db55bd687af243dd1edf021ffb166e5270a06)\n"
    },
    {
      "commit": "394e7c5c6f3e365f3a0f80dfbaa3853b44de8280",
      "tree": "90aa425ebb2527bd3b344e3879ddb9d859aa3916",
      "parents": [
        "17b9673ed7c51af5e12c45f87a36cb167b3053a8"
      ],
      "author": {
        "name": "Dianjin Wang",
        "email": "wangdianjin@gmail.com",
        "time": "Wed Nov 04 18:07:08 2026 +0800"
      },
      "committer": {
        "name": "Dianjin Wang",
        "email": "wangdianjin@gmail.com",
        "time": "Thu Nov 19 21:30:04 2026 +0800"
      },
      "message": "Fix UnboundLocalError in SegmentReconfigurer\n\nreconfigure() tries to connect again until the mirrors are promoted.\nWhen the connection fails, the except block closes conn.  But when the\nfirst connection fails, conn has no value yet:\n\n  UnboundLocalError: local variable \u0027conn\u0027 referenced before assignment\n\nThe error goes out of the retry loop, so gprecoverseg and gpstart stop\nand do not wait for the promotion.  In later tries, conn is the closed\nconnection of the previous try.\n\nSet conn to None before each try, and close it only if it is set.\nNow test_unit_segment_reconfigurer passes 3 of 3, instead of 1.\n\nGreenplum fixed this as part of the change to psycopg2 (b5920e061b4).\nThat change does not apply to Cloudberry, which still uses PyGreSQL.\n\nBackpatch-through: REL_2_STABLE\nAssisted-by: Claude Code\n"
    },
    {
      "commit": "17b9673ed7c51af5e12c45f87a36cb167b3053a8",
      "tree": "05ebbf5794c937683677101052f3944939c601d9",
      "parents": [
        "b0bd0df63f971cc4b5f9100712021d4c54281be9"
      ],
      "author": {
        "name": "Dianjin Wang",
        "email": "wangdianjin@gmail.com",
        "time": "Wed Nov 04 18:07:08 2026 +0800"
      },
      "committer": {
        "name": "Dianjin Wang",
        "email": "wangdianjin@gmail.com",
        "time": "Thu Nov 19 21:30:04 2026 +0800"
      },
      "message": "CI: run gpMgmt unit tests in the Behave workflow\n\nNo CI workflow runs the Python unit tests of gpMgmt.  unittest-check\nruns only the C unit tests, and the Python tests need mock, which only\nthe Behave workflow installs (from gpMgmt/requirements-dev.txt).\n\nLet a Behave matrix entry list unittest_modules instead of\nbehave_features.  The job then runs these modules with\n\"python3 -m unittest\", with the same PYTHONPATH as\n\"make -C gpMgmt/bin unitdevel\", and reads the unittest summary for the\nresults.  The Behave entries do not change.\n\nAdd the ic-unit-segment-reconfigurer entry, which runs\ntest_unit_segment_reconfigurer.\n\nAssisted-by: Claude Code\n"
    },
    {
      "commit": "b0bd0df63f971cc4b5f9100712021d4c54281be9",
      "tree": "57e8b000be876626da403247c0c84351b0019ba9",
      "parents": [
        "d4a669dc2fb14cb5f55a4440021bc78a1dd51768"
      ],
      "author": {
        "name": "Ziming Zhang",
        "email": "38480220+protectione055@users.noreply.github.com",
        "time": "Thu Nov 19 18:48:24 2026 +0800"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Thu Nov 19 10:48:24 2026 +0000"
      },
      "message": "Fix unbounded cursor snapshot DSM retention (#2302)\n\n* Fix unbounded cursor snapshot DSM retention\n\nOverwriting a cursor snapshot dump entry loses its old DSM handle while\nDumpResOwner keeps the mapping until transaction end. Repeated dumps in\na long transaction therefore retain more DSM segments than the ring can\nreference.\n\nReuse the evicted dump\u0027s DSM when its mapped capacity is sufficient.\nOtherwise, create and populate a replacement before publishing its\nhandle\nand detaching the old mapping. The slot lock excludes readers throughout\nreplacement, and DumpResOwner releases the remaining mappings at\ntransaction end.\n\n* Fix stale cursor snapshot dumps on slot removal\n\nRemoving a shared snapshot slot leaves its cursor dump entries and ring\nposition intact. A new writer reusing the slot can therefore find an old\nDSM handle without a local mapping and fail the dump reuse assertion.\n\nClear the dump entries and reset the ring position when removing the\nslot so that its next owner starts with an empty dump ring."
    },
    {
      "commit": "d4a669dc2fb14cb5f55a4440021bc78a1dd51768",
      "tree": "266d94f971858770bb6c37035281d0bf613776a8",
      "parents": [
        "6bff6d90a6fb6f74bfafc717802d6949f10b0007"
      ],
      "author": {
        "name": "Vladislav Shchetinin",
        "email": "45269644+Vlasdislav@users.noreply.github.com",
        "time": "Thu Nov 19 11:15:46 2026 +0300"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Thu Nov 19 08:15:46 2026 +0000"
      },
      "message": "CI: run more contrib regression tests\n\nAdd the installcheck tests of fuzzystrmatch, intarray, isn, and\nunaccent to the contrib test jobs in the Rocky Linux and Debian\nworkflows. The debug workflow gets these tests in a new\n\"ic-contrib-extra\" job.\n\nThe intarray test creates the more__int table with CREATE TABLE AS\nand does not set a distribution key. Cloudberry then selects a key\nand writes a NOTICE and a HINT, which makes the expected output\nfragile. Add \"DISTRIBUTED BY (b)\" to the statement and remove the\ntwo messages from the expected output."
    },
    {
      "commit": "6bff6d90a6fb6f74bfafc717802d6949f10b0007",
      "tree": "c3bd8a0e111e0fd93bd74aeba50f88240fd5b934",
      "parents": [
        "aac2e927c96acfc145524570336f5370a233a33d"
      ],
      "author": {
        "name": "LiangChen",
        "email": "liang8283@gmail.com",
        "time": "Thu Nov 19 12:35:07 2026 +0800"
      },
      "committer": {
        "name": "Dianjin Wang",
        "email": "wangdianjin@gmail.com",
        "time": "Thu Nov 19 14:48:50 2026 +0800"
      },
      "message": "Fix gpload hiding database errors in update/merge mode\n\nWhen the UPDATE, DELETE or INSERT statement run by gpload in update or\nmerge mode failed, the error handler called\n\n    str(str(e), errors \u003d \u0027ignore\u0027)\n\nThis is a leftover of the Python 2 unicode(..., errors\u003d\u0027ignore\u0027) idiom.\nOn Python 3, str() only accepts \u0027errors\u0027 when its argument is bytes, so\nthe handler raised \"TypeError: decoding str is not supported\". The real\ndatabase error was never logged; users only saw \"unexpected error --\nbacktrace written to log file\".\n\nBoth values are already str on Python 3, so use them directly.\n\nUpdate the expected output of tests 497 (bad UPDATE_CONDITION) and 75\n(merge with non-ASCII column names), which had captured the \"unexpected\nerror\" message instead of the database error.\n"
    },
    {
      "commit": "aac2e927c96acfc145524570336f5370a233a33d",
      "tree": "8df6b22f621d6215ee2d8a5d7041a72d6f62c2e7",
      "parents": [
        "4730e4c0f35d506738730f788336ccd10b503ea6"
      ],
      "author": {
        "name": "Yuriy Grigoryev",
        "email": "allenvox@icloud.com",
        "time": "Thu Nov 19 10:56:05 2026 +0700"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Thu Nov 19 03:56:05 2026 +0000"
      },
      "message": "Feature: Manage storage server owners and comments (#2312)\n\nAdd ALTER STORAGE SERVER ... OWNER TO and COMMENT ON STORAGE SERVER.\nReuse generic owner updates while requiring SET ROLE access for ordinary\nroles and preserving the mdb_admin exception. Track owner dependencies,\nsupport REASSIGN OWNED with storage user mappings, and clean up shared\ncomments when dropping a server.\n\nAdd psql completion, SQL reference documentation and regression coverage\nfor permissions, mappings, rollback and segment metadata.\n\nSee: Issue#1299"
    },
    {
      "commit": "4730e4c0f35d506738730f788336ccd10b503ea6",
      "tree": "8acd2bd17f9dfdc6554ff8efb10a8cb3a21c131f",
      "parents": [
        "906c90b885780a7ec4d2c8992c44a2fc797e34fe"
      ],
      "author": {
        "name": "Leonid Borchuk",
        "email": "xifos@yandex-team.ru",
        "time": "Mon Nov 02 19:06:59 2026 +0300"
      },
      "committer": {
        "name": "Leonid",
        "email": "63977577+leborchuk@users.noreply.github.com",
        "time": "Wed Nov 18 17:38:52 2026 +0300"
      },
      "message": "Fix Anser transport and filter safety\n\nSquashes the review-round commits: the delivery-protocol rework, the\ndebug tracing used to diagnose it, and the single-slot QE assembly.\n\nA whole-filter push left tens of MB queued in the QD\u0027s output buffer,\nand on the UDP interconnect it was flushed only while a dispatch\nsocket was readable.  Once parts and subscribes were consumed, inbound\ntraffic stopped, flushing stopped with it, and the consumer sat in\npq_getmessage() with no deadline of its own -- an uncancellable\ndeadlock, seen as a cursor\u0027s FETCH 1 never returning.\n\nDeliver the merged payload in chunks instead, one GP_SIDEBAND_MESSAGE\neach, sending the next only when the consumer asks with a NEXT (kind\n\u0027N\u0027, its part field carrying the offset wanted).  At most one chunk --\nsized to fit the connection\u0027s send buffer -- is ever in flight, so a\nconsumer walking away leaves nothing torn behind, and every NEXT keeps\nwaking the coordinator: the delivery drives its own servicing.  Chunk\ncoordinates (total_len, offset) join the CRC, the QE assembles into\none slot and drops chunks for keys it has unsubscribed from, and the\nwait deadline runs from the last progress, with a hard cap from the\nsubscribe.  All waits use the monotonic clock.  Wire tag is anser4.\n\nAlso zero-initialises the dispatcher\u0027s buffered[] array (defensive).\n\nTrack delivery connections with libpq connection-destroy/reset events so\nInitPlan and error teardown cannot leave dangling PGconn pointers. Register\nthrough the existing internal libpq ABI; no new core hook or exported\nsymbol is required. Refuse subscriptions if registration cannot allocate.\n\nMake torn-delivery cleanup allocation-free and nonblocking, poisoning\nconnections instead of waiting during error handling. Add a standalone\nconnection-event test covering destruction, reset, registration failure,\nother event users, and preservation of merged payloads.\n\nValidation: connection-event tests pass with -O3 -DNDEBUG and ASan/UBSan;\nchanged C sources pass syntax checks. Cluster regressions remain pending.\n\nNormalize by-value Bloom keys to their physical width so heap and AOCO\nrepresentations agree in producers, consumers, and scan qualifications.\nApply narrow-key filters before projection independently of core scan-key\npushdown, preserving original quals and avoiding duplicate EXPLAIN counts.\n\nShare equality checks, key descent policies, join-side safety, child-plan\niteration and replacement, and filter-node scaffolding with RPT. Keep\nallocation and PostgreSQL error contracts explicit at the C/C++ boundary.\n\nEvaluate each maximum-plan-ID subtree once, including child lists and\nSubPlans. Release accumulated payloads immediately on every cancellation\npath instead of retaining them until the enclosing executor ends.\n\nValidation: six native Anser tests pass, including helper contracts,\n-O0 traversal counts, Datum normalization, and cancellation ownership.\nChanged sources compile. Cluster regressions remain pending.\n\nAllocate native-test child containers by their actual node sizes; a\nCustomScan-sized allocation is too small for MergeAppend. Preserve\nERROR\u0027s non-returning behavior in the cancellation fixture\u0027s log stub.\n\nAdd localcheck for strict GCC/Clang compilation and ASan/UBSan native\nruns, keeping build flags and artifacts isolated. Local GCC 15 reproduces\nthe original allocation diagnostic. All 18 native test runs and 20\nproduction-source compilation checks pass.\n"
    },
    {
      "commit": "906c90b885780a7ec4d2c8992c44a2fc797e34fe",
      "tree": "cef1a8d9a888f6b3c93001ea9ac3db9eaf05cf89",
      "parents": [
        "6273f0f30787d928785c5f026215f09410d72194"
      ],
      "author": {
        "name": "Leonid Borchuk",
        "email": "xifos@yandex-team.ru",
        "time": "Mon Nov 02 19:04:25 2026 +0300"
      },
      "committer": {
        "name": "Leonid",
        "email": "63977577+leborchuk@users.noreply.github.com",
        "time": "Wed Nov 18 17:38:52 2026 +0300"
      },
      "message": "Fix recycling connections with unflushed output\n\nA QE connection whose output buffer still holds bytes at cleanup\ntime carries a partially delivered asynchronous payload (an Anser\nsideband message; normal command traffic is fully flushed before\ncleanup).  The peer may already have read a prefix of it, and\nnobody flushes the rest once the command is over --\ncheckDispatchResult only flushes connections whose command is\nstill running.  Reusing such a connection makes the next dispatch\noverwrite the remainder of the buffer (PQsendGpQuery_shared), and\nthe peer then misreads its stream.\n\nHave cleanupQE decline to recycle any connection with pending\noutput, so the next dispatch builds a fresh one.\n"
    },
    {
      "commit": "6273f0f30787d928785c5f026215f09410d72194",
      "tree": "d3ca06612841a612e684eccac5d8374e028c116d",
      "parents": [
        "a8617af71a3dfd64295a53f4ed7b9ba950c25809"
      ],
      "author": {
        "name": "Leonid Borchuk",
        "email": "xifos@yandex-team.ru",
        "time": "Fri Oct 16 17:21:04 2026 +0300"
      },
      "committer": {
        "name": "Leonid",
        "email": "63977577+leborchuk@users.noreply.github.com",
        "time": "Wed Nov 18 17:38:52 2026 +0300"
      },
      "message": "Fix Anser defects found in review and CI\n\nA blocking push stranded the dispatcher uncancellably when a consumer\nhad timed out: deliver without blocking, and let a consumer withdraw.\n\nAnserSliceProducers counted a singleton reader and direct dispatch as\nthe whole cluster, so the channel never completed.\n\nA producer whose slice ran but whose node never did stayed silent,\nleaving consumers to wait out the deadline.\n\nA consumer ignored QueryFinishPending, so a query the coordinator had\nalready finished -- a LIMIT satisfied early -- still sat out the full\ndeadline.  CHECK_FOR_INTERRUPTS does not cover that flag.\n\nInjection is now refused when the build and probe sides share a slice.\nSlices are divided by Motions only, so a co-located join offers no\nsynchronisation point to hang the exchange on and no network cost to\nsave against the filter\u0027s own.  probe_slice already carried the answer\nbut was never read, and was left uninitialized on one path.\n\nChannel cleanup is wholesale, and inside SPI the executor nesting level\nnever returns to zero, so a PL/pgSQL body held one merged filter per\nstatement until the outermost one ended -- about 1 MB a query, and up to\nthe full anser.max_info_size.  A query now takes its own channels with\nit, keyed by the command count the channel already carries.  Only\nfinished ones: gp_command_count names the newest query descriptor rather\nthan the one that is ending, and the two differ whenever a portal has\noutlived the statements that ran after it.\n\nPlanning joins that nesting level too.  Constant folding can run a query\nthrough SPI, and that query reached ExecutorEnd believing it was the\noutermost one -- the split counter PostgreSQL merged in 76db9cb6368.\n\nThe anser.timeout_ms default drops from 100 s to 10 s.  Its rationale\nhad outlived itself: delivery no longer blocks, so a wide slice no\nlonger needs the headroom it was sized for.  The help text said\notherwise, in four places.\n\nHash keys are now checked on the base type and against the type\u0027s own\nequality operator.  A domain inherits typlen and typbyval, so a domain\nover float8 passed both the by-value test and a float exclusion that\nnames only the built-in OIDs -- and -0.0 would have stopped matching\n0.0, dropping rows that join.\n\nThe anser_test harness moves to a library of its own.  It was linked\ninto anser.so, which every user preloads, and its extension shipped with\nthe subsystem; it now builds only for installcheck.  It resolves the\nC API against the preloaded library at load time, which is what the\nPGDLLEXPORT markers on the public headers were for.\n\nTests move to redistributed joins to match the Motion rule.  The\nparallel section had also been running on the 1 ms deadline left over\nfrom the preceding block, which let it pass without a filter ever\narriving; that block has since moved out of the file altogether.  It\nkeeps its coverage under GPORCA only, since the Postgres planner marks\nMotion paths parallel-unsafe.\n\nThe catversion bump is withdrawn.  The CustomScan serialization fix\nreaches only outfast/readfast, the binary format the dispatcher uses;\nthe text branch that nodeToString writes into catalogs is untouched, and\na CustomScan is a Plan node, which catalogs never store anyway.\n\nconfigure-cloudberry.sh no longer passes --with-anser unconditionally,\nwhich had put the extension into every CI and release build despite the\nconfigure default of no.  The ic-anser job does not need it: the\ngpcontrib/anser target builds, installs and preloads the extension\nitself, so the matrix entry no longer arms the cluster either -- and the\npostgres_conf_addons hook added for that is gone with it.\n\nanser_test carries its own PG_MODULE_MAGIC.  It had been relying on the\none in anserinit.c, which stopped covering it when it became a library\nof its own.\n\nanser.max_info_size is synced to the segments.  Both ends read it, and\na segment hands it to pq_getmessage() as the cap on the message it is\nabout to read, so a disagreement does not merely size things\ndifferently -- it frames the wire differently.  Without the flag a gang\ncreated after the SET fell back to the compiled-in default.  Syncing\nnarrows that window rather than closing it, since a gang busy with an\nopen cursor is never sent the SET, so a read that overruns the cap now\nterminates the connection instead of going on: pq_getmessage takes the\nlength word and leaves the body behind, and a message boundary cannot\nbe recovered from there.  The README said POSTMASTER where the code\nsaid USERSET, and now says what the trade-off is.\n\nSHLIB_PREREQS is dropped.  Anser links nothing and only reads libpq\u0027s\nheaders, and under PGXS the prerequisite expands to \"make -C $(libdir)\nall\", for which there is no such target.\n\npreload-anser no longer mistakes tr\u0027s exit status for psql\u0027s: a psql\nthat failed left the list empty, and the recipe then wrote\nshared_preload_libraries back as just anser, dropping every other\nlibrary.  It also leaves the cluster alone when it is already armed\ninstead of restarting on every installcheck.\n\nThe cases that need gp_inject_fault move to anser_faults.  The\nregression driver already excludes a file that calls one when the debug\nextensions are off -- faultinjector_prep in src/Makefile.global.in --\nso sharing a file with them took the rest of anser_runtime_filter down\nas well.\n\nThe TAP helper uses pg_hton32 rather than htonl and so no longer needs\n\u003carpa/inet.h\u003e, which MSVC does not have.\n\nThe fold no longer touches the part header.  It incremented total_parts\nonce per fold, but a producer already writes the channel\u0027s producer\ncount there, so a merged header carried 2N-1 -- which is N only when N\nis 1, and that is the shape the one test covering it pinned.  The number\nis what a consumer reports and what the log prints when a filter goes\nmissing, so it was wrong exactly where someone would be reading it.  A\nunit test now folds three parts, where N and 2N-1 differ; it needs no\ncluster and runs from installcheck.\n\nanser.max_info_size stops at what the protocol can carry.  The bound was\nINT_MAX, so a large setting overflowed the pq_getmessage() cap computed\nfrom it into a negative int and every delivery was then refused -- and\nanything past PQ_LARGE_MESSAGE_LIMIT could never have been read in the\nfirst place.  The frame around the payload has a name now rather than\nbeing spelled out at the single place that needed it.\n\nThe outer-join case in anser_multijoin produces NULL keys at last.  Its\nright side held every key the left could offer, and the join above it is\nstrict in that key, so reduce_outer_joins() made the LEFT JOIN an inner\none before any path was considered.  It now joins a table with gaps,\nthrough a subquery that keeps the reduction from applying.  The tables\nthe chains rest on are left alone: thinning one of those would have cost\neighteen assertions to fix one.\n\nNo filter reaches that join, and none can.  Keeping the outer join costs\na SubqueryScan, which the key walk does not descend through, and there\nis no way around it: a NULL-keyed row survives only under an outer join,\nan outer join survives only behind a subquery boundary.  The block says\nso now, and checks what it can -- that such a plan returns the same rows\nwith the filter on and off.\n\nThe pushdown cases say whether anything was injected.  They compared a\nfiltered count against an unfiltered one, which also agree when no\nfilter was ever built -- and the computed-key case turns out to be one\nof those: its subquery is pulled up, the hash clause becomes an\nexpression, and anser_hashjoin_keys takes plain Vars only.  The comment\nclaiming otherwise is corrected rather than the behaviour.\n\nEvery GUC a test pins is reset at the end of it.  Three files out of\nfour left one behind, and anser_faults all five.\n\nSmaller things: send_fake_sideband_message() checks what pqPutnchar()\nreturns; the nextval reply no longer serializes uninitialized locals on\nits error path, where a QE reads overflow before error and would report\nreaching a sequence\u0027s maximum rather than the real failure; the\ncondition key\u0027s zero-padding is written down beside the struct that\nrequires it; and the comments naming AnserBloomShapeFor,\nAnserChannelLock and anser_rf_size now name things that exist.\n\nconfigure is regenerated for --with-anser.\n\nCo-Authored-By: Claude Opus 5 \u003cnoreply@anthropic.com\u003e\n"
    },
    {
      "commit": "a8617af71a3dfd64295a53f4ed7b9ba950c25809",
      "tree": "1b2783ad85b4ab65dd55938b83281fdd7d895829",
      "parents": [
        "085776a5645743447c38d1a52c0ad388aa062890"
      ],
      "author": {
        "name": "Leonid Borchuk",
        "email": "xifos@yandex-team.ru",
        "time": "Thu Oct 15 14:00:05 2026 +0300"
      },
      "committer": {
        "name": "Leonid",
        "email": "63977577+leborchuk@users.noreply.github.com",
        "time": "Wed Nov 18 17:38:52 2026 +0300"
      },
      "message": "Fix four ways Anser could drop rows or hang a session\n\nA filter that is a subset of the build side\u0027s keys rejects rows that\njoin, so every one of these is a wrong answer rather than a slow one.\n\nA build side under a nested loop yields different keys per outer tuple,\nbut neither node rebuilds on rescan: the producer stays published and\nthe consumer keeps the filter it has, so the second iteration is probed\nagainst the first iteration\u0027s keys.  Refuse such a join at injection\ntime, by intersecting the loop\u0027s nestParams with the build subtree\u0027s\nextParam -- the same test UpdateChangedParamSet makes at runtime.\n\nCleanup was scoped by counting ExecutorEnd, which only ever measures\nrecursion into ExecutorEnd itself.  A statement run through SPI from a\nfunction body goes through its whole Start/Run/End inside the outer\nquery\u0027s Run, so its End looked outermost and took the running query\u0027s\nchannels with it.  Count over execution instead, as auto_explain does.\n\nTwo readers share the QD-\u003eQE connection, and the nextval one died on a\nsideband message: it took the type byte, then errored without the body,\nleaving the stream desynchronised and the session unusable.  It now\nskips one whole and waits on, and Anser no longer subscribes when it\nhas no deadline to wait out.\n\nThe coordinator could also leave a QE\u0027s notification unread for the\nwhole lifetime of the slice that sent it, because PQisBusy() reports\nthe command rather than the queued message, and the bytes may already\nhave been absorbed by a flush.  Drain before deciding to wait.\n\nCo-Authored-By: Claude Opus 5 \u003cnoreply@anthropic.com\u003e\n"
    },
    {
      "commit": "085776a5645743447c38d1a52c0ad388aa062890",
      "tree": "d3c0edf3aa32185c7145aabfeceea38c680e51bc",
      "parents": [
        "98fab3db9c2aa1ffa7a4a1c4693aa8f2da27a61a"
      ],
      "author": {
        "name": "Leonid Borchuk",
        "email": "xifos@yandex-team.ru",
        "time": "Thu Oct 15 13:59:40 2026 +0300"
      },
      "committer": {
        "name": "Leonid",
        "email": "63977577+leborchuk@users.noreply.github.com",
        "time": "Wed Nov 18 17:38:52 2026 +0300"
      },
      "message": "Export Anser\u0027s C API and rework the filter pushdown\n\nAnser builds as a MODULE_big with no SHLIB_EXPORTS, so the module is\ncompiled -fvisibility\u003dhidden and every extern in its headers lands in\n.symtab but not .dynsym.  A second extension cannot reach any of it:\nRTLD_GLOBAL does not help, because a hidden symbol never reaches the\ndynamic symbol table, and load_external_function() fails for the same\nreason.  Mark the public declarations PGDLLEXPORT, which is the\nconvention the tree already uses for a cross-module C API -- see\ncontrib/hstore and src/pl/plpython.\n\nTwo plan-resolution helpers are promoted into that API rather than\nleft for a caller to reimplement.  Both encode which plan shapes are\nsafe to inject into, so a second copy would be a second place to get\nthat wrong.\n\nThe pushdown itself is split so the decision can be tested on its own.\nA scan key is numbered by the table\u0027s attributes while the consumer is\nnumbered by the scan\u0027s output targetlist, and the two coincide only\nwhen the scan emits every column in order -- so the filter was handed\na position where an attribute number was wanted, and a projecting scan\ntested the wrong column and discarded every row.  The decision now\nmaps one to the other, and refuses the shapes that have no mapping: a\ncomputed column, a whole-row or system Var, a Var of another relation.\n\nA second function walks from the consumer to the deepest node that\naccepts the key, so stacked consumers over one relation all push into\nthe same scan instead of probing tuple by tuple.\n\nCo-Authored-By: Claude Opus 5 \u003cnoreply@anthropic.com\u003e\n"
    },
    {
      "commit": "98fab3db9c2aa1ffa7a4a1c4693aa8f2da27a61a",
      "tree": "be2fc07b727f6c5874ae4921b5559267da6898f2",
      "parents": [
        "656c493cbd49e6c7e6f0e4ca4b0230f3414e6712"
      ],
      "author": {
        "name": "Leonid Borchuk",
        "email": "xifos@yandex-team.ru",
        "time": "Thu Oct 15 13:59:18 2026 +0300"
      },
      "committer": {
        "name": "Leonid",
        "email": "63977577+leborchuk@users.noreply.github.com",
        "time": "Wed Nov 18 17:38:52 2026 +0300"
      },
      "message": "Feature: Anser runtime filters for hash joins\n\nAnser is a publish/subscribe facility for MPP execution.  Producers on\nthe segments publish something about a running query, the coordinator\ncombines the per-segment parts into one, and consumers on the segments\nreceive it and prune work with it.  Today that is a bloom filter over\na hash join\u0027s build key, used to skip probe rows that cannot join.\n\nA channel is the rendezvous for one such piece of information in one\nquery, keyed by session, command, and the condition it describes.  It\nlives only in the coordinator backend running the query, for exactly\nas long as that query runs: no shared memory, no background worker, no\nsecond connection to authenticate.  Parts travel up as a NOTIFY and\nthe merged payload comes back as a sideband message.\n\nBoth nodes wrap a base scan rather than an intermediate node, which\nmakes the filter a superset of the keys the joins below would have\nleft -- less selective, never wrong.  The direction is fixed to build\n-\u003e probe, because a consumer on the inner side would wait on a\nproducer the join is not yet reading, which is a deadlock and not a\nslow path.\n\nEvery failure ends in unfiltered execution: a filter too small to\nreject anything, a squelched producer, a malformed part, a missed\ndeadline.  The planner gate is the one that costs nothing, and the\nlater ones exist because a row estimate can be wrong.\n\nBuilt only with --with-anser and off by default; the subsystem creates\nno catalog objects and is configured entirely by GUCs.  Includes the\nregression suites and the CI job that runs them.\n\nCo-Authored-By: Claude Opus 5 \u003cnoreply@anthropic.com\u003e\n"
    },
    {
      "commit": "656c493cbd49e6c7e6f0e4ca4b0230f3414e6712",
      "tree": "3f29b8696bf4583df0ee538ff61a303c9a199e50",
      "parents": [
        "b98a1e52e575b531dddaabede369953919756316"
      ],
      "author": {
        "name": "Leonid Borchuk",
        "email": "xifos@yandex-team.ru",
        "time": "Thu Oct 15 13:58:45 2026 +0300"
      },
      "committer": {
        "name": "Leonid",
        "email": "63977577+leborchuk@users.noreply.github.com",
        "time": "Wed Nov 18 17:38:52 2026 +0300"
      },
      "message": "Let an extension share runtime information between QEs\n\nAnser needs to move a small piece of information -- today a bloom\nfilter over a join key -- from the segments to the coordinator and\nback, over the dispatch connection that is already open.  Four things\nin the backend stand in the way, and none of them mentions Anser.\n\nA QE can already send a NOTIFY to the coordinator, but the dispatcher\ndropped any it did not recognise.  Add cdbdisp_notify_hook so an\nextension can claim one, and keep the ones that arrive in the same\nread as a command completion instead of losing them.\n\nThe other direction had no message type at all.  Add\nGP_SIDEBAND_MESSAGE, which the QE command loop accepts and discards\nwhen nobody is waiting -- a waiter can be cancelled after the\ncoordinator has written, and an unknown type would otherwise be fatal.\n\nA CustomScan travelled through the binary plan writer as the text\n\" :methods \" plus a token, and the reader took the first four bytes of\nthat as a length and asked for 1.7 GB.  Any plan with a CustomScan\nfailed to deserialize on the segments; write the name as a counted\nstring instead.  catversion is bumped accordingly.\n\nFinally, a bloom filter cannot be shipped without reaching its bitset,\nso expose it along with the sizing its holder must agree on.\n\nCo-Authored-By: Claude Opus 5 \u003cnoreply@anthropic.com\u003e\n"
    },
    {
      "commit": "b98a1e52e575b531dddaabede369953919756316",
      "tree": "072a03f289a824520609d3e17221067ff505d6de",
      "parents": [
        "a35420aedebbe3b04d22453d91c6ed72fd6960bb"
      ],
      "author": {
        "name": "Andrey Sokolov",
        "email": "sokolov.andrey.yurevich@gmail.com",
        "time": "Wed Nov 18 15:20:42 2026 +0300"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Wed Nov 18 12:20:42 2026 +0000"
      },
      "message": "Disable pull-up when correlated inner columns are not a subset of the PARTITION BY columns (#2274)\n\nOrca built invalid plan because it pulled up subquery which contains a window\nfunction during the Apply to Join transformations. Window function could return\nincorrect value after the pull-up because tuples number which this function was\ncalculated over was changed after the optimization.\n\nThe pull-up is safe when the correlated inner columns are a subset of\nthe PARTITION BY columns. Otherwise the pull-up is disabled.\n\nFProcessProject processes CLogicalProject too. CLogicalProject processing is\nnot changed.\n\nThe queries to reproduce the bug are added to tests."
    },
    {
      "commit": "a35420aedebbe3b04d22453d91c6ed72fd6960bb",
      "tree": "51a213aee4246a8f3ffbb9995988d6868930c284",
      "parents": [
        "84fe760383b5080edbe7d168b6cd64f89fc30c66"
      ],
      "author": {
        "name": "Jinbao Chen",
        "email": "chenjinbao1989@gmail.com",
        "time": "Fri Nov 06 00:12:50 2026 -0500"
      },
      "committer": {
        "name": "Jinbao Chen",
        "email": "chenjinbao1989@gmail.com",
        "time": "Wed Nov 18 05:32:37 2026 -0500"
      },
      "message": "Don\u0027t charge aggregate costs to the DQA dedup HashAggregates\n\nIn add_multi_dqas_hash_agg_path(), the HashAggregates that remove\nduplicates after the TupleSplit only deduplicate their input; they do\nnot run any aggregate transition or final functions.  But DedupCost was\nfilled by get_agg_clause_costs() before they were created, so they were\ncharged the costs of all aggregates in the query.  Move the call after\nthem, so the dedup aggregates are costed with empty aggregate costs.\n"
    },
    {
      "commit": "84fe760383b5080edbe7d168b6cd64f89fc30c66",
      "tree": "8e21af114dc82bba627641be1947e7ec1932e685",
      "parents": [
        "fe8165c9b98e8ad2ee64200ef77abf29a1e89318"
      ],
      "author": {
        "name": "Jianghua Yang",
        "email": "yjhjstz@gmail.com",
        "time": "Tue Nov 10 00:13:38 2026 +0800"
      },
      "committer": {
        "name": "Dianjin Wang",
        "email": "wangdianjin@gmail.com",
        "time": "Wed Nov 18 16:47:42 2026 +0800"
      },
      "message": "Keep every row-number hole in the AOCO column-only rewrite\n\nEach INSERT reserves its own range of row numbers, so a segfile written by\nseveral INSERTs has holes between their rows.  aocs_writecol_rewritesegfiles()\nhas to leave the same holes in the column it writes.  It tracks the row number\nthe next row should carry in expectedFRN and, when a block of the anchor\ncolumn starts past it, ends the block being written so that the next one\nstarts at that block\u0027s first row number.\n\nOn finding a hole it set expectedFRN to the block\u0027s first row number plus\nits row count, while the loop also advances it once per row: the block was\ncounted twice.  expectedFRN then ran past the start of the following block,\nand the next hole went unnoticed whenever the block before it held more rows\nthan the hole was wide.  The rows after it were written under row numbers\ntheir tids do not carry.\n\nA sequential scan reads the columns position by position and looked fine.\nAnything that goes by tid did not:\n\n    CREATE TABLE t (k int, a int, b int) USING ao_column DISTRIBUTED BY (k);\n    CREATE INDEX ON t (a);\n    INSERT INTO t SELECT 1, i, i * 10 FROM generate_series(1, 60) i;\n    INSERT INTO t SELECT 1, i, i * 10 FROM generate_series(61, 120) i;\n    INSERT INTO t SELECT 1, i, i * 10 FROM generate_series(121, 180) i;\n    ALTER TABLE t ALTER COLUMN b TYPE bigint;\n    SET enable_seqscan \u003d off;\n    SELECT a, b FROM t WHERE a IN (125, 170);\n      a  |  b\n    -----+------\n     125 | 1650\n\nThe rows are numbered 1-60, 101-160 and 201-260.  The first hole was caught\nand the second was not, so the third INSERT\u0027s rows went into b as 161-220:\nthe fetch of row 205 read a \u003d 165\u0027s value, and rows 221-260 were not there\nat all.  Worse, once such a column becomes the anchor -- the complete column\nwith the smallest eof -- the sequential scan takes its tids from it as well,\nand a DELETE through it marks row numbers that belong to other rows as far\nas the indexes are concerned.\n\nRestart expectedFRN at the block\u0027s first row number and leave the counting\nto the loop.  Assert, before each row is written, that the row number it is\nstored under is the one in its tid.  That would have failed on the first row\nafter the first hole.\n\nThe logic came with the column-only rewrite from Greenplum (69e57277a4,\n\"Resolve a FIXME re AOCO column write functionality in tablecmds.c\") and is\nunchanged in warehouse-pg.\n\nAdd the case to alter_table_aoco: the rewritten column\u0027s blocks in the block\ndirectory have to start where the other columns\u0027 do, an index fetch has to\nfind every row with its own value, and with the rewritten column as the\nanchor a DELETE through a sequential scan has to agree with the index.  The\nblock directory check does not depend on the plan, so it catches this under\neither optimizer.\n"
    },
    {
      "commit": "fe8165c9b98e8ad2ee64200ef77abf29a1e89318",
      "tree": "c8a920ef694f5b82da9f18ae65fe91acdd3a9bf4",
      "parents": [
        "6422756b468f35cf3ea0481da3d0c576eaf433aa"
      ],
      "author": {
        "name": "Jianghua Yang",
        "email": "yjhjstz@gmail.com",
        "time": "Sun Nov 01 04:39:58 2026 +0800"
      },
      "committer": {
        "name": "Dianjin Wang",
        "email": "wangdianjin@gmail.com",
        "time": "Wed Nov 18 16:47:42 2026 +0800"
      },
      "message": "Allow the re-added indexes and constraints alongside a column-only rewrite\n\nALTER COLUMN TYPE drops the indexes and constraints that depend on the\ncolumn and has ATPostAlterTypeCleanup() queue them to be re-added, through\nAT_PASS_OLD_INDEX and AT_PASS_OLD_CONSTR, once AT_PASS_ALTER_TYPE is done.\nsetupColumnOnlyRewrite() refused both passes.  That refusal never reached\nALTER COLUMN TYPE itself, which consults the function from\nATExecAlterColumnType() during AT_PASS_ALTER_TYPE -- before those passes\nare filled in.  It reached only an ADD COLUMN in the same command, which\nconsults it from ATExecAddColumn() during AT_PASS_ADD_COL, after.\n\nSo for\n\n    CREATE TABLE t(k int, a int CHECK (a \u003e 0)) USING ao_column;\n    ALTER TABLE t ALTER COLUMN a TYPE bigint, ADD COLUMN b text DEFAULT \u0027ok\u0027;\n\nor with an index on a in place of the CHECK, the rewrite was accepted and\nthe add was refused, and nothing undid the first decision when the second\nwent the other way: tab-\u003erewrite ended up with\nAT_REWRITE_REWRITE_COLUMNS_ONLY set and AT_REWRITE_NEW_COLUMNS_ONLY clear.\nATRewriteTables() took the column-only branch on the former, never wrote\nthe new column for want of the latter, and skipped the full rewrite that\nAT_REWRITE_COLUMN_REWRITE had asked for.  The command succeeded and the\ntable came back unreadable:\n\n    ERROR:  append-Only storage read could not open segment file ...\n\nGive the new column a CHECK of its own and it failed earlier instead, with\na segment crash: the column-only rewrite checked the constraint over a\ntuple built from the descriptor taken before the command, in which the\nnew column is a zero datum marked not-null.\n\nAllow the two passes.  The column-only paths already handle them -- they\nrebuild the indexes that depend on a rewritten column and check the\nre-added constraints row by row -- and have done so for ALTER COLUMN TYPE\nall along, the refusal never having applied to it.  This only brings the\nADD COLUMN decision into line.\n\nAdd the CHECK and index shapes to alter_table_aoco, with the new column\u0027s\nvalues read back, the rebuilt index used by a query, the relfilenode\nunchanged, and both the re-added constraint and the new column\u0027s still\nenforced.\n"
    },
    {
      "commit": "6422756b468f35cf3ea0481da3d0c576eaf433aa",
      "tree": "549f9cd14e24e2106559c5eee0dba13903b83aff",
      "parents": [
        "8ccca5587acc4c4da115822e5acb1e2f88210d6e"
      ],
      "author": {
        "name": "Jianghua Yang",
        "email": "yjhjstz@gmail.com",
        "time": "Thu Oct 29 23:24:38 2026 +0800"
      },
      "committer": {
        "name": "Dianjin Wang",
        "email": "wangdianjin@gmail.com",
        "time": "Wed Nov 18 16:47:42 2026 +0800"
      },
      "message": "Exempt deleted rows from the AOCO column rewrite\n\nThe column-only rewrite scans under SnapshotAny on purpose: every row has to be\nrewritten, visible or not, so that the new segfile\u0027s block structure -- and\ntherefore every row number -- still lines up with the columns that are not\nbeing rewritten.  Deleted rows come along for that ride only.  heap and ao_row\nrewrite under an MVCC snapshot and never see them, so nothing the user wrote\nis meant to apply to them, yet two things did.\n\nThe per-row NOT NULL and CHECK validation judged them:\n\n    CREATE TABLE t(k int, a int NOT NULL) USING ao_column DISTRIBUTED BY (k);\n    INSERT INTO t VALUES (1, 1), (2, 2);\n    DELETE FROM t WHERE k \u003d 1;\n    ALTER TABLE t ALTER COLUMN a TYPE bigint USING nullif(a, 1)::bigint;\n    ERROR:  column \"a\" of relation \"t\" contains null values\n\nThe only surviving row is a \u003d 2, which nullif() leaves alone.  CHECK was wrong\nin the same way -- USING (a - 1) on a table carrying CHECK (a \u003e 0) failed on a\ndeleted a \u003d 1.\n\nAnd the USING expression itself was evaluated over them, which for a cast is\nfatal before any check gets a say:\n\n    CREATE TABLE t(k int, a text) USING ao_column DISTRIBUTED BY (k);\n    INSERT INTO t VALUES (1, \u0027bad\u0027), (1, \u00272\u0027);\n    DELETE FROM t WHERE a \u003d \u0027bad\u0027;\n    ALTER TABLE t ALTER COLUMN a TYPE int USING a::int;\n    ERROR:  invalid input syntax for type integer: \"bad\"\n\nConsult the visibility map once per row, before anything is evaluated, and\ntreat a deleted row accordingly: skip its checks, and skip the expression\nunless it is a bare Var.  A Var is only a copy and cannot fail, so under SET\nENCODING -- or the identity rewrite DROP COLUMN performs on an incomplete\ncolumn -- a deleted row keeps its bytes.  Anything else leaves a NULL in its\nplace: the result would be of the new type, of which the row has no value to\nfall back on, and no one can read it back.  The row is still written either\nway, so the physical positions the rewrite depends on are untouched.  A rolled\nback DELETE leaves the row live and it is treated as such, which is what the\nvisibility map already says.\n\nOpen the visibility map whenever something would otherwise be applied to the\ndeleted rows: a constraint, a NOT NULL, or an expression that is not a bare\nVar.  Only the identity rewrites skip the per-row lookup now; they are also\nthe only ones with nothing to apply.\n\nExtend alter_table_aoco with both constraint kinds over a deleted row, a live\nviolation caught while a dead row is dragged along, the aborted-DELETE and\nsame-transaction-DELETE cases, a thousand-row table read back through both a\nseqscan and an index after the rewrite, the ADD COLUMN path, a cast that only\na deleted row would fail, a cast a live row does fail, the two combined with\nNOT NULL, and SET ENCODING over a table with deleted rows.  In\naoco_column_rewrite only the rewritten column\u0027s eof and block directory move,\nits deleted rows now being NULL; the SET ENCODING column is byte-identical.\n\nReported-by: Alena Rybakina \u003ca.rybakina@postgrespro.ru\u003e\n"
    },
    {
      "commit": "8ccca5587acc4c4da115822e5acb1e2f88210d6e",
      "tree": "4a1570c5e487a088235edae5ae9e0c0e1431320c",
      "parents": [
        "71adb5e823ef9e5a4d14282d471883398ba4493a"
      ],
      "author": {
        "name": "Jianghua Yang",
        "email": "yjhjstz@gmail.com",
        "time": "Thu Oct 29 07:15:40 2026 +0800"
      },
      "committer": {
        "name": "Dianjin Wang",
        "email": "wangdianjin@gmail.com",
        "time": "Wed Nov 18 16:47:42 2026 +0800"
      },
      "message": "Validate CHECK constraints when ADD COLUMN skips the AOCO rewrite\n\nThe column-only ADD COLUMN path never reads the existing columns -- that is\nthe optimization -- so the access method cannot evaluate a CHECK that mentions\nthem.  It tried anyway: the slot it works from comes from\nExecStoreAllNullTuple() with only the newly added columns filled in, so every\npre-existing column read as NULL.  That was wrong in both directions.\n\"ADD COLUMN c int DEFAULT 100 CHECK (c \u003c a)\" was accepted on rows where a is 5,\nbecause \"100 \u003c NULL\" is NULL and a NULL CHECK counts as satisfied; conversely\n\"CHECK (a IS NOT NULL)\" was rejected on a table whose every row has a non-NULL\na.  heap and ao_row get both cases right.\n\nAn accepted violation is worse than a missing error: the catalog still claims\nthe constraint holds, so the planner refutes predicates with it and queries\nquietly return too few rows.\n\nStop evaluating constraints in the access method -- drop the parameter from\nrelation_add_columns() rather than leave it unused, since the asymmetry with\nrelation_rewrite_columns(), which can and does validate, is the point -- and\nlet ATRewriteTables() run the ordinary validate-only scan afterwards.  That\nscan reads the tuples as they now stand on disk, so a CHECK over any column\nevaluates correctly, and it is the same pass heap performs for these\nstatements: neither rewrites the table.  A NOT NULL flag on a newly added\ncolumn is still the access method\u0027s job, that value being in the slot.\n\nATRewriteTable() decided whether it was rewriting by testing tab-\u003erewrite,\nguarded by an Assert() that newrel is non-NULL.  The two agreed everywhere\nelse only because a rewrite reason always came with a new heap; the\ncolumn-only paths break that, asking for a verification pass over a table they\nhave already updated in place.  Test newrel instead, which is what the\nfunction\u0027s contract -- \"OIDNewHeap is InvalidOid if we don\u0027t need to rewrite\"\n-- actually says, and drop the Assert() it was propping up.\n\nExtend alter_table_aoco with both directions of the misevaluation, a CHECK\nnaming only pre-existing columns, NOT NULL on the added column, and an\nassertion that a plain ADD COLUMN still leaves the relfilenode alone.\n"
    },
    {
      "commit": "71adb5e823ef9e5a4d14282d471883398ba4493a",
      "tree": "4c1f29b4ebd82c5795d7c400c99e16ade08da7d5",
      "parents": [
        "07fcd7a2ecae8f866699c11d5d19966c4d490171"
      ],
      "author": {
        "name": "Jianghua Yang",
        "email": "yjhjstz@gmail.com",
        "time": "Wed Oct 28 23:51:50 2026 +0800"
      },
      "committer": {
        "name": "Dianjin Wang",
        "email": "wangdianjin@gmail.com",
        "time": "Wed Nov 18 16:47:42 2026 +0800"
      },
      "message": "Enforce NOT NULL and CHECK in the AOCO column rewrite\n\nALTER TABLE ... ALTER COLUMN TYPE on an ao_column table takes the column-only\nrewrite path, which returns from ATRewriteTables() before the scan loop that\nvalidates tab-\u003econstraints and the NOT NULL flags.  Nothing else checked them,\nso a USING expression that produced a NULL for a NOT NULL column, or a value\nviolating a CHECK, was accepted silently -- heap and ao_row both reject the\nsame statement.\n\nThe result is worse than a missing error.  The catalog still claims the\nconstraint holds, so the planner refutes predicates with it: after\nALTER TABLE t ALTER COLUMN a TYPE bigint USING -a::bigint on a column with\nCHECK (a \u003e 0), \"SELECT * FROM t WHERE a \u003c\u003d 0\" plans to a One-Time Filter:\nfalse and returns nothing, while the rows are there.\n\nPass tab-\u003econstraints down to the rewrite the way the ADD COLUMN sibling\nalready does and verify each rewritten tuple in\naocs_writecol_rewritesegfiles().  No fallback to a full table rewrite is\nneeded: the rewrite scan is opened with a NULL projection, so every column is\nread and the slot handed to ExecCheck() is a complete tuple -- a CHECK that\nreferences columns other than the rewritten one evaluates correctly too.  Only\nthe rewritten columns can newly become NULL, the rest being copied over\nverbatim, so NOT NULL is checked for those.\n\nThe optimization is unaffected: a valid ALTER on a constrained column still\nleaves the relfilenode alone.\n\nThe second table_relation_rewrite_columns() caller, the DROP COLUMN path that\nrewrites one incomplete column through an identity transform, passes NIL: it\npreserves every value, so no constraint can change meaning.\n\nAdd the cases to alter_table_aoco, including a CHECK over a column that is not\nthe one being rewritten and an assertion that the table is still not rewritten.\n"
    },
    {
      "commit": "07fcd7a2ecae8f866699c11d5d19966c4d490171",
      "tree": "b8bbc807d0d61b9f4fd6834779b5c5031b4a3564",
      "parents": [
        "5a7f8acb02bb124342d8dbf0fac1e9e1ffe77fa2"
      ],
      "author": {
        "name": "Jianghua Yang",
        "email": "yjhjstz@gmail.com",
        "time": "Wed Oct 28 22:40:08 2026 +0800"
      },
      "committer": {
        "name": "Dianjin Wang",
        "email": "wangdianjin@gmail.com",
        "time": "Wed Nov 18 16:47:42 2026 +0800"
      },
      "message": "Rebuild expression and partial indexes in the AOCO column rewrite\n\nThe AOCO column-only rewrite returns from ATRewriteTables() before\nreindex_relation(), so aocs_writecol_reindex() stands in for it.  It decided\nwhich indexes to rebuild by testing pg_index.indkey alone, which misses two\nshapes: an expression index stores InvalidAttrNumber in indkey and keeps the\ncolumn reference in indexprs, and a partial index can name the column only in\nits predicate.\n\nATExecAddIndex() has already skipped the build for those indexes, because\ntab-\u003erewrite is set and it expects phase 3 to do it.  Missing one therefore\nleaves its freshly assigned relfilenode empty -- not even a btree metapage --\nand every later plan fails with \"could not read block 0 in file ...\".  A plain\nEXPLAIN is enough to trip it: the planner reads every btree\u0027s metapage through\n_bt_getrootheight() regardless of the plan it picks.\n\nCollect the index\u0027s attributes with BuildIndexInfo() and pull_varattnos() over\nits expressions and predicate instead of reading indkey directly.\n\nAdd the four index shapes to alter_table_aoco: a plain index on the altered\ncolumn, an expression index on it, a partial index whose predicate uses it,\nand an expression index on an unrelated column, each queried once with index\nscans disabled and once with seqscans disabled so the two paths must agree.\n"
    },
    {
      "commit": "5a7f8acb02bb124342d8dbf0fac1e9e1ffe77fa2",
      "tree": "d7bbdc2b15c1f42b02fd464c97329c153d17110c",
      "parents": [
        "fdeb295fbf0941573cac8e4ae4e92e0c526db077"
      ],
      "author": {
        "name": "Jianghua Yang",
        "email": "yjhjstz@gmail.com",
        "time": "Tue Oct 27 21:32:34 2026 +0800"
      },
      "committer": {
        "name": "Dianjin Wang",
        "email": "wangdianjin@gmail.com",
        "time": "Wed Nov 18 16:47:42 2026 +0800"
      },
      "message": "Propagate AOCO table-level compression to columns on ALTER SET\n\nCherry-picked from warehouse-pg 0f73ef6e072.\n\nALTER TABLE \u003caoco\u003e SET (compresstype\u003d..., compresslevel\u003d...) rewrote the\ntable, paying the full I/O cost, but only updated pg_class.reloptions.  The\nper-column pg_attribute_encoding entries were cloned verbatim from the old\nrelation, so every existing column kept its old codec and the ALTER had no\neffect beyond relabeling the catalog.  Measured here on 20000 rows of\nrepeated text: the rewrite moved the relfilenode and left the relation at\n12,223,184 bytes; setting the same codec per column instead brought it to\n126,096.\n\nget_cols_for_new_reloption_defaults() queues a column whose stored encoding\nstill matches the table\u0027s old default to receive the new one, and leaves a\ncolumn carrying its own explicit ENCODING alone -- including one given by an\nALTER COLUMN ... SET ENCODING earlier in the same command, which\nATExecSetColumnEncoding has by then already recorded in tab-\u003enew_crsds.\n\nAdapted for cbdb in three places:\n\n- cbdb\u0027s AlteredTableInfo has no newOptions field, and ATExecSetRelOptions()\n  writes pg_class itself rather than handing the computed options back, so\n  it gained an out parameter for them.\n\n- Upstream also updates a partitioned root directly, since it never reaches\n  ATRewriteTables.  cbdb cannot get there: partitioned_table_reloptions()\n  rejects AO storage options outright (\"unrecognized parameter\n  compresstype\"), so that branch is left out rather than carried as\n  untestable code.  The test pins the error so that lifting the restriction\n  shows up here.\n\n- Upstream exports free_options_deep() for callers in brin.c, ginutil.c and\n  elsewhere.  cbdb has no such callers, so it stays static.\n\nUpstream\u0027s test additions sit in an alter_table_set.sql that cbdb does not\nhave -- cbdb\u0027s is a 39-line file about distribution keys with none of the\nreloptions scaffolding they build on -- so this adds a new alter_table_aoco\ntest instead, which also picks up two things about fast ADD COLUMN that\nnothing covered either.\n\nalter_table_aoco holds three sections:\n\n- Indexes built over a column left missing by a fast ADD COLUMN.  The index\n  build reads the column through the ordinary scan, so the entries for the\n  rows in the missing region carry the value from attmissingval rather than\n  anything in the column\u0027s data file; the existing index tests all build\n  over columns present in every row.  Covers btree and BRIN, read back with\n  every index path the planner will choose, and again after the missing\n  region has been deleted from and updated.  Checked by hand beyond what it\n  asserts -- bitmap indexes, index-only scans under GPORCA, composite\n  indexes over two columns added at different times, unique indexes\n  containing a missing column, BRIN ranges resummarized through the\n  partial-scan path, and a table whose segfiles have different missing\n  boundaries -- all agreeing with a sequential scan.\n\n- ANALYZE over such a column.  Half the rows take their value from\n  attmissingval and never appear in the column\u0027s data file, so the sample\n  has to pick them up through the same missing-value path the scan uses or\n  the statistics skew towards whatever was written after the ALTER.\n  Compared against a heap table holding the same values, whose ANALYZE is\n  untouched upstream code.  A statistics target of 1000 makes the sample\n  cover all 60000 rows, so both sides are exact and this does not depend on\n  sampling luck.  Also checked by hand against heap: ao_row, a 59000/1000\n  skew, a column added with no default, a multi-segfile table, ANALYZE\n  ROOTPARTITION, histogram bounds, correlation, planner row estimates, and\n  the gp_acquire_sample_rows metadata row before and after deleting part of\n  the missing region.\n\n- The ALTER SET behaviour above: default propagation, an explicit\n  per-column ENCODING surviving it, the two mixed in one command, a data\n  round trip that checks the relation actually got smaller, and a leaf\n  partition.  RESET asserts what cbdb does rather than what upstream does:\n  it clears pg_class.reloptions without rewriting an AO relation, so the\n  columns stay put.  That is the consistent answer while no rewrite happens\n  -- moving the catalog alone would leave it disagreeing with the data.\n  Naming the default explicitly does rewrite, and does take the columns\n  with it.\n\nAnswers in the first two sections are compared against the same queries with\nthe relevant plan types disabled, as booleans, so they do not depend on\nwhich plan each optimizer picks.  No defect was found by either.\n"
    },
    {
      "commit": "fdeb295fbf0941573cac8e4ae4e92e0c526db077",
      "tree": "571c852df449ec8bbbe165caa65520e56913a436",
      "parents": [
        "4d7f706b9729a276c0f3cd0b50ee03720aea87e6"
      ],
      "author": {
        "name": "Jianghua Yang",
        "email": "yjhjstz@gmail.com",
        "time": "Sat Oct 24 01:36:54 2026 +0800"
      },
      "committer": {
        "name": "Dianjin Wang",
        "email": "wangdianjin@gmail.com",
        "time": "Wed Nov 18 16:47:42 2026 +0800"
      },
      "message": "Skip the per-row missing-value check when nothing is missing\n\nThe AOCS scan loops test AO_ATTR_VAL_IS_MISSING() once per row per projected\ncolumn.  That is a probe into attnum_to_rownum[attno * MAX_AOREL_CONCURRENCY\n+ segno] -- a 128 * natts * sizeof(int64) array, so consecutive columns are\n1KB apart and each probe is its own cache line.\n\nA relation only has anything to find there if a fast ADD COLUMN left one of\nits columns missing for part of some segfile, which most relations have never\nhad done to them.  Have GetAttnumToLastrownumMapping() report whether any\nentry came out non-zero, keep that on the scan descriptor, and test it first:\nwhere there is nothing missing the whole branch -- including the load of\nproj_atts[ANCHOR_COL_IN_PROJ] it used to start with -- falls away.\n\nThe flag is set once in aocs_beginscan_internal() and the mapping outlives\nrescans, so it stays valid for the life of the scan.\n\nThe fetch path and ao_row pass NULL: neither checks this per row of a scan,\nao_row does it once per block in BindingInit().\n\nNo behaviour change; the flag is false only when every lastrownum is zero,\nwhich is exactly when the check could not have fired.\n"
    },
    {
      "commit": "4d7f706b9729a276c0f3cd0b50ee03720aea87e6",
      "tree": "e1bc464c9f33cbca5ceef16f80b604e761840d37",
      "parents": [
        "6248defaf4c356761a03f67cd02b3af019949cf5"
      ],
      "author": {
        "name": "Jianghua Yang",
        "email": "yjhjstz@gmail.com",
        "time": "Sat Oct 24 00:47:24 2026 +0800"
      },
      "committer": {
        "name": "Dianjin Wang",
        "email": "wangdianjin@gmail.com",
        "time": "Wed Nov 18 16:47:42 2026 +0800"
      },
      "message": "Keep the anchor column first when predicate pushdown reorders\n\nreorder_qual_col() sorts the projection\u0027s predicate columns by how selective\neach turned out to be over the first gp_predicate_pushdown_sample_rows rows.\nIt sorted the whole prefix, including projection position 0.\n\nPosition 0 is not an ordinary slot: it holds the anchor column, the complete\ncolumn with the smallest eof.  The scan takes its row numbers from whatever\nsits there, and those row numbers are what every other column\u0027s missing-value\ncheck is made against.  Sorting a column added in missing mode into that slot\ntherefore does two wrong things at once -- it skips that column\u0027s own missing\ncheck, and it makes the scan read row numbers from a stream that begins at\nlastrownum + 1 rather than 1.  The columns then advance out of step and the\nscan returns the right number of rows with the wrong values in them:\n\n  -- two segfiles, \u0027small\u0027 the anchor, \u0027c\u0027 added in missing mode\n  SET gp_enable_predicate_pushdown \u003d off;\n  SELECT count(*), sum(a) FROM t WHERE small \u003d 1 AND c \u003d 99;\n   1000 | 143050000\n  SET gp_enable_predicate_pushdown \u003d on;\n  SELECT count(*), sum(a) FROM t WHERE small \u003d 1 AND c \u003d 99;\n   1000 |  88720918     \u003c- same count, different rows\n\nReorder only what follows the anchor.  The anchor has to be read first in any\ncase, so pinning it costs no selectivity.\n\nIt takes two segfiles to see this.  aos_scaned_rows is not reset per segfile,\nso the reorder happens once, part way through the first one, and the order\nthen stands for the rest of the scan -- including the later segfiles\u0027 own\nmissing regions, which the scan has not reached yet.  With a single segfile\nthe reorder always lands after the missing region and nothing goes wrong,\nwhich is why the existing tests did not catch it.\n"
    },
    {
      "commit": "6248defaf4c356761a03f67cd02b3af019949cf5",
      "tree": "aa538e8ec72cd1f38f98d0273957ba239aa385e6",
      "parents": [
        "4a6f1cb037e6b846bb307043bbf2f6e0ff8b16c0"
      ],
      "author": {
        "name": "Jianghua Yang",
        "email": "yjhjstz@gmail.com",
        "time": "Fri Oct 23 04:25:52 2026 +0800"
      },
      "committer": {
        "name": "Dianjin Wang",
        "email": "wangdianjin@gmail.com",
        "time": "Wed Nov 18 16:47:42 2026 +0800"
      },
      "message": "Update the PAX test suite for the AOCO no-rewrite change\n\ncontrib/pax_storage carries its own copies of alter_table_aocs,\nalter_table_aocs2, appendonly, column_compression and the uao_ddl\nalter_ao_table_col_ddl templates.  They still expected the old behaviour:\n\n  - column_compression: pg_attribute_encoding has gained lastrownums, and\n    ADD COLUMN now creates an entry where it created none.\n  - alter_table_aocs: an aborted ADD COLUMN now leaves eof 0, not 48.\n  - alter_table_aocs2: partitions report \"ADD COLUMN optimized for table\"\n    instead of \"full table rewritten\".\n  - appendonly: pg_attribute_encoding has one entry per segfile.\n  - uao_ddl/alter_ao_table_col_ddl: ALTER COLUMN TYPE rewrites just the\n    column, so the dead rows survive it and the absolute tuple count no\n    longer holds; take the same relative check the core suite took.\n\nSame changes already made to the core regression suite.\n"
    },
    {
      "commit": "4a6f1cb037e6b846bb307043bbf2f6e0ff8b16c0",
      "tree": "31fddd526d137451c4a6459ac8f55dc31eaa9cad",
      "parents": [
        "890afca61bca32f165993b6b633790378333ae93"
      ],
      "author": {
        "name": "Jianghua Yang",
        "email": "yjhjstz@gmail.com",
        "time": "Fri Oct 23 04:25:43 2026 +0800"
      },
      "committer": {
        "name": "Dianjin Wang",
        "email": "wangdianjin@gmail.com",
        "time": "Wed Nov 18 16:47:42 2026 +0800"
      },
      "message": "Do not require the AO column callbacks from every table AM\n\nrelation_add_columns and relation_rewrite_columns let an access method add or\nrewrite individual columns without rewriting the relation.  Only ao_column can\ndo that; heap and ao_row supply stubs that raise an error.\n\nGetTableAmRoutine() asserted both were present, which an out-of-tree access\nmethod cannot satisfy: PAX leaves them NULL, so in an assert-enabled build\nevery PAX table creation died with\n\n  FATAL:  Unexpected internal error (assert.c:46)\n  DETAIL: (\"routine-\u003erelation_add_columns !\u003d NULL\", File: \"tableamapi.c\", ...)\n\nMake them optional, and have table_relation_add_columns() and\ntable_relation_rewrite_columns() report an unsupported operation instead of\ncalling through a NULL pointer.  The callers only reach them under\nRelationIsAoCols(); assert that where the rewrite flags are consumed so the\nassumption stays visible.\n"
    },
    {
      "commit": "890afca61bca32f165993b6b633790378333ae93",
      "tree": "baf476c3c301cb2fca53b25c578b80a4916ad92c",
      "parents": [
        "dad55b1a041eff87f0aacd1acd935a73accb7fbe"
      ],
      "author": {
        "name": "Huansong Fu",
        "email": "fuhuansong@gmail.com",
        "time": "Mon Feb 12 21:46:53 2024 -0800"
      },
      "committer": {
        "name": "Dianjin Wang",
        "email": "wangdianjin@gmail.com",
        "time": "Wed Nov 18 16:47:42 2026 +0800"
      },
      "message": "ao/co: Project the anchor column for count(*) for CO tables\n\n(cherry picked from commit 86647f449bcf755dfbfd5256581282d798a8ca8f)\n\nA scan with neither a target list nor a qual -- count(*) is the usual\ncase -- took the first column.  Taking the anchor column instead costs\nnothing and reads the smallest complete column.  Upstream notes there is\nno correctness issue either way, since the first column is always\ncomplete; this is a performance change only.\n\nMeasured here on (a int, b bigint, c int2) with a million rows, where the\ncolumn sizes on one segment are 1332968 / 2665608 / 666464 bytes:\n\n  count(a)   41 blocks\n  count(b)   82 blocks\n  count(c)   21 blocks\n  count(*)   21 blocks   -- was 41, the first column\n\nPorted to the PG16 kernel: the new AOCS_PROJ_ANY travels through\naocs_beginscan(), whose cbdb signature carries an extra parallel_scan\nargument; projKind is added alongside it.  cbdb\u0027s\naoco_beginscan_extractcolumns() had the pre-fix shape, \"if (!found)\ncols[0] \u003d true\", which becomes the deferred choice; cols is NULL on that\npath, so the pfree below it is now conditional.\n\nTest: upstream put its 38 lines in regress/aoco_projection, an 887-line\nfile cbdb does not have -- it comes from 764b66e546, which this series\ndoes not take.  Rather than drag in 849 unrelated lines, the commit\u0027s own\nlines go to isolation2/ao_partial_scan: they are self-contained and use\nthe same fault point as the rest of that file.  The four recorded counts\n(41, 82, 21, 21) pin the property down: count(*) reads exactly as many\nblocks as the smallest column.\n\nVerified: AO/AOCS regression 26/26, AO isolation2 136/136 plus\nao_partial_scan.  One run of ao_partial_scan hit the recorded flake at\nthe whole-relation index build (810 -\u003e 1233, line 828, outside the new\nsection) and passed on either side of it.\n"
    },
    {
      "commit": "dad55b1a041eff87f0aacd1acd935a73accb7fbe",
      "tree": "06f1e2cf41895c65b8846a4a26735929c39af28b",
      "parents": [
        "b25c2e945768df829485afae49f9ba527ba0f4e4"
      ],
      "author": {
        "name": "Zhenglong Li",
        "email": "zhenglong.li@enterprisedb.com",
        "time": "Tue Oct 21 20:50:57 2025 +0800"
      },
      "committer": {
        "name": "Dianjin Wang",
        "email": "wangdianjin@gmail.com",
        "time": "Wed Nov 18 16:47:42 2026 +0800"
      },
      "message": "Fix the vacuum issue on AOCS table after an aborted ADD COLUMN transaction (#55)\n\n(cherry picked from commit 8b3966cb34bce2bfff8577fe5688bf232690ffe2)\n\nReaching a segfile in an AOCO table means consulting aocsseg for the\nsegno and pg_attribute_encoding for the filenum.  When an ADD COLUMN\ntransaction aborts, MVCC removes the pg_attribute_encoding row but the\naocsseg entry can survive, because the initial segno record is inserted\nand immediately frozen.  Nothing normally looks at the aborted column, so\nthe mismatch stays hidden until VACUUM tries to truncate segfiles and\nfinds a vpinfo entry with no matching encoding row.  Routing every\nvpentry access through deformAOCSVPInfo(), now exported, makes the two\nagree.  The commit also fixes dropping an AO/AOCS table\u0027s columns down to\nzero.\n\nConflict: cbdb wraps the memtuple deform in a block with its own\nshouldFree handling.  Upstream\u0027s change there is to replace\nAssert(executorReadBlock-\u003emt_bind) with a test -- a relation with no\ncolumns left has no binding and nothing to deform -- so only that part is\ntaken and cbdb\u0027s block kept.\n\nThe test\u0027s existing absolute row-count check had to become a relative\none.  It does\n\n  set gp_select_invisible \u003d true;\n  select count(int4_col) from sto_alt_uao1;\n\nafter a series of UPDATEs and a DELETE followed by ALTER COLUMN TYPE, and\ncbdb\u0027s expected output has the literal 10.  That number was only right\nwhile ALTER COLUMN TYPE rewrote the whole table and dropped the dead rows\nalong the way; with the column-only rewrite this series ports, they\nsurvive and the count is 13.  Upstream had already moved to capturing the\ncount before the UPDATE and asserting \"\u003d :tupcount + 5\", which is what\nthe check is actually about, so that form is adopted rather than swapping\none absolute number for another -- 13 would be just as context-dependent.\nConfirmed this is the feature\u0027s doing and not a defect: the same test\npasses on a cluster built without this series and fails with it.\n\nrun_ao_tests.sh: add uao_ddl/alter_ao_table_col_ddl_{row,column}.  They\ncover ALTER on AO/AOCO and were never in the gate\u0027s list, which is why\nthe count above went unnoticed until this commit\u0027s tests landed there.\n\nVerified: AO/AOCS regression 26/26, AO isolation2 136/136 plus\nao_partial_scan.\n"
    },
    {
      "commit": "b25c2e945768df829485afae49f9ba527ba0f4e4",
      "tree": "9936818573b43e3e365df85f472d599310a72452",
      "parents": [
        "af9df733cf4c574a5d9b664590c72d667038df6d"
      ],
      "author": {
        "name": "Adam Lee",
        "email": "adam8157@gmail.com",
        "time": "Tue Jul 07 13:52:23 2026 +0800"
      },
      "committer": {
        "name": "Dianjin Wang",
        "email": "wangdianjin@gmail.com",
        "time": "Wed Nov 18 16:47:42 2026 +0800"
      },
      "message": "fix(aoco): probe the placeholder column during unique checks\n\n(cherry picked from commit 7bf95f578dbe30527225ed0091da1450347ae7e4)\n\nAO unique checks probe the block directory for an entry covering the\nconflicting tid.  Within an insert command the real block directory rows\nare not persisted yet, so the check relies on the placeholder row written\nat the start of the insert.  The writer puts that placeholder on the\nfirst non-dropped column, while since 3986f92616 -- the commit two before\nthis one -- the reader consults the \"anchor\" column, the complete column\nwith the smallest eof.  Once a load skews the segfile eofs so the\nsmallest column is no longer the first, the reader probes a column the\nplaceholder was never written to, finds nothing, and lets the duplicate\nthrough.  Both same-command and concurrent duplicates slip past.  ao_row\nis unaffected: one column group, so writer and reader cannot diverge.\n\naocs_unique_check_col() picks the first non-dropped complete column\n(falling back to a dropped complete one) and is used on both sides.  The\nchoice is deterministic and does not depend on segfile eofs.\nCompleteness matters because a column added in missing mode has no block\ndirectory entries for the rows that predate it.\n\nReproduced here before and after, with the second column made small\nenough to become the anchor:\n\n  CREATE TABLE uq(a int PRIMARY KEY,\n                  b int ENCODING (compresstype\u003dzstd, compresslevel\u003d9))\n      USING ao_column;\n  INSERT INTO uq SELECT i, 1 FROM generate_series(1,50000) i;\n  -- eof per column on one segment: col 0 \u003d 200384, col 1 \u003d 552\n\n  INSERT INTO uq VALUES (99999,1),(99999,1);\n      reading the anchor column:  both rows inserted, no error\n      with this commit:           ERROR, duplicate key value ... (a)\u003d(99999)\n\nPorted to the PG16 kernel:\n- the aocsam_handler conflict interleaves cbdb\u0027s multi-segfile insert\n  logic (CBDB_PARALLEL) with upstream\u0027s placeholder block.  cbdb\u0027s logic\n  is kept and the placeholder change applied to cbdb\u0027s own copy further\n  down, which also carries a placeholderInserted flag upstream lacks.\n- upstream installs the single-column projection in\n  AppendOnlyBlockDirectory_Init_forIndexOnlyScan(), which cbdb does not\n  have; it belongs in Init_forUniqueChecks() here.\n- CoversTuple()\u0027s comment takes upstream\u0027s text minus the index-only-scan\n  paragraph, for the same reason.\n\nTest: cbdb\u0027s copy of aocs_unique_index does not drop its last table and\nthe new scenarios reuse the name, so a DROP is added at the junction.\nThis test lives in sql/ rather than input/, so the table name is literal\nao_column, not @amname@.  The four new cases pass 2/2 and match\nupstream\u0027s output apart from command tags and segment pids.\n\nVerified: AO/AOCS regression 24/24, AO isolation2 136/136 plus\nao_partial_scan.\n"
    },
    {
      "commit": "af9df733cf4c574a5d9b664590c72d667038df6d",
      "tree": "e3f0d786c8e9acab07a2f7abe68b9bd9786e3122",
      "parents": [
        "e498bf53dad8c1643f3d4599b461852072820842"
      ],
      "author": {
        "name": "Adam Lee",
        "email": "adam.lee@enterprisedb.com",
        "time": "Fri Apr 18 15:10:51 2025 +0800"
      },
      "committer": {
        "name": "Dianjin Wang",
        "email": "wangdianjin@gmail.com",
        "time": "Wed Nov 18 16:47:42 2026 +0800"
      },
      "message": "Initialize attnumsWithEntries to prevent failures during CO rewrite (#6)\n\n(cherry picked from commit 7cd2336c723cd80e1cfa38cbec7a6943cc7ce2c4)\n\nOnly the test is taken.  The defect this fixes is in upstream\u0027s\nAddOrUpdateCOAttributeEncodings(), which declares\n\n  bool attnumsWithEntries[MaxHeapAttributeNumber];\n\nand has check_attribute_encoding_entry_exist() clear it with\nMemSet(attnum_entry_present, false, sizeof(attnum_entry_present)) -- a\nsizeof on the bool* parameter, so only the first 8 entries are\ninitialised and every attnum past the eighth is decided on uninitialised\nstack.  Wide tables then fail with \"could not find tuple for attnum X for\nrelid Y during scan on pg_attribute_encoding\".\n\ncbdb does not have that code.  Porting 4493ca3776 kept our own\nAddOrUpdateCOAttributeEncodings(), which looks each attnum up through the\nATTENCODINGNUM syscache instead of filling an array, precisely because\nthe upstream helper carried this bug; the helper itself came back with\nthe 3986f92616 merge and was dropped again as it had no caller.  So the\ntwo code hunks are no-ops here and are left out.\n\nConfirmed by running the test\u0027s scenario before taking it: a 1594-column\nheap table goes to ao_column with compresstype\u003dzstd and all 1594\npg_attribute_encoding rows are written.\n\nThe test is still worth having -- it is the only wide-table coverage in\nthis series -- and its output matches upstream line for line except for\nthe product name in the DISTRIBUTED BY notice.\n\nVerified: AO/AOCS regression 24/24, AO isolation2 136/136.\nao_partial_scan failed once in that run at 28766 ms and passes 2/2\nstandalone at ~21s; that is the recorded flake, where failing and running\nslow go together.\n"
    },
    {
      "commit": "e498bf53dad8c1643f3d4599b461852072820842",
      "tree": "f28c6871afb5a9746c0e9b9e6cc10dbc2161be78",
      "parents": [
        "6ab455d4dec783d584abf70632c32ae3c57095bf"
      ],
      "author": {
        "name": "Haolin Wang",
        "email": "whaolin@vmware.com",
        "time": "Wed Apr 24 16:53:03 2024 +0800"
      },
      "committer": {
        "name": "Dianjin Wang",
        "email": "wangdianjin@gmail.com",
        "time": "Wed Nov 18 16:47:42 2026 +0800"
      },
      "message": "Fix CO sampling crashed on added column.\n\n(cherry picked from commit c0730c2f0c58af4a7b12d626c21596e8b4f35864)\n\nSampling a CO table walks every projected column to the target row using\none shared logical counter, which assumes each column has a datum for\nevery row.  Missing-mode ADD COLUMN breaks that: the new column\u0027s file\nstarts after its lastrownum, so the walk overshoots and runs off the end\nof the segfile.  Take the row number the anchor column produced and fetch\nthe other columns at that same physical row instead of recomputing a\ntarget per column.\n\nThis is the hazard docs/gp7-avoid-table-rewrite-commit-correlation.md\nflagged as the easiest one to miss, and it is real: ANALYZE on an AOCO\ntable whose added column is *partially* present crashes the segment.\n\n  CREATE TABLE t(a int, b int) USING ao_column;   -- 200000 rows\n  ALTER TABLE t ADD COLUMN c int DEFAULT 7;\n  INSERT INTO t SELECT i, i%100, i FROM generate_series(200001,210000) i;\n  ANALYZE t;                                      -- QE dies\n\nThe core shows exactly the coordinate mismatch, at the pg_unreachable()\nin aocs_gettuple():\n\n  #2 aocs_gettuple (targrow\u003d69896) at aocsam.c:1339\n  #3 aocs_get_target_tuple\n  #4 aoco_acquire_sample_rows\n  (gdb) p startrow                                        -\u003e 69893\n  (gdb) p phyrow                                          -\u003e 69944\n  (gdb) p scan-\u003ecolumnScanInfo.ds[2]-\u003eblockFirstRowNum     -\u003e 66701\n  (gdb) p attnum_to_rownum[2 * 128 + segno]                -\u003e 66700\n\nstartrow/targrow are logical positions driven by the anchor, phyrow is a\nphysical row number, and column c\u0027s file only begins at row 66701 -- so\nwalking c by the logical counter looks for a row 66700 rows past its end.\n\nThe case upstream\u0027s own test covers -- a column added and never written\nto afterwards -- does not crash, because then every row is missing and\nthe check added by 3986f92616 returns the missing value before any walk\nhappens.  It takes a *partially* present column to reach the walk.\n\nPorted to the PG16 kernel:\n- aocs_gettuple_column() keeps cbdb\u0027s AOTupleId-by-value local (that\n  difference predates this commit); only upstream\u0027s rowstoprocess\n  initialisation is taken, which the new branch needs.\n- the two restructured call sites in aocs_gettuple() take upstream\u0027s\n  shape, with cbdb\u0027s \"goto out\" restored -- it has to update the scan\u0027s\n  tracking variables before returning.\n- pgstat_count_buffer_read_ao() was dropped from all three places the\n  merge reintroduced it; it belongs to 67da2c369b, which cbdb does not\n  carry.\n\nThe test additions needed one cbdb-specific correction:\ngp_acquire_sample_rows() has NUM_SAMPLE_FIXED_COLS \u003d 4 here, not 3 --\ncbdb returns an extra stadistinct_array column -- so every\n\"as (totalrows, totaldeadrows, oversized_cols_length, ...)\" list in the\nfile gains it.  Without that even a plain three-column ao_row table fails\nwith \"Returned row contains 7 attributes, but query expects 6\".  The\noutput template was rebuilt from an ao_row run and verified against both\nthe _row and _column variants.\n\nVerified: AO/AOCS regression 24/24, AO isolation2 136/136 plus\nao_partial_scan.  ANALYZE on the reproducer above now reports\nreltuples \u003d 210000 exactly, and pg_stats for the text column added the\nsame way has n_distinct \u003d 2, matching the data.\n"
    },
    {
      "commit": "6ab455d4dec783d584abf70632c32ae3c57095bf",
      "tree": "9ccf7b98329f10fff54cf6e001c84be958583f1f",
      "parents": [
        "f56ccea52526430007b0b145453eeb0b3119592d"
      ],
      "author": {
        "name": "Huansong Fu",
        "email": "fuhuansong@gmail.com",
        "time": "Mon Jan 08 13:22:53 2024 -0800"
      },
      "committer": {
        "name": "Dianjin Wang",
        "email": "wangdianjin@gmail.com",
        "time": "Wed Nov 18 16:47:42 2026 +0800"
      },
      "message": "ao/co: Support missing-mode ADD COLUMN for AOCO tables\n\n(cherry picked from commit 3986f9261643bd8c96449d80135231756a8ca9fd)\n\nADD COLUMN on an ao_column table no longer writes the new column for the\nrows that already exist: their value is recorded as missing, bounded by\nthe per-segfile lastrownums in pg_attribute_encoding, and read back from\npg_attribute.attmissingval.  Because a CO scan can project a subset of\ncolumns, and a projection of newly added columns alone would not see the\nfull set of row numbers, an \"anchor\" column -- one that is complete -- is\nalways scanned first and its row number decides whether the other columns\nhave a value on disk.  DROP COLUMN rewrites another column if it would\notherwise remove the last complete one.\n\nVerified on a 100000-row table: relfilenode unchanged, and on seg1 the\nnew column\u0027s segfile has eof \u003d 0 while the two original columns have\n133528 bytes each.  Projecting only the incomplete column still returns\nevery row.\n\nParallel sequential scan was checked explicitly, since columns no longer\nhold the same number of rows and a block range no longer covers them\nequally: with a Parallel Seq Scan plan over 210000 rows (200000 missing,\n10000 written), sum(c) is 2051405000, count(distinct c) is 10001 and\n\"WHERE c \u003d 7\" returns 200000 -- all as computed by hand.\n\nPorted to the PG16 kernel; 28 conflicts across 17 files.  Beyond the\nmechanical API differences, these needed real decisions:\n\n- appendonlyblockdirectory.c was rebuilt from HEAD and the commit\u0027s\n  changes applied one by one, rather than resolving the merge: the merge\n  interleaved AppendOnlyBlockDirectory_Init_forIndexOnlyScan(), which\n  cbdb does not have (it has its own index-only scan built on\n  CoversTuple), into the surrounding functions.  CoversTuple() itself\n  does exist here and takes the commit\u0027s change to probe\n  proj_atts[ANCHOR_COL_IN_PROJ].\n- ATExecAddColumn(): upstream\u0027s new entry logic combined with cbdb\u0027s\n  transformColumnEncoding() signature and 6-argument\n  GetAppendOnlyEntryAuxOids().  cbdb\u0027s AddCOAttributeEncodings() call is\n  kept only for AMs that advertise encoding clauses but are not AO/CO --\n  for CO it would now insert a second row for the same attnum.\n- ATExecAddColumn(): missingmode cannot be cleared from\n  rawEnt-\u003emissingMode as upstream does.  Since 487864393a8 that flag is\n  always false, which would make every ADD COLUMN ... DEFAULT write the\n  column for every row.  It is set instead from PG16\u0027s own conditions for\n  storing a missing value (plain relation, not generated, no domain\n  constraints, not volatile), before newval-\u003eop needs it, and that block\n  now tests missingmode.  Identity columns and domains with constraints\n  store no missing value, so they are written too: for AOCO,\n  setupColumnOnlyRewrite() turns their rewrite into a column-only one.\n- RemoveFastSequenceEntry(): upstream drops the ao_row-only guard since\n  ao_column uses lastrownums too, but cbdb\u0027s guard against the relation\n  already being gone (ON COMMIT DROP temp tables) has to stay.\n- README.md: only the \"Missing values\" section is taken; the \"Index only\n  scan\" section in the same hunk is context from 74246e48ed, which cbdb\n  did not take.\n- pgstat_count_buffer_read_ao() and check_attribute_encoding_entry_exist()\n  came back in with the merge; both belong to commits cbdb deliberately\n  does not carry (67da2c369b, and 4493ca3776\u0027s buggy helper that commit\n  07 replaced).\n\nSix defects were found and fixed while verifying, all but the first\nspecific to code cbdb has and upstream does not:\n\n1. \"typedef enum AOCSProjectionKind { ... };\" declares no typedef name,\n   yet the name is used as a type below -- it only compiles upstream\n   because the tag matches.  cbdb builds with -Werror and rejects it as\n   \"useless storage class specifier in empty declaration\".  Named\n   properly.  This is an upstream defect.\n2. aoco_index_build_range_scan()\u0027s projection guard from the port of\n   f41ddea703 tested proj_atts \u003d\u003d NULL, which is never true now that\n   aocs_beginscan_internal() always allocates it; num_proj_atts stayed 0\n   and GetAOCSSSegFilesTotalsWithProj() asserted.  Tests num_proj_atts\n   and sets projKind \u003d AOCS_PROJ_SOME.\n3. aocs_getnext_noqual()/_withqual() reset rowNum to -1 inside the column\n   loop when the anchor\u0027s tuple is invisible, then keep going so the\n   other columns advance their streams -- but those columns now need\n   rowNum to tell whether their value is missing, and asserted.  The\n   reset after the loop is enough.\n4. The new eval_expr_and_check_constr() helper dropped the relation name\n   from the NOT NULL and CHECK messages.  Restored, matching the rest of\n   the backend and the expected output cbdb already had.\n5. cbdb splits the scan into aocs_getnext_noqual(), _withqual() and\n   _sample(); the merge put the missing-value check only in _noqual, so a\n   qual on an incomplete column read a datum that was not there\n   (\"attnum \u003e\u003d 0 \u0026\u0026 attnum \u003c scanslot-\u003etts_nvalid\").  Added to all three.\n6. cbdb pushes per-column quals into the scan, and\n   aos_pushdown_qual[]/aos_qual_rows[] are indexed by projection\n   position, which moving the anchor column to the front permutes.  Two\n   separate bugs:\n     - the arrays were left behind, so a qual was applied to the wrong\n       column.  The same permutation is now applied to them.  (Disabling\n       the pushdown instead would silently drop those predicates: they\n       have already been removed from the scan node\u0027s own qual list.)\n     - the missing-value branch \"continue\"d past the point where the\n       column\u0027s qual is applied, letting the row through as if the qual\n       were true.  \"SELECT count(*) FROM t WHERE b \u003d 0 AND c \u003d 0\" counted\n       a row whose c is 1.2.  The qual is now applied to missing values\n       too, which is also what makes \"WHERE c \u003d 1.2\" find them.\n\nExpected outputs were regenerated and checked against upstream\u0027s:\nalter_table_aocs\u0027s lastrownums match exactly, ao_blkdir\u0027s block\ndirectory values match as a sequence, and all 26 fault-injector counts in\nao_partial_scan match -- including the scenario this commit adds.  The\nonly deliberate difference is the \"of relation\" in the two messages from\npoint 4.  fast_analyze\u0027s template uses cbdb\u0027s shorter command tags.\n\nVerified: AO/AOCS regression 24/24, AO isolation2 136/136 plus\nao_partial_scan.\n"
    },
    {
      "commit": "f56ccea52526430007b0b145453eeb0b3119592d",
      "tree": "081bfee713fc4c6623e2e118177472f8d37cdbfa",
      "parents": [
        "1c27b166ea837aa8d0dcce9321f5c99960136f5a"
      ],
      "author": {
        "name": "Huansong Fu",
        "email": "fuhuansong@gmail.com",
        "time": "Mon Jan 08 13:26:59 2024 -0800"
      },
      "committer": {
        "name": "Dianjin Wang",
        "email": "wangdianjin@gmail.com",
        "time": "Wed Nov 18 16:47:42 2026 +0800"
      },
      "message": "Fix uninitialized struct member during ADD COLUMN\n\n(cherry picked from commit a48a9410123ebe3481ebfe66bef8f4bf4af14fff)\n\naocs_writecol_finish() calls AppendOnlyBlockDirectory_End_writeCols()\nwhenever the relation has a block directory, on the assumption that\nInit_writeCols() must have run.  It need not have: aocs_writecol_rewrite()\nenters its loop on nseg \u003e\u003d 1 but skips every segfile whose total_tupcount\nis 0, so with a table that has segfiles but no live tuples,\naocs_writecol_newsegfiles() -- and with it Init_writeCols() -- is never\nreached.  palloc0 the descriptor and check blkdirRel before ending.\n\nThis one does crash cbdb today.  Reproducer:\n\n  CREATE TABLE t(a int, b int) USING ao_column DISTRIBUTED BY (a);\n  CREATE INDEX t_i ON t(a);           -- makes blkdirrelid valid\n  INSERT INTO t SELECT i,i FROM generate_series(1,10) i;\n  DELETE FROM t;\n  VACUUM t;                           -- segfiles remain, all empty\n  ALTER TABLE t ALTER COLUMN b TYPE bigint;\n\ntakes down the QE.  Core confirms the cause exactly:\n\n  #5  AppendOnlyBlockDirectory_End_writeCols (appendonlyblockdirectory.c:1793)\n  #6  aocs_writecol_finish (aocsam.c:2907)\n  #7  aocs_writecol_rewrite (aocsam.c:3954)\n  (gdb) p desc-\u003eblockDirectory.blkdirRel\n  $1 \u003d (Relation) 0x7f7f7f7f7f7f7f7f\n\ni.e. never initialised, still holding palloc\u0027s fill pattern.\n\nUpstream says \"the bug is covered by tests in subsequent commit\", but\nthat commit is not ported yet, so the reproducer is added to\naoco_column_rewrite now rather than leaving the fix untested.  Verified\nit has teeth by reverting the two lines and rerunning: the test fails\nwith the QE connection dropping at the ALTER.\n\nVerified: AO/AOCS regression 24/24, AO isolation2 136/136 plus\nao_partial_scan.\n\nuao/max_concurrency2_row failed in two of five full runs today and\npassed 3/3 standalone.  It cannot be this commit: aocs_writecol_init()\nand aocs_writecol_finish() are reachable only through the AOCO table AM\nslots (aoco_relation_add_columns / aoco_relation_rewrite_columns), and\nthat test uses ao_row.  Both failures were in its \"VACUUM in the presence\nof an old snapshot\" section, which asserts exactly which segfiles got\ncompacted versus left in AWAITING_DROP -- and the test opens 128 sessions\nand closes none of them, so the xmin horizon it vacuums against depends\non how promptly 127 idle sessions\u0027 segment backends settle.  Same family\nas the uao/brin_column and ao_partial_scan flakes already recorded.\n"
    },
    {
      "commit": "1c27b166ea837aa8d0dcce9321f5c99960136f5a",
      "tree": "c6e2b546a3230fd966cb5c2d92248af7a08eb1f8",
      "parents": [
        "ff4164cfc9d76e8c51bf0d19298b3f3d2eec4130"
      ],
      "author": {
        "name": "Huansong Fu",
        "email": "fuhuansong@gmail.com",
        "time": "Mon Jan 08 13:09:55 2024 -0800"
      },
      "committer": {
        "name": "Dianjin Wang",
        "email": "wangdianjin@gmail.com",
        "time": "Wed Nov 18 16:47:42 2026 +0800"
      },
      "message": "Fix rownum comparing logic in AppendOnlyExecutorReadBlock_BindingInit\n\n(cherry picked from commit bf02371fa3800170ab5e7b07b985b47258efa642)\n\nA row is missing an attribute when its row number is less than or equal\nto that attribute\u0027s lastrownum, so the loop that counts the attributes\npresent in a row should stop at the first attnum where rowNum \u003c\u003d\nlastrownum, not rowNum \u003c lastrownum.  Wrapped in AO_ATTR_VAL_IS_MISSING()\nso the AOCO side can reuse it; 3986f92616 does.\n\nThe off-by-one is latent rather than live, and for the same reason here\nas upstream: appendonly_insert() asks gp_fastsequence for row numbers in\nbatches, so the lastrownum recorded when a column is added points past\nthe last real row.  Reproduced upstream\u0027s example on cbdb and got the\nsame shape -- on seg1, 100 rows occupying row numbers 2..101, while\n\n  gp_fastsequence.last_sequence \u003d 200\n  pg_attribute_encoding.lastrownums \u003d {0,200}\n\nso no real row ever has rowNum \u003d\u003d lastrownum and the two comparisons\ncannot differ in practice today.\n\nConflict was whitespace only: upstream\u0027s line has a trailing space after\n\"\u0026\u0026\" that cbdb\u0027s does not.\n\nVerified: AO/AOCS regression 24/24, AO isolation2 136/136 plus\nao_partial_scan.\n"
    },
    {
      "commit": "ff4164cfc9d76e8c51bf0d19298b3f3d2eec4130",
      "tree": "d03b920e8699a53bfa6deae1d382c1df7a0e9e27",
      "parents": [
        "59f0cb82bd1554f4325e441fe44eceb9aa797d80"
      ],
      "author": {
        "name": "Huansong Fu",
        "email": "fuhuansong@gmail.com",
        "time": "Wed Dec 06 08:16:52 2023 -0800"
      },
      "committer": {
        "name": "Dianjin Wang",
        "email": "wangdianjin@gmail.com",
        "time": "Wed Nov 18 16:47:42 2026 +0800"
      },
      "message": "Allow column-only rewrite to be done with ADD CONSTRAINT for AOCO tables\n\n(cherry picked from commit f213b65b5a1d1c690e4e29c3207d40fd5c1fc2b2)\n\nAT_PASS_ADD_CONSTR was not on the list of passes that may accompany a\ncolumn-only rewrite, so combining ALTER COLUMN TYPE with an ADD\nCONSTRAINT forced a full table rewrite for no reason.  There is no\nproblem allowing it.\n\nPorted to the PG16 kernel: upstream has a single AT_PASS_ADD_CONSTR,\ndescribed as \"ADD constraints, defaults\".  PG13 split the defaults out\ninto AT_PASS_ADD_OTHERCONSTR, so cbdb needs both -- ALTER COLUMN ... SET\nDEFAULT lands in the latter, and the test\u0027s\n\n  ALTER TABLE alter_column_other ALTER COLUMN b TYPE text,\n                                 ALTER COLUMN c SET DEFAULT 5;\n\n(\"SET DEFAULT is essentially adding a constraint\") still rewrote the\ntable with only AT_PASS_ADD_CONSTR allowed.  Located with gdb at the\npass loop in setupColumnOnlyRewrite(): the iteration that clears\ncolumnar_rewrite has i \u003d 9, which is AT_PASS_ADD_OTHERCONSTR.  cbdb\u0027s\nAT_PASS_ADD_INDEXCONSTR and AT_PASS_ADD_INDEX are deliberately left out:\nupstream\u0027s AT_PASS_ADD_INDEX is not on its list either.\n\nWith that, every \"rewritten\" judgment in aoco_column_rewrite -- what the\ntest actually asserts -- matches upstream\u0027s expected output line for\nline, as do the error set and the filenum multiset.\n\nVerified: AO/AOCS regression 24/24, AO isolation2 135/136 plus\nao_partial_scan.  uao/brin_column failed once in the 136-test run with a\nblock number missing from a segfile, and passes 3/3 standalone; that run\ntook 19s against its usual 7s, and nothing here touches BRIN or AO block\nallocation.\n"
    },
    {
      "commit": "59f0cb82bd1554f4325e441fe44eceb9aa797d80",
      "tree": "9989f1b91ef22aac6dce03c8eb98f58680e10aa2",
      "parents": [
        "871874a616c74eca7d0d2e5e1d350b4f3bebf7ca"
      ],
      "author": {
        "name": "Haolin Wang",
        "email": "whaolin@vmware.com",
        "time": "Fri Dec 01 13:55:41 2023 +0800"
      },
      "committer": {
        "name": "Dianjin Wang",
        "email": "wangdianjin@gmail.com",
        "time": "Wed Nov 18 16:47:42 2026 +0800"
      },
      "message": "Support ADD COLUMN GENERATED by existing column on AOCO Tables.\n\n(cherry picked from commit 0fe9792490532a85580bca9e9f729841bfa2e96c)\n\naocs_writecol_add() evaluates each new column\u0027s expression against a\nslot filled by ExecStoreAllNullTuple() and never populated: the scan it\ndrives (column_to_scan() + aocs_begin_headerscan()) reads varblock\nheaders of a single column to learn the row counts, not any data.  That\nis fine for a constant DEFAULT, but a generated column whose expression\nreads existing columns silently gets NULL inputs.  Fall back to\nATRewriteTable() when a new value is generated and its expression\ncontains a Var, in setupColumnOnlyRewrite() for the table itself and in\nATExecAddColumn() for partitions, whose newvals are built during\nrecursion.\n\nBefore:\n\n  CREATE TABLE t(a int, b text) USING ao_column;        -- 3 rows, a \u003d 1..3\n  ALTER TABLE t ADD COLUMN c int GENERATED ALWAYS AS (a*a) STORED;\n  SELECT * FROM t;   -\u003e  c is NULL for every row\n\nao_row and heap were correct; only AOCO took the header-only path.  With\na non-strict expression it is worse than wrong data -- the upstream test\nadds a plpython generated column and gets\n\n  ERROR:  AttributeError: \u0027NoneType\u0027 object has no attribute \u0027split\u0027\n\nThis reproduces identically on a cluster built from main without any of\nthis series, so it is a pre-existing defect rather than something the\nport introduced.  Confirmed with gdb at the evaluation site\n(aocsam.c:3430, aocs_writecol_writesegfiles): econtext-\u003eecxt_scantuple\nhas tts_isnull[0] \u003d true and tts_values[0] \u003d 0 for column a, and the\nresult isnull[] comes back true.\n\nThis commit was listed under \"discard\" in\ndocs/gp7-avoid-table-rewrite-commit-correlation.md, on the grounds that\nthe target commit does not reference any identifier it introduces.  That\nis true and beside the point: it is an independent correctness fix in the\nsame function, and it is what makes the aoco_column_rewrite test -- which\nit largely creates -- pass.  The doc is corrected.\n\ncbdb\u0027s isolation2/aoco_column_rewrite is an eleven-line comment stub left\nby the gp_check_orphaned_files cherry-pick, and is not even in\nisolation2_schedule, so the column-rewrite feature ported in the earlier\ncommits of this series had no test at all.  Upstream\u0027s file is taken\nwhole and registered in the schedule; the stub\u0027s note to whoever\ncherry-picks 20f39c76f3dd is kept at the top, reformatted to line\ncomments because a /* */ block confuses pg_isolation2_regress\u0027s\nstatement/output pairing.\n\nTwo changes were needed to make it deterministic here:\n\n- gp_check_orphaned_files refuses to run while any client backend other\n  than its own is connected.  The test already quits its sessions for\n  that reason, but \"Nq:\" returns when the client socket closes, while the\n  segment backends take a moment longer; it failed about one run in three\n  with \"There is a client session running on one or more segment\".  Added\n  wait_for_sessions_to_drain(), which polls the same gp_stat_activity\n  condition the function itself uses, before each of the seven calls.\n- checkrelfilenodediff\u0027s outer query has no ordering (the inner UNION\u0027s\n  ORDER BY does not constrain it) and atmsort cannot see a prepared\n  statement\u0027s text, so its rows came back in join order; about one run in\n  eight.  Added ORDER BY a.segid, b.relname.\n\n22 consecutive runs pass with both.\n\nexpected/aoco_column_rewrite.out is regenerated and checked against\nupstream\u0027s: the rewritten t/f judgments -- what the test is actually\nasserting -- match line for line, the filenum multiset matches, and the\nerror set matches exactly.  The remaining differences are cbdb\u0027s psql\nconventions and row order where no ORDER BY applies.\n\nVerified: AO/AOCS regression 24/24, AO isolation2 136/136 (the new test\nincluded) plus ao_partial_scan.\n"
    },
    {
      "commit": "871874a616c74eca7d0d2e5e1d350b4f3bebf7ca",
      "tree": "8b4aa1b59e49547fedd594d30f9aece98fdf058f",
      "parents": [
        "048f4fed6e30a799c8e62ce4715e8f5f95c71574"
      ],
      "author": {
        "name": "Huansong Fu",
        "email": "fuhuansong@gmail.com",
        "time": "Wed Feb 14 12:09:26 2024 -0800"
      },
      "committer": {
        "name": "Dianjin Wang",
        "email": "wangdianjin@gmail.com",
        "time": "Wed Nov 18 16:47:42 2026 +0800"
      },
      "message": "Fix an error in the 2nd phase positioning in CO partial scan\n\n(cherry picked from commit acdb2c11b3c57fae94b58bfda754ad43b5ba8470)\n\nThe second positioning phase added by 296825afb8 indexed\ncolumnScanInfo.ds by the projection index instead of the attribute\nnumber.  The two agree only while the indexed columns are the leading\nones, which is what the test\u0027s index on the first two columns of\n(i, j, d) gave it.\n\nThe code half of this commit is already in: the defect was obvious while\nporting 296825afb8 -- aocs_positionscan() right above derives dsIdx from\nproj_atts[colIdx] for this very reason -- so it was fixed there rather\nthan knowingly committing a broken line.  Upstream\u0027s reasoning, arrived\nat a week later, is the same.  What this commit adds is the regression\ntest, which is the part worth having: it reorders the table to\n(d int, i int, j int2) so the brin index on (i, j) no longer starts at\nattno 0, and generalises verify_firstcol_rownum() into\nverify_rownum_vs_values(indexname, colno).\n\nIn cbdb the untested code does not merely mix up values -- column d is\nnot projected, so ds[0] was never opened and the first positioned column\ndereferences NULL.  Confirmed by reverting the two lines and rerunning:\n\n  ERROR:  Unexpected internal error (assert.c:46) (seg1 ...)\n  DETAIL:  (\"acc\", File: \"datumstream.c\", Line: 1366)\n  CONTEXT:  SQL function \"brin_summarize_range\" statement 1\n\nwith 587 differing lines; a non-cassert build would segfault.  Restored\nafterwards.\n\nexpected/ao_partial_scan.out was regenerated and checked against\nupstream\u0027s file, as for the previous commit: 24 fault counts and all 329\nBRIN summary ranges are identical sequences, and verify_rownum_vs_values\nreports 136 \u0027t\u0027 and no \u0027f\u0027 on both sides.  Its rows come out in a\ndifferent order because neither the function nor its call sites impose\none; atmsort normalises that, and three consecutive runs here differ by 0 lines.\n\nVerified: AO/AOCS regression 24/24, AO isolation2 135/135 plus\nao_partial_scan.\n"
    },
    {
      "commit": "048f4fed6e30a799c8e62ce4715e8f5f95c71574",
      "tree": "4333bee696370d889fb368cd029e58d3c896c1a7",
      "parents": [
        "bd64336abb44a0ffb2f619ff91a176756339fb6c"
      ],
      "author": {
        "name": "Huansong Fu",
        "email": "fuhuansong@gmail.com",
        "time": "Tue Feb 06 07:28:09 2024 -0800"
      },
      "committer": {
        "name": "Dianjin Wang",
        "email": "wangdianjin@gmail.com",
        "time": "Wed Nov 18 16:47:42 2026 +0800"
      },
      "message": "Positioning to target rownum in addition to target block in AOCO partial scan\n\n(cherry picked from commit 296825afb8e10ed1a7bfc83beec99422d720bdbe)\n\nAn AOCO partial scan positioned each column to the start of the varblock\ncontaining the target block, but the columns have different block\nlayouts, so those varblocks start at different rows.  aocs_getnext()\nthen assembled tuples from values that do not belong to the same row.\nAdd a second positioning phase: take the maximum first row number over\nthe selected varblocks as a common starting row, and\ndatumstreamread_find() every column to it.\n\nFixed one defect in the ported code: columnScanInfo.ds is indexed by\nattno, not by the projection index -- aocs_positionscan() derives dsIdx\nfrom proj_atts[colIdx] for exactly that reason -- but upstream passes\nds[colIdx] to datumstreamread_block() and datumstreamread_find().  That\nis only correct while the projected columns are the leading ones, which\nis what ao_partial_scan\u0027s indexes on (i, j) happen to give it; an index\non, say, (j, k) would position the wrong streams.  Uses ds[attno] here.\n\nPorted to the PG16 kernel:\n- the struct hunk again carries sampleTargetBlk (upstream 381829f80e,\n  which cbdb does not have); only the partialScan comment is taken.\n- the cleanup label keeps cbdb\u0027s progress reporting and seginfo free,\n  with the new pfree(dirEntries) alongside.\n\nThis is the commit that makes the previous one correct.  Reproducer from\nthe previous commit\u0027s message now agrees with a full index build:\n\n  full index build:        range 39 summarizes as {1277952 .. 1320000}\n  desummarize+summarize:   range 39 summarizes as {1277952 .. 1320000}\n  SELECT count(*) WHERE i \u003d 1320000  -\u003e  1 via index, 1 via seqscan\n\nIt also settles the count left open by the previous commit: all 24\nAppendOnlyStorageRead_ReadNextBlock_success counts in ao_partial_scan now\nequal upstream\u0027s, including the one that read 10 varblocks where upstream\nexpected 11 -- that was the incomplete positioning, not a cbdb\ndifference.\n\nexpected/ao_partial_scan.out was regenerated rather than merged: this\ncommit rewrites 813 of its lines to vary the column values, and taking\nupstream\u0027s file wholesale would have dropped the cbdb adaptations made\nwhen the test was introduced.  Every semantic value was then compared\nagainst upstream\u0027s file and matches exactly -- 24 fault counts, 312 BRIN\nsummary ranges, and all 32 rows of verify_firstcol_rownum (\u0027t\u0027, i.e. each\nsummarized range\u0027s minimum equals its block\u0027s first row number, which is\nwhat this commit guarantees.)  The remaining differences are cbdb\u0027s psql\nconventions: void-returning functions print a blank row and \"(1 row)\"\ninstead of \"(0 rows)\", command tags are \"CREATE\"/\"INSERT n\" rather than\n\"CREATE TABLE\"/\"INSERT 0 n\", and ABORT rather than ROLLBACK.\n\nVerified: AO/AOCS regression 24/24, AO isolation2 135/135 plus\nao_partial_scan.\n"
    },
    {
      "commit": "bd64336abb44a0ffb2f619ff91a176756339fb6c",
      "tree": "2c7ee3b531e2c5d17e10b984f91dc28c69d48c0d",
      "parents": [
        "b729f2524cdf0aedd239fb56d557b6027c42f14d"
      ],
      "author": {
        "name": "Huansong Fu",
        "email": "fuhuansong@gmail.com",
        "time": "Tue Feb 06 07:18:28 2024 -0800"
      },
      "committer": {
        "name": "Dianjin Wang",
        "email": "wangdianjin@gmail.com",
        "time": "Wed Nov 18 16:47:42 2026 +0800"
      },
      "message": "Do not read ahead blocks when opening segments in AOCO partial scan\n\n(cherry picked from commit d299e312007f70cf4133e4d2b59fbb31add78ab2)\n\nd0750b0a31\u0027s fix was incomplete: skipping the repositioning when the\ntarget offset is 0 avoids re-reading the first varblock only in that one\ncase.  Position to any other block and open_scan_seg()\u0027s read-ahead of\nthe first block still happens, and since the columns have different\nblock layouts they reach the target block on different calls to\naocs_getnext(), so the tuple it returns mixes values from different\nrows.  Drop the read-ahead for partial scans instead, as ANALYZE already\ndoes, and revert the beginFileOffset \u003d\u003d 0 special case.\n\nPorted to the PG16 kernel:\n- the struct hunk also carries sampleTargetBlk, which belongs to upstream\n  381829f80e; cbdb\u0027s AO/CO TABLESAMPLE is its own implementation and has\n  no such field.  Only partialScan is taken.\n- cbdb\u0027s read-ahead skip covers ANALYZE but not SO_TYPE_SAMPLESCAN, again\n  because its sampling path differs; the condition gains scan-\u003epartialScan\n  only.\n\nThis commit alone still leaves wrong results, which the next one\n(296825afb8) fixes: each column is positioned to the start of its\ncontaining varblock rather than to the target row, so columns whose\nblocks hold different numbers of rows start at different rows.  Verified\nby varying the values, which is what upstream\u0027s own commit message says\nthe existing tests fail to do:\n\n  CREATE TABLE tailchk(i int, j int2) USING ao_column;   -- 1,320,000 rows, i \u003d g\n  full index build:        range 39 summarizes as {1277952 .. 1320000}\n  desummarize+summarize:   range 39 summarizes as {1277952 .. 1319922}\n  SELECT count(*) WHERE i \u003d 1320000  -\u003e  0 via index, 1 via seqscan\n\nao_partial_scan\u0027s own counts cannot see this: every row in a segfile has\nthe same value, so a short scan still produces the same min/max.\n\nOne count differs from upstream and is left for the next commit to\nsettle: brin_summarize_range(\u0027aoco_partial_scan1_i_j_idx\u0027, 33554471) --\nthe last range of segfile 1 -- reads 10 varblocks here (6 for col i, 4\nfor col j, confirmed with a conditional breakpoint on the fault point)\nwhere upstream expects 11.  The other four counts this commit changes\nmatch upstream exactly.\n"
    },
    {
      "commit": "b729f2524cdf0aedd239fb56d557b6027c42f14d",
      "tree": "80922ba7f6a8fab82f7145d1917b370170acb20e",
      "parents": [
        "c532a0aaba21bcb112fc8f2ab203e58ef39c61e5"
      ],
      "author": {
        "name": "Huansong Fu",
        "email": "fuhuansong@gmail.com",
        "time": "Thu Jan 25 14:50:50 2024 -0800"
      },
      "committer": {
        "name": "Dianjin Wang",
        "email": "wangdianjin@gmail.com",
        "time": "Wed Nov 18 16:47:42 2026 +0800"
      },
      "message": "Fix an edge case bug of repositioning in AOCO partition scan\n\n(cherry picked from commit d0750b0a31f3e29926fa4176f111959d9db13918)\n\nopen_scan_seg() already reads the first varblock of each column\u0027s\nsegfile, so repositioning an AO/CO partial scan to file offset 0 makes\nit read that block a second time.  Besides the wasted read, a\nmulti-column index scan then pairs values from different rows -- column\n0 restarting at row 1 while column 1 is at row 1001 -- which corrupts\nthe index.  Return early when beginFileOffset is 0, where there is\nnothing to position to.\n\nThis removes the \"1 additional varblock read per column\" that\nao_partial_scan documented as expected for AOCO tables; the two affected\ncounts drop from 21 to 20 and from 12 to 10.  Both were verified against\nthe block directory: 324 + 162 + 324 \u003d 810 entries for the three columns\nof aoco_partial_scan1.\n\nDropped the commit\u0027s reindentation of the surviving\nAppendOnlyStorageRead_SetTemporaryStart() call, which only adds a level.\n\nVerified: AO/AOCS regression 24/24, AO isolation2 135/135 plus\nao_partial_scan.\n\nTwo flakes seen while verifying, both pre-existing and both on the\nsegment-global AppendOnlyStorageRead_ReadNextBlock_success fault, which\nao_partial_scan and ao_index_build_progress share:\n\n- ao_partial_scan\u0027s whole-relation index build read 1005 and 1234 blocks\n  instead of 810 on two runs, then 810 on the next eight.  This path\n  does not call aocs_positionscan() at all -- numblocks is\n  InvalidBlockNumber for a full index build -- so it cannot be this\n  commit.  With the fault armed and no query running the count stays 0,\n  so there is no background reader; the extra reads come from the\n  measured statement itself.\n- ao_index_build_progress failed once in a 135-test run with \"Forked\n  command is not blocking\", i.e. its 5th-occurrence suspend never fired,\n  and passed 3/3 standalone and in a second full run.\n"
    },
    {
      "commit": "c532a0aaba21bcb112fc8f2ab203e58ef39c61e5",
      "tree": "b2440f22763f916ffe8e708e349c87afb9b0daa3",
      "parents": [
        "d3ab3ae731fd6ea271d68e37a240f4d9922794f0"
      ],
      "author": {
        "name": "Divyesh Vanjare",
        "email": "vanjared@vmware.com",
        "time": "Thu Oct 05 17:58:20 2023 -0400"
      },
      "committer": {
        "name": "Dianjin Wang",
        "email": "wangdianjin@gmail.com",
        "time": "Wed Nov 18 16:47:42 2026 +0800"
      },
      "message": "Fix AT SETAM for ao_row tables with added columns\n\n(cherry picked from commit 4493ca37767b09160e460e694a2625559ca98edb)\n\nSince fast ADD COLUMN for ao_row tables, an ao_row table can carry\npg_attribute_encoding entries for only some of its columns -- the ones\nadded later, holding their lastrownums.  ALTER TABLE ... SET ACCESS\nMETHOD ao_column needs an entry for every column, so it has to update\nthe existing ones and insert the missing ones; and a switch to heap has\nto remove them, since heap tables must have none.\n\nMost of this commit was already carried, hand-written, by the port of\nd3dcb9bc97 (\"Support fast ALTER TABLE ADD COLUMN for appendonly\nrow-oriented tables\"), which hit the same wall: populate_rel_col_encodings()\nis cbdb-specific and runs in phase 2 on the original relation, where\ninserting again violates pg_attribute_encoding_attrelid_attnum_index and\ndeleting first loses the lastrownums that phase 3 still needs.  What is\nnew here:\n\n- ATAOEntries() now drops the entries on ao_row -\u003e heap as well; only the\n  AOCO -\u003e heap and AOCO -\u003e ao_row cases did.  Uses the NoCCI variant like\n  its two siblings: this runs while pg_appendonly has been transferred\n  but pg_class.relam has not been swapped, and making the deletion\n  visible there breaks the relcache build.\n- update_attribute_encoding_entry() sets nulls[] \u003d false alongside each\n  repl[] it sets.  Updating a column that was previously null (an ao_row\n  entry has no attoptions) otherwise writes a null back.\n- get_rel_attoptions() no longer asserts attoptions is non-null, for the\n  same reason.\n- UpdateOrAddAttributeEncodings() is renamed\n  UpdateOrAddAttributeEncodingsAttoptionsOnly(), which is what it does and\n  what the later fixes in this series refer to.\n\nNot taken: upstream\u0027s own AddOrUpdateCOAttributeEncodings() and its\ncheck_attribute_encoding_entry_exist() helper.  Ours is kept because it\ndiffers in two ways that matter:\n\n- the helper does MemSet(attnum_entry_present, false, sizeof(...)) on a\n  bool *, clearing 8 bytes of a MaxHeapAttributeNumber array, so attnums\n  past the eighth are decided on uninitialised stack.  That is the bug\n  7cd2336c72 has to fix later; ours looks each attnum up through the\n  ATTENCODINGNUM syscache instead and never had it.\n- on the update path upstream overwrites filenum with a freshly reserved\n  one; ours passes InvalidFileNumber so the column keeps the filenum it\n  was given by fast ADD COLUMN, which is already unique to it.\n\nswap_relation_files(): drop the ClearAttributeEncodingLastrownums() call\non the ao_row -\u003e non-CO path, added by the port of d3dcb9bc97 as the best\nthat could be done before ATAOEntries() removed the entries outright.\nThat path is reachable only for ao_row -\u003e heap, which now deletes the\ntuple a few lines later in the same command -- ERROR \"tuple already\nupdated by self\" (gdb: ClearAttributeEncodingLastrownums at cluster.c:1381\nthen simple_heap_delete from ATAOEntries at pg_appendonly.c:571).\n\nalter_table_set_am: take only this commit\u0027s two scenarios; the hunk also\ncarries external-table context from commits cbdb does not have.  cbdb\norders the attoptions keys differently (compresslevel before blocksize).\n\nVerified: AO/AOCS regression 24/24, AO isolation2 135/135 plus\nao_partial_scan.\n"
    },
    {
      "commit": "d3ab3ae731fd6ea271d68e37a240f4d9922794f0",
      "tree": "385fa9ab2f63bf86ec0b2ed7cc466a1386d93171",
      "parents": [
        "0201c92c6d9151deef97a52681c6513892e00d8b"
      ],
      "author": {
        "name": "Soumyadeep Chakraborty",
        "email": "soumyadeep2007@gmail.com",
        "time": "Thu Jun 08 00:10:23 2023 -0700"
      },
      "committer": {
        "name": "Dianjin Wang",
        "email": "wangdianjin@gmail.com",
        "time": "Wed Nov 18 16:47:42 2026 +0800"
      },
      "message": "ao/co: Implement partial scans\n\n(cherry picked from commit f41ddea703aac8d83d0270de2f9f996d27cfca31)\n\nindex_build_range_scan() on AO/CO tables used to scan the whole relation\nfor every requested block range and throw away the rows outside it,\nwhich made BRIN summarization quadratic.  It now looks the range\u0027s\nstarting block up in the block directory to get a (segment, offset) to\nstart from, handles the cases where that row number falls in a hole or\nlands beyond the segment\u0027s logicalEof, and repeats the positioning for\neach indexed column of a CO table.\n\nThis is also a prerequisite of missing-mode ADD COLUMN: once columns of\nan AOCO table no longer hold the same number of rows, index_build_range_scan()\ncan no longer assume a block range covers every column equally, and the\ntarget commit calls AOHeapBlockGet_startRowNum() from here.\n\nPorted to the PG16 kernel:\n- cbdb\u0027s own column-level predicate pushdown in aocsam.c lands exactly\n  where the upstream code does; both are kept.\n- cbdb already looks the block directory up with its 6-argument\n  GetAppendOnlyEntryAuxOids(), so upstream\u0027s second lookup is dropped --\n  but the result is now computed before beginning the scan, because the\n  projection decision below needs it.\n- The block directory reference is released before the branches rather\n  than after: the partial scan path can \"goto cleanup\", which would skip\n  a close placed at the end.\n- The cleanup label goes ahead of cbdb\u0027s progress reporting so that\n  bailing out still frees seginfo.\n\nThis also resolves two CBDB_FIXMEs that were waiting on exactly this\ncommit (\"fixme after block directory support cherry-picked\"):\naoco_index_build_range_scan() now scans only the columns the index needs\nwhen the block directory already exists, and reports a block total that\nmatches them.  Upstream gets the projection by passing a target list to\ntable_beginscan_es(), but cbdb\u0027s version of that function takes a\nPlanState, so the scan\u0027s column projection is set directly instead --\nit is still NULL at that point and would otherwise be lazily filled in\nwith every column.  Expression and predicate columns are collected with\ncbdb\u0027s extractcolumns_from_node().\n\nWithout that projection an AOCO partial scan positions and reads every\ncolumn rather than the indexed ones: ao_partial_scan measured 33 block\nreads where upstream expects 21.\n\nao_index_build_progress: blocks_total now equals col j\u0027s segfile size,\nwhich is what the test\u0027s own comment asks for (\"a total number of blocks\nthat matches the size of col j\u0027s segfile ... only column \u0027j\u0027 will be\nscanned\"); its CBDB_CHERRY_PICK_MERGE_FIXME is removed.\n\nao_partial_scan: brin_page_items() has an extra \"empty\" column since\nPG14, and pg_isolation2_regress already provides pageinspect in this\ndatabase, so the extension is created IF NOT EXISTS.\n\nrun_ao_tests.sh: keep the schedule\u0027s order instead of sorting -- these\ntests are not independent.  ao_partial_scan drops pageinspect on its way\nout while the uao/brin* tests need get_raw_page() and never create it\nthemselves, so it also gets a run of its own.\n\nVerified: AO/AOCS regression 24/24, AO isolation2 135/135 plus\nao_partial_scan.\n"
    },
    {
      "commit": "0201c92c6d9151deef97a52681c6513892e00d8b",
      "tree": "edd2de49948497469654aafdedac38f1beac324a",
      "parents": [
        "1c521421f4b12813e26196de77a2d8f477dd51bf"
      ],
      "author": {
        "name": "Huansong Fu",
        "email": "fuhuansong@gmail.com",
        "time": "Wed May 17 13:58:31 2023 -0700"
      },
      "committer": {
        "name": "Dianjin Wang",
        "email": "wangdianjin@gmail.com",
        "time": "Wed Nov 18 16:47:42 2026 +0800"
      },
      "message": "Avoid table rewrite in ALTER COLUMN SET ENCODING\n\n(cherry picked from commit 6fb70984db6c3b95883c2168e5524ee246d13fe0)\n\nALTER TABLE ... ALTER COLUMN ... SET ENCODING now rewrites just that\ncolumn instead of the whole table, reusing the column rewrite machinery\nthrough the new setupColumnOnlyRewrite().  That helper is also what the\nmissing-mode ADD COLUMN commit calls, so this is a prerequisite of the\ntarget rather than only a feature in its own right.\n\nPorted to the PG16 kernel:\n- AT_PASS_SET_ENCODING is inserted before AT_PASS_MISC rather than taking\n  upstream\u0027s numbering: cbdb has AT_PASS_ADD_INDEXCONSTR and\n  AT_PASS_ADD_OTHERCONSTR, which upstream does not, so the passes do not\n  line up.  It still lands after AT_PASS_ALTER_TYPE, which is what the\n  ordering requires.\n- Keep cbdb\u0027s PG16 signatures for ATSimplePermissions()/ATSimpleRecursion()\n  and the extended transformColumnEncoding(); only ATExecSetColumnEncoding()\n  takes upstream\u0027s new wqueue argument.\n- NewColumnValue.new_encoding is serialized in cbdb\u0027s handwritten node\n  functions (outfuncs_common.c/readfuncs_common.c), as NewColumnValue.op\n  was in the AT-alter-type commit.\n\nupdate_attribute_encoding_entry() replaces the three-argument\nupdate_attribute_encoding_attoptions() that the fast ADD COLUMN commit\nhad to introduce here: upstream\u0027s version takes filenum, lastrownums and\nattoptions and skips whichever are invalid, which is exactly what\nAddOrUpdateCOAttributeEncodings() wanted.\n\nUpstream also fixes, in this commit, the updateEncodingList() hazard that\nthe first commit of this port had to assert around: it now returns the\nupdated list and reports whether anything changed through an out\nparameter, instead of discarding lappend()\u0027s result and relying on\nin-place extension.  The assertions are therefore dropped.\n\npopulate_rel_col_encodings() keeps using AddOrUpdateCOAttributeEncodings()\nrather than upstream\u0027s AddCOAttributeEncodings() -- see the fast ADD\nCOLUMN commit for why an ao_row table\u0027s existing entries must be updated\nin place.\n\nThe regression additions for alter_table_set and the isolation2\naoco_column_rewrite test depend on tables cbdb\u0027s versions of those tests\ndo not create, so they are not taken; same as the first commit of this\nport.\n\nVerified: SET ENCODING leaves relfilenode unchanged and rewrites only the\ntargeted column\u0027s encoding; AO/AOCS regression 24/24, AO isolation2\n135/135.\n\nfsync_ao is dropped from the isolation2 list in run_ao_tests.sh: it\ncounts the files the mirror\u0027s checkpointer fsync\u0027ed since the last\ncheckpoint, which depends on everything that ran before it, so running\nonly the AO subset gives it a different starting state than the full\nschedule.  It passes on its own and does not involve this feature.\n"
    },
    {
      "commit": "1c521421f4b12813e26196de77a2d8f477dd51bf",
      "tree": "a35d8d255587aaabb2f3a63f52ef9d9c75f52ec8",
      "parents": [
        "15774a2eb25af43ee1a83c8384ecdd101b0a35c7"
      ],
      "author": {
        "name": "Huansong Fu",
        "email": "fuhuansong@gmail.com",
        "time": "Thu May 18 07:24:53 2023 -0700"
      },
      "committer": {
        "name": "Dianjin Wang",
        "email": "wangdianjin@gmail.com",
        "time": "Wed Nov 18 16:47:42 2026 +0800"
      },
      "message": "Resolve a FIXME re AOCO column write functionality in tablecmds.c\n\n(cherry picked from commit 69e57277a4e9d29d530fe8308a8c6da6df73f586)\n\nMoves the AOCO column write code out of tablecmds.c and behind the\ntableam API: column_to_scan(), ATAocsWriteNewColumns(),\nATAocsWriteSegFileNewColumns(), ATAocsRewriteColumns(),\nATAocsRewriteColumnsSegfile() and ATAocsReindexRewrittenColumns() become\naocs_writecol_add(), aocs_writecol_rewrite() and their helpers in\naocsam.c, reached through relation_add_columns/relation_rewrite_columns.\n\nPorted to the PG16 kernel:\n- relpathbackend() takes rd_locator, and RelFileNodeBackend is\n  RelFileLocatorBackend with a .locator member.  The code being moved\n  still used the PG12 spelling.\n- heapam\u0027s handler keeps cbdb\u0027s heap_vacuum_rel; upstream\u0027s\n  lazy_vacuum_rel_heap only differs by name here.\n- Only aocs_writecol_init/_add/_rewrite stay exported, as upstream has\n  it; cbdb\u0027s aocs_headerscan_*/aocs_addcol_emptyvpe declarations go away\n  with their last callers.\n- cbdb\u0027s own column-level predicate pushdown in aocsam.c\n  (aocs_col_predicate_test(), reorder_qual_col(), ...) sits exactly where\n  the moved code lands, so both are kept.\n\nRe-applied two adaptations that were made in the earlier commits of this\nport and would otherwise be lost with the code they were made to, since\nthe file it lived in is not the file it now lives in:\n- the relation name in the \"contains null values\" and \"check constraint\n  ... is violated by some row\" messages, which cbdb\u0027s expected output\n  depends on;\n- reindex_index() taking a ReindexParams pointer since PG14, where\n  upstream still passes PG12\u0027s literal 0 for \"int options\" and trips\n  \"params !\u003d NULL\".\n\nVerified: AO/AOCS regression 24/24, AO isolation2 136/136.\n"
    },
    {
      "commit": "15774a2eb25af43ee1a83c8384ecdd101b0a35c7",
      "tree": "4fe46d8d35b6f1117969579e4cb16e087c2e9a7b",
      "parents": [
        "998ea63a1ab26f79e5faa7deb29fd14c28676106"
      ],
      "author": {
        "name": "Huansong Fu",
        "email": "fuhuansong@gmail.com",
        "time": "Sun Apr 23 20:45:32 2023 -0700"
      },
      "committer": {
        "name": "Dianjin Wang",
        "email": "wangdianjin@gmail.com",
        "time": "Wed Nov 18 16:47:42 2026 +0800"
      },
      "message": "Support fast ALTER TABLE ADD COLUMN for appendonly row-oriented tables\n\n(cherry picked from commit d3dcb9bc97d82e930e9c86870713bf91ef096697)\n\nADD COLUMN on an ao_row table no longer rewrites it.  The rows that\nalready exist treat the new column as missing and read its default; the\nboundary is the per-segfile lastrownums now recorded in\npg_attribute_encoding.  catversion is bumped to 302610191 (cbdb\u0027s own\n3YYYMMDDN line -- upstream\u0027s 302305231 would move it backwards).\n\nPorted to the PG16 kernel:\n- utils/array.h must be included explicitly for ArrayBuildState and\n  deconstruct_array(); PG16 no longer pulls them in indirectly.\n- AT_REWRITE_NEW_COLUMNS_ONLY_AOCS is set where upstream sets it, at the\n  end of the defval block.  cbdb\u0027s copy of that block is PG16\u0027s\n  missing-mode code, so the hunk did not merge; without it an AOCO table\n  would neither rewrite nor write the new column, and reading it failed\n  with \"Index N exceed size of vpinfo array size N\".\n- RemoveFastSequenceEntry() looks the relation\u0027s access method up in the\n  syscache instead of opening it.  It also runs while dropping a table,\n  by which point relation_open() fails -- an ON COMMIT DROP temp table\n  aborted the commit with \"could not open relation with OID\".\n  try_table_open() is not enough: the pg_class row is still visible, so\n  it raises that same error rather than returning NULL.\n- Keep cbdb\u0027s 6-argument GetAppendOnlyEntryAuxOids() and the table name\n  in the check-constraint violation message.\n- Keep the AM-change condition on the CommandCounterIncrement() at the\n  end of swap_relation_files(); RemoveAttributeEncodingsByRelid() now\n  increments the counter itself.\n\nRemoveAttributeEncodingsByRelid() gained that CommandCounterIncrement()\nupstream, for the gp_fastsequence cleanup path.  cbdb\u0027s ATAOEntries()\ncalls it while a relation is transiently inconsistent -- pg_appendonly\nalready transferred, pg_class.relam not yet swapped -- and making that\nvisible broke every AOCO access-method change with \"could not find\npg_appendonly tuple for relation\".  Split out\nRemoveAttributeEncodingsByRelidNoCCI() for callers inside that window.\n\npopulate_rel_col_encodings() now upserts via\nAddOrUpdateCOAttributeEncodings() rather than inserting.  cbdb fills in\nthe new access method\u0027s column encodings during phase 2, directly on the\nrelation, where upstream builds them on the transient relation and clones\nthem during the swap.  An ao_row table now already has a row per column\nadded by fast ADD COLUMN, so inserting again violated\npg_attribute_encoding_attrelid_attnum_index -- and deleting first lost\nthe lastrownums that phase 3 still needs to read the old data, which is\nfar worse: it silently returned garbage for the added column instead of\nfailing.  (That function matches upstream\u0027s 4493ca3776 without the\nsizeof-on-a-pointer bug that 7cd2336c72 had to fix.)\n\nswap_relation_files() takes the transient relation\u0027s encodings when the\ntarget is CO, as upstream does.  cbdb cannot derive them on its own for\nALTER TABLE ... SET ACCESS METHOD without a WITH clause, since\ntransformColumnEncoding() builds its default from withOptions.  The\nearlier decision not to port this hunk is reversed: it used to fail with\n\"could not find pg_appendonly tuple for relation pg_temp_NNN\", which the\nNoCCI split above resolves.\n\nalter_table_ao: switching an AOCO table that uses rle_type back to\nao_row carries compresstype over and fails with \"rle_type block\ncompression not supported\".  That is a pre-existing cbdb defect --\nreproducible on a build without this feature -- which upstream\u0027s version\nof the test does not hit, so the statement resets compresstype\nexplicitly.  Worth fixing separately.\n\nappendonly: ADD COLUMN no longer rewrites the table, so gp_fastsequence\nkeeps its objmod\u003d1 entries and the query returns 6 rows instead of 3.\n\nVerified: ao_row ADD COLUMN leaves relfilenode unchanged, all rows read\nthe default, and lastrownums records the per-segfile boundary; the\nAO/AOCS regression set is 24/24.\n"
    },
    {
      "commit": "998ea63a1ab26f79e5faa7deb29fd14c28676106",
      "tree": "aa6240f6671e4cbd21ecdc72092a8ac657f01fce",
      "parents": [
        "a4a8aab6389fcade181a9a56be418e5e35cb042e"
      ],
      "author": {
        "name": "Divyesh Vanjare",
        "email": "vanjared@vmware.com",
        "time": "Thu Apr 06 15:35:28 2023 -0400"
      },
      "committer": {
        "name": "Dianjin Wang",
        "email": "wangdianjin@gmail.com",
        "time": "Wed Nov 18 16:47:42 2026 +0800"
      },
      "message": "Column rewrite for AOCO tables for AT alter type\n\n(cherry picked from commit af8b70021b81d537e4525e2e30f6ef9aa4ed0f20)\n\nPorted to the PG16 kernel:\n- NewColumnValue.op is serialized in cbdb\u0027s handwritten node functions\n  (outfuncs_common.c/readfuncs_common.c), not in outfuncs.c/readfuncs.c\n  where upstream put it.\n- AppendOnlyBlockDirectory_Init_forIndexOnlyScan() is not taken; cbdb has\n  its own AO index-only scan.  Only the addCol -\u003e writeCols rename is.\n- AppendonlyGetAuxIndex() comes from upstream c16943a6e1, a 63-file\n  catalog change (dropping pg_appendonly.visimapidxid/blkdiridxid) that\n  is well out of scope here.  The helper only walks the relation\u0027s index\n  list, so it is added to aocatalog.h on its own.\n- reindex_index() takes a ReindexParams * since PG14 and asserts it is\n  non-NULL; upstream\u0027s literal 0 was PG12\u0027s \"int options\" argument.\n- Keep cbdb\u0027s PG16 storage API in aocs_writecol_init()/newsegfiles()\n  (RelFileLocatorBackend, rd_locator, RelationGetSmgr()-\u003esmgr_ao) and its\n  6-argument GetAppendOnlyEntryAuxOids().\n- Keep cbdb\u0027s \"column %s of relation %s contains null values\" wording,\n  which upstream\u0027s rewrite of ATAocsWriteSegFileNewColumns() dropped.\n\nOnly build newvals on the QD in ATPrepAlterColumnType().  A QE runs\nATPrepCmd() over the same commands whose work queue the QD dispatched to\nit (ATController()), so it was appending a second entry for the column\nbeing altered.  ATRewriteTable() tolerates duplicates -- it just\nevaluates the column twice -- but the AOCO column rewrite does not:\naocs_writecol_init() creates one datum stream and one new segfile per\nentry, and the filenum update loop toggles the column\u0027s filenum once per\nentry.  Toggling twice on a QE while the QD toggles once leaves the two\ndisagreeing, with the QE\u0027s pg_attribute_encoding pointing back at the\npre-rewrite file; it also failed outright with \"tuple already updated by\nself\" when the second UpdateFilenumForAttnum() hit the same tuple in one\ncommand.  ATExecAddColumn() has guarded its newvals this way all along --\nthis path simply lacked the same guard, upstream included.\n\nalter_table_aocs2: ADD COLUMN on an AOCO partition no longer rewrites the\ntable, so its relfilenode is unchanged and the test now reports \"ADD\nCOLUMN optimized for table\" instead of \"full table rewritten\".  That is\nthe point of this commit.\n\nVerified: the AO/AOCS regression set (23 tests) fails only brin_ao,\nbrin_aocs and tablesample, which also fail on the unported main, and an\nALTER COLUMN TYPE leaves filenum identical on the QD and all QEs.\n"
    },
    {
      "commit": "a4a8aab6389fcade181a9a56be418e5e35cb042e",
      "tree": "5ee7626321d67e4b13c2f79579b5eae9e2cd8b2a",
      "parents": [
        "df3a166f2a321b580b917a64c381d4bfa67829c0"
      ],
      "author": {
        "name": "Divyesh Vanjare",
        "email": "vanjared@vmware.com",
        "time": "Thu Oct 06 17:44:31 2022 -0700"
      },
      "committer": {
        "name": "Dianjin Wang",
        "email": "wangdianjin@gmail.com",
        "time": "Wed Nov 18 16:47:42 2026 +0800"
      },
      "message": "Alter column encoding for AOCO tables\n\n(cherry picked from commit a07d9f80e808e7069d21342eb4bd387f1876d020)\n\nPorted to the PG16 kernel:\n- make_new_heap()/make_new_heap_with_colname() both take NewEncodings;\n  cbdb\u0027s colname variant is the real implementation.\n- AddRelationAttributeEncodings() takes an Oid, keeping cbdb\u0027s early\n  return and its non-AOCO (multi-AM) call sites.\n- Keep cbdb\u0027s extended transformColumnEncoding() signature.\n- AT_SetColumnEncoding uses the PG16 ATSimplePermissions(cmdtype, ...)\n  and ATSimpleRecursion(..., context) signatures, and is added to\n  alter_table_type_to_string().\n- updateEncodingList(): PG16 marks lappend() warn_unused_result, which\n  exposed that upstream relies on in-place list extension.  Assert the\n  list is non-NIL and that lappend() returned the same list.\n- Do NOT take upstream\u0027s pg_attribute_encoding cloning in\n  swap_relation_files().  cbdb migrates those entries in ATAOEntries()\n  for every access-method combination already, and cloning them before\n  the swap builds the transient relation\u0027s relcache entry while its\n  pg_appendonly tuple is still missing (\"could not find pg_appendonly\n  tuple for relation pg_temp_NNN\" in alter_table_set_am).\n\nVerified on a 3-primary/3-mirror demo cluster: the AO/AOCS regression\nset (23 tests) fails only brin_ao, brin_aocs and tablesample, which also\nfail on the unported main -- no regressions.\n\nTODO: the upstream alter_table_set regression additions depend on\ntables cbdb\u0027s version of that test does not create; they need to be\nrewritten self-contained before being brought over.\n"
    },
    {
      "commit": "df3a166f2a321b580b917a64c381d4bfa67829c0",
      "tree": "4d91aba534e5fd6db83276d81b3fea7a52f19445",
      "parents": [
        "9d76fa6d3013020a39b234dbdf06bb013263a9eb"
      ],
      "author": {
        "name": "Vlasdislav",
        "email": "v.shchetinin.v@gmail.com",
        "time": "Tue Nov 17 15:15:45 2026 +0300"
      },
      "committer": {
        "name": "reshke",
        "email": "reshkekirill@gmail.com",
        "time": "Wed Nov 18 11:39:04 2026 +0500"
      },
      "message": "Fix typo in RAT exclusion tag\n"
    },
    {
      "commit": "9d76fa6d3013020a39b234dbdf06bb013263a9eb",
      "tree": "98368e8866a5920fff144d6095ab420e6c601931",
      "parents": [
        "21382e256eb40add21ab5ef8396baee39044b637"
      ],
      "author": {
        "name": "Andrey Sokolov",
        "email": "sokolov.andrey.yurevich@gmail.com",
        "time": "Mon Nov 16 14:08:06 2026 +0300"
      },
      "committer": {
        "name": "Dianjin Wang",
        "email": "wangdianjin@gmail.com",
        "time": "Wed Nov 18 10:39:06 2026 +0800"
      },
      "message": "Refactor the check_splitupdate function\n\nDistribution policy is got from rel-\u003erd_cdbpolicy. There is no need to call\nGpPolicyFetch which allocates memory for GpPolicy.\nWhen the distribution policy type is not partitioned then return false at\nthe beginning of the function without filling changed_cols, because the function\ncan return true only in the case when the distribution policy is partitioned\nand there is no need to fill changed_cols for other distribution policy types.\nMake the attrno variable more local.\nReplace the key_col_updated flag setting with return to make in possible to add\nadditional checks later at the end of the function.\n"
    },
    {
      "commit": "21382e256eb40add21ab5ef8396baee39044b637",
      "tree": "c2029d6923c8a78f8d0f7b1054f22e7b665e1bdd",
      "parents": [
        "85b06fd90232c40e4ff58726eacd52dd0262dee8"
      ],
      "author": {
        "name": "Dianjin Wang",
        "email": "wangdianjin@gmail.com",
        "time": "Wed Nov 18 03:27:41 2026 +0800"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Tue Nov 17 19:27:41 2026 +0000"
      },
      "message": "CI: run the pgbench TAP tests (#2258)\n\n* CI: run the pgbench TAP tests\n\nCI does not run the TAP tests in src/bin/pgbench, so nobody sees when\npgbench breaks.\n\nAdd them to the ic-tap job, which runs on Rocky 8, 9 and 10.\n\nAssisted-by: Claude Code\n\n* pgbench: fix the option code of --use-non-unique-keys\n\nThe REL_16_9 merge moved the handler of the Cloudberry option\n--use-non-unique-keys to case 16, because PostgreSQL 15 added\n--failures-detailed with code 13.  But the long option entry still has\ncode 13.\n\nSo --use-non-unique-keys does the same as --failures-detailed:\n- With -i, pgbench fails with \"some of the specified options cannot be\n  used in initialization (-i) mode\", and does not create the tables.\n- Without -i, the option enables detailed failure reports, and the\n  keys stay unique.\n\nGive the option code 16, the same as its handler.\n\nAssisted-by: Claude Code"
    },
    {
      "commit": "85b06fd90232c40e4ff58726eacd52dd0262dee8",
      "tree": "11d1f248549aa2fefbfbdfaae7c37abe7833d60a",
      "parents": [
        "8bc274a595bee0a9b21b7100d98245f6bf0ce14b"
      ],
      "author": {
        "name": "reshke",
        "email": "reshke@double.cloud",
        "time": "Tue Nov 17 17:25:52 2026 +0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Tue Nov 17 12:25:52 2026 +0000"
      },
      "message": "Preserve parameterization in Append locus filters (#2336)\n\nKeep the child path parameterized when adding a segment-filter Result below a mixed-locus Append. Add a regression case for the replicated-parent and distributed-child path.\n\nReproduced in SQLLancer run "
    },
    {
      "commit": "8bc274a595bee0a9b21b7100d98245f6bf0ce14b",
      "tree": "e4633f7d4aba6d82f4047499d0257dc4c72a93d2",
      "parents": [
        "800f2e7052c372f238a8c5a9e3062d26ef94a7c7"
      ],
      "author": {
        "name": "Jinbao Chen",
        "email": "chenjinbao1989@gmail.com",
        "time": "Mon Nov 09 15:25:06 2026 -0500"
      },
      "committer": {
        "name": "Jinbao Chen",
        "email": "chenjinbao1989@gmail.com",
        "time": "Tue Nov 17 04:34:17 2026 -0500"
      },
      "message": "Fix and extend pull-up of correlated aggregate subqueries\n\nconvert_EXPR_to_join() turns a correlated scalar subquery such as\n\n    WHERE a \u003e (SELECT avg(x) FROM r WHERE r.y \u003d t.b)\n\ninto an inner join with a derived table grouped by the correlation\ncolumns. An outer row with no matching group is then dropped, whereas\noriginally the subquery would have been evaluated over an empty input.\nThat is only equivalent if the conjunct would have rejected the row\nanyway, which was never checked. With count(), which returns 0 for\nempty input, this gave wrong results:\n\n    SELECT * FROM t WHERE a \u003e\u003d (SELECT count(*) FROM r WHERE r.y \u003d t.b);\n\ndropped rows with a \u003d 0 and no match in r. Same for coalesce(sum(x), 0).\n\nOnly convert if we can prove that the conjunct rejects an outer row with\nno matching rows, either because:\n\n1. the subquery returns NULL for empty input (avg(), sum(), min(), ...),\n   and the NULL propagates to the conjunct through strict operators, or\n2. the subquery\u0027s value for empty input is a known constant (e.g. 0 for\n   count(*)), and constant-folding the conjunct with it yields false or\n   NULL, as in \"1 \u003d (SELECT count(*) ...)\". Only leakproof functions are\n   folded, so that e.g. 100 / count(*) cannot raise an error at plan\n   time.\n\nAlso refuse to convert subqueries with volatile functions, ORDER BY,\nDISTINCT or grouping sets, or with outer references in the target list.\n\nAt the same time, allow the sublink to be nested in an expression on\neither side of the comparison, as long as the checks above pass, e.g.\n\n    WHERE i.i_current_price \u003e 1.2 * (SELECT avg(j.i_current_price)\n                                     FROM item j\n                                     WHERE j.i_category \u003d i.i_category)\n\nPreviously only \"expr op (SELECT ...)\" was considered. This is TPC-DS\nquery 6, which took 7.1 s with the Postgres planner at scale factor 1,\nre-executing the subquery for every row of item. It now takes 0.04 s.\n\nBuilt-in aggregates with a non-strict final function or a non-NULL\ninitial state are trusted to return NULL for empty input, as documented.\nA new test in subselect_gp runs each of them over an empty input to check\nthat.\n\nThe plans in the eagerfree and bfv_dd tests, and their copies in\ncontrib/pax_storage, change, because their queries have the form\n\"x \u003c (SELECT count(*) ...)\", which is not safe to convert.\n\nReviewed-by: Leonid Borchuk \u003cleborchuk@apache.org\u003e\nReviewed-by: Max Yang \u003cyangyu@hashdata.cn\u003e\nReviewed-by: liushengsong \u003clss602726449@gmail.com\u003e\n"
    },
    {
      "commit": "800f2e7052c372f238a8c5a9e3062d26ef94a7c7",
      "tree": "8908790013e8d7085dd3716d6dba86d56d108540",
      "parents": [
        "6b467e3250b6ffb3ccb4e61235635dbd6f875b0c"
      ],
      "author": {
        "name": "krylosov-aa",
        "email": "krylosov.andrew@gmail.com",
        "time": "Sun Oct 11 01:10:52 2026 +0300"
      },
      "committer": {
        "name": "Alena Rybakina",
        "email": "58230554+Alena0704@users.noreply.github.com",
        "time": "Tue Nov 17 09:06:50 2026 +0300"
      },
      "message": "Fix flaky vacuum_self_function test\n\nThe reader function relied on a fixed sleep and could finish before\nboth VACUUMs ran, letting VACUUM drop segments the test expects to\nkeep. Block the reader on an advisory lock until both VACUUMs finish.\n"
    },
    {
      "commit": "6b467e3250b6ffb3ccb4e61235635dbd6f875b0c",
      "tree": "5a06d22045609e4a450f423bca342318558a4607",
      "parents": [
        "eb9bf338855d9b1738bc5614169a724ce508900c"
      ],
      "author": {
        "name": "reshke",
        "email": "reshke@double.cloud",
        "time": "Tue Nov 17 08:17:59 2026 +0500"
      },
      "committer": {
        "name": "GitHub",
        "email": "noreply@github.com",
        "time": "Tue Nov 17 03:17:59 2026 +0000"
      },
      "message": "Fix flaky hot standby isolation CI runs (#2324)\n\nObserved in flake CI run https://github.com/apache/cloudberry/actions/runs/43624231832/job/132540903941\n\nFix flaky CI runs of hot_standby/transaction_isolation after the injected\nstandby restart. Reconnecting a SQL session does not guarantee that WAL\nstreaming or replay has caught up, and coordinator commits can skip the\nsynchronous replication wait while the new WAL sender is catching up.\n\nInstall a GP-WAL-receiver-only fault before the restart and wait for its\nCATCHUP-to-STREAMING transition. An obsolete sender that still reports\nstreaming cannot satisfy this wait. Then create and drop a distributed\ntemporary table with remote_apply to wait for preceding WAL to be replayed.\nUse primary session 2, since session 1 has an intentionally unfinished 2PC.\n\nThe delayed-replication reproducer reports both \"catchup\" and \"streaming\"\nafter restarting standby. The fault wait stays pending until catchup\nfinishes; with walrecv_skip_flush set, the marker waits on \"SyncRep\".\nAfter releasing it, standby sees 20 completed rows and 0 pending rows;\nreleasing the pending 2PC makes its 10 rows visible. Three repeats pass."
    },
    {
      "commit": "eb9bf338855d9b1738bc5614169a724ce508900c",
      "tree": "927c9af6431737879a512c1da4dbcef4e5758225",
      "parents": [
        "bb5d6931e00d7260f6afe754c9583d2139042be3"
      ],
      "author": {
        "name": "Andrey Kazachkov",
        "email": "andrey.kazachkov@tantorlabs.ru",
        "time": "Fri Nov 06 13:14:50 2026 +0300"
      },
      "committer": {
        "name": "Max Yang",
        "email": "79948451+my-ship-it@users.noreply.github.com",
        "time": "Tue Nov 17 01:37:56 2026 +0800"
      },
      "message": "Fix EXPLAIN winner stats for parallel workers\n\nParallel workers on the same segment share a slot in the node summary.\nA later worker can overwrite that slot after an accumulator has selected\nan earlier worker as its winner. As a result, EXPLAIN ANALYZE can report\nrows, timing, loops, and memory statistics from the last processed\nworker instead of the selected worker.\n\nCopy the winner\u0027s instrumentation from its stable received statistics\nmessage rather than from the reusable per-segment summary slot.\n"
    },
    {
      "commit": "bb5d6931e00d7260f6afe754c9583d2139042be3",
      "tree": "26e0ece6785ea37178cc2f2252794ec27c489fe8",
      "parents": [
        "7a7fc3c3513f28340a9cbbe1af8605e360dcbc19"
      ],
      "author": {
        "name": "Jinbao Chen",
        "email": "chenjinbao1989@gmail.com",
        "time": "Mon Nov 02 16:33:04 2026 -0500"
      },
      "committer": {
        "name": "Dianjin Wang",
        "email": "wangdianjin@gmail.com",
        "time": "Mon Nov 16 17:27:30 2026 +0800"
      },
      "message": "Clean up GPDB_14_MERGE_FIXME comments checked by testing\n\nComment-only change.\n\n* explain.c: intoClause isn\u0027t an optimizer problem. Without this\n  assignment, EXPLAIN ANALYZE CREATE TABLE AS EXECUTE crashes the server,\n  because ExplainOneQuery() doesn\u0027t run on that path.\n* procarray.c: the local xmin is safe for definitely_needed. An xid\n  between the two bounds makes GlobalVis call ComputeXidHorizons(), which\n  takes distributed snapshots into account.\n* utility.c: CREATE TABLE LIKE ... INCLUDING ALL with legacy subpartition\n  syntax creates the indexes and constraints on all partitions, on the\n  coordinator and the segments, so expanding statements at runtime works.\n\nReviewed-by: Leonid Borchuk \u003cleborchuk@apache.org\u003e\nReviewed-by: Max Yang \u003cyangyu@hashdata.cn\u003e\n"
    },
    {
      "commit": "7a7fc3c3513f28340a9cbbe1af8605e360dcbc19",
      "tree": "f3432c63b1e9e71a4a5f5aed8252378bdc3065e5",
      "parents": [
        "783e9c92d94dcf0b2641900cdce043941e0013b7"
      ],
      "author": {
        "name": "Jinbao Chen",
        "email": "chenjinbao1989@gmail.com",
        "time": "Mon Nov 02 15:43:28 2026 -0500"
      },
      "committer": {
        "name": "Dianjin Wang",
        "email": "wangdianjin@gmail.com",
        "time": "Mon Nov 16 17:27:30 2026 +0800"
      },
      "message": "Clean up resolved GPDB_14_MERGE_FIXME comments\n\nComment-only change, no behavior change. Each FIXME was checked against\nthe current code, then removed or turned into a plain \"GPDB:\" note.\n\nResolved, so removed:\n\n* seclabel.c: these object types already return false.\n* tablecmds.c: foreign tables are already checked first.\n* createplan.c: ModifyTablePath has a single subpath.\n* CTranslatorDXLToPlStmt.cpp: splitUpdate is set, and the executor does\n  not read partColsUpdated.\n* dependency.c: every object type tracked in pg_stat_last_* has a\n  matching drop tracker.\n* decode.c, pg_control.h: 0xC0 is XLOG_NEXTRELFILENODE.\n* parse_partition_gp.c: DETACH CONCURRENTLY is disabled, so no partition\n  can be pending detach and omit_detached makes no difference.\n* pg_dump.c: the multirange function signature matches, the additional\n  function columns are queried unconditionally, and the commented-out\n  asserts were inverted.\n* copyfrom.c: CopyInitDataParser() has two callers.\n* brin_bloom_optimizer.out, brin_multi_optimizer*.out: the plans do use\n  a bitmap index scan, contrary to the comment.\n\nIntentional differences from upstream, so now documented as such: the\nhorizon comments in procarray.c, analyze.c, nbtree.c, pathnodes.h,\npg_proc.dat, varsup_test.c, pg_dump.c and type_sanity.\n\ngram.y: the keyword precedence list does not have to follow\nbare_label_keyword. Removing it causes shift/reduce conflicts, and a new\nconflicting keyword fails the build because of %expect 0. Postfix\noperators no longer exist, so describe the actual reason.\n"
    },
    {
      "commit": "783e9c92d94dcf0b2641900cdce043941e0013b7",
      "tree": "09fab73f8dff792d23a8f93625d89474251d6e5a",
      "parents": [
        "8f0bc7c37ed1f460e30049defac53628a01758aa"
      ],
      "author": {
        "name": "Jinbao Chen",
        "email": "chenjinbao1989@gmail.com",
        "time": "Thu Oct 29 20:43:45 2026 -0400"
      },
      "committer": {
        "name": "Dianjin Wang",
        "email": "wangdianjin@gmail.com",
        "time": "Mon Nov 16 17:27:30 2026 +0800"
      },
      "message": "Remove stale GPDB_14_MERGE_FIXME comments and dead code\n\nThese FIXMEs have either been resolved already or match upstream:\n\n* nodeAgg.c: hash_mem_multiplier is already applied; drop the #if 0\n  hash_mem_limit.\n* functioncmds.c: procForm is already refetched from the new tuple;\n  name the include_out_arguments argument of func_get_detail().\n* execAmi.c: upstream lists T_TidRangeScan together with T_SeqScan too.\n* typecmds.c: upstream also uses typeNamespace for the multirange array.\n* distributedlog.c: the code already returns the more accurate value.\n* cdbmutate.c: ModifyTable no longer has a plans list; its subplan is\n  lefttree, which the generic branch walks.\n* pg_dump.c: upstream does not check postDataSchemaOnly for\n  DO_TABLE_ATTACH either.\n* copyfrom.c, copyto.c: a setvbuf() failure only affects performance.\n\nAlso remove dead code: the #if 0 fetch_database_tuple() in vacuum.c,\nthe unused REINDEX_REL_RECURSING_PARTITIONED_TABLE flag, leftover\npg_pltemplate comments in gp_indexing.h, and the unused\nbinary_upgrade_next_pg_type_oid variable (its declaration is already\nunder #if 0 in binary_upgrade.h).\n"
    },
    {
      "commit": "8f0bc7c37ed1f460e30049defac53628a01758aa",
      "tree": "278997a4975934bc15a63c32edcf3df063c3dddc",
      "parents": [
        "6499c1b23abe0f199014e8677ec0e8eff1d711c2"
      ],
      "author": {
        "name": "Jianghua Yang",
        "email": "p_jianghua.yang@synxdata.com",
        "time": "Thu Oct 22 04:35:21 2026 +0800"
      },
      "committer": {
        "name": "Jianghua.yjh",
        "email": "yjhjstz@gmail.com",
        "time": "Sun Nov 15 21:00:54 2026 -0800"
      },
      "message": "fix(orca): flush pending column state when a disjunct child leaves no histogram\n\nThe null-histogram fallback added for MakeHistHashMapDisjFilter() routes\nthe child to the multi-column merge path but kept the real column id.\nThat path is otherwise only reached with colid \u003d\u003d gpos::ulong_max, which\nmakes IsNewStatsColumn() true at the top of the loop, so it assumes the\npending per-column state has already been flushed. With a real column id\nleft in place:\n\n* a later disjunct on the same column found previous_colid \u003d\u003d colid, so\n  the pending scale factor was never appended to scale_factors and was\n  overwritten instead of accumulated, making the OR estimate depend on\n  branch order;\n* the pending previous_histogram was dropped on the floor by the\n  path\u0027s \u0027previous_histogram \u003d nullptr\u0027, losing its contribution to the\n  disjunction and leaking it.\n\nFlush the pending histogram and scale factor in the fallback, then reset\ncolid to gpos::ulong_max so the invariant the multi-column path relies on\nholds again.\n\nReported-by: Alena Rybakina\n"
    },
    {
      "commit": "6499c1b23abe0f199014e8677ec0e8eff1d711c2",
      "tree": "51ca5cdb1613e4cd7396fd7df74a6da3097b556a",
      "parents": [
        "35a050733fb4db213ffc7fcc53a411800880f76d"
      ],
      "author": {
        "name": "Jianghua Yang",
        "email": "yjhjstz@gmail.com",
        "time": "Tue Sep 29 00:06:36 2026 +0800"
      },
      "committer": {
        "name": "Jianghua.yjh",
        "email": "yjhjstz@gmail.com",
        "time": "Sun Nov 15 21:00:54 2026 -0800"
      },
      "message": "fix(orca): guard missing histograms in disjunctive filter stats as well\n\nFollow-up to the null-histogram fallback in MakeHistHashMapConjFilter():\napply the same treatment in MakeHistHashMapDisjFilter() so that a filter\ncolumn without a histogram, e.g. in WHERE (c2 \u003e 0 OR c1 \u003d \u0027x\u0027), is\nestimated with the default selectivity instead of dereferencing null.\n\n* A simple predicate whose column has no histogram is skipped before the\n  per-column bookkeeping, like an unsupported predicate, so the previous\n  column\u0027s intermediate result is not flushed twice.\n* A nested conjunction/disjunction on a single column whose histogram is\n  missing from the child result falls back to the multi-column merge\n  path instead of copying a null histogram.\n* The conjunction path only replaces the column histogram after a\n  single-column disjunction when the disjunction produced one.\n\nAddresses review feedback on #1966.\n"
    },
    {
      "commit": "35a050733fb4db213ffc7fcc53a411800880f76d",
      "tree": "e3ef5c3b510e20f6cd16564a881f11f532ac1deb",
      "parents": [
        "5c40391c4c93a4073e978e730fe3d3d9472642de"
      ],
      "author": {
        "name": "Jianghua Yang",
        "email": "yjhjstz@gmail.com",
        "time": "Sat Sep 05 02:09:51 2026 +0800"
      },
      "committer": {
        "name": "Jianghua.yjh",
        "email": "yjhjstz@gmail.com",
        "time": "Sun Nov 15 21:00:54 2026 -0800"
      },
      "message": "fix(orca): merge colid-\u003eattno mapping in CStatistics::AppendStats to avoid extended-stats crash\n\nWhen a memo group\u0027s cached statistics lack columns needed by a later\nderivation request (e.g. a ROLLUP expanded into a CTE whose consumers\nrequest different column sets), the missing columns are derived\nseparately and merged via CStatistics::AppendStats(). That merge copied\nhistograms and widths only, so the colid -\u003e attno mapping (added for\nextended statistics) diverged from the histogram map: a column could\nhave a histogram but no attno entry.\n\nApplyCorrelatedStatsToScaleFactorFilterCalculation() then dereferenced\nthe result of the attno lookup without a null check and crashed the\ncoordinator with SIGSEGV whenever the table had any extended statistics\nobject with stored data and a filter referenced one of the appended\ncolumns (e.g. TPC-DS Q67 after CREATE STATISTICS (ndistinct) on\nitem/date_dim). Reproduced on main with a cassert build: colid 11 had a\nhistogram (5 entries) but the attno map only held 4 entries, attnum was\nNULL at CExtendedStatsProcessor.cpp:280. This is the same class of bug\nas the CTE remapping fix in 124a048e8c6 (gpdb#16212), which repaired\nCopyStatsWithRemap() but not AppendStats().\n\nFix both layers:\n\n* CStatistics::AppendStats() now also merges the colid -\u003e attno mapping\n  (copy-on-write, since the mapping is shared by refcount across stats\n  objects, see ScaleStats()) and adopts the input\u0027s extended-stats info\n  when none is set, restoring the invariant that every column with a\n  histogram has an attno entry.\n\n* CExtendedStatsProcessor now null-checks the attno and histogram\n  lookups and skips clauses it cannot translate, falling back to the\n  independence assumption, matching what\n  ApplyCorrelatedStatsToNDistinctCalculation() already does. Also bail\n  out gracefully if no ndistinct item matches the attribute set.\n\n* CExtendedStatsProcessor also skips system columns (attno \u003c\u003d 0):\n  extended statistics never cover them, and feeding a negative attno\n  into CBitSet::ExchangeSet() would convert it to a huge unsigned bit\n  index. The backend rejects these clauses too\n  (dependency_is_compatible_clause()).\n\nAdd a regression test with the minimized reproduction: a ROLLUP over a\njoin where the dimension table has ndistinct extended statistics and\nthe filter column is appended to the scan group\u0027s stats after the\ninitial derivation. Verified the gporca test passes with both\noptimizer\u003don and optimizer\u003doff answer files.\n\nPorted from warehouse-pg/warehouse-pg#251.\n\nCo-authored-by: Junfeng Yang \u003cjunfengyang@link.cuhk.edu.hk\u003e\n"
    },
    {
      "commit": "5c40391c4c93a4073e978e730fe3d3d9472642de",
      "tree": "d435458ab3e36121e61a918721f17f49a3b6a9ad",
      "parents": [
        "249dc0a019a7d0ea56b53f8964b628281faab017"
      ],
      "author": {
        "name": "Dianjin Wang",
        "email": "wangdianjin@gmail.com",
        "time": "Wed Nov 04 14:37:13 2026 +0800"
      },
      "committer": {
        "name": "Dianjin Wang",
        "email": "wangdianjin@gmail.com",
        "time": "Mon Nov 16 09:06:28 2026 +0800"
      },
      "message": "CI: run TAP and module suites that already pass\n\nconfigure-cloudberry.sh builds with --enable-tap-tests, but CI runs TAP\ntests only in src/test/recovery.  The other TAP suites, and the suites\nin src/pl and src/test/modules, do not run at all, so nobody sees when\nthey break.  For example, the REL_16_9 merge broke the initdb TAP test\n(#2229).\n\nAdd two test jobs with the suites that pass without changes on Rocky 8,\n9 and 10:\n\n- ic-tap: the TAP suites of pg_archivecleanup, pg_config,\n  pg_controldata, pg_resetwal, pg_waldump, libpq and the postmaster,\n  and of the ssl_passphrase_callback and test_custom_rmgrs modules.\n- ic-pl-modules: PL/Perl and twelve regression suites in\n  src/test/modules.\n\nThe build does not install src/test/modules, so those entries run\n\"install installcheck\".  The test steps joined make_configs with spaces\nand then split the result on spaces, so such an entry became two\nconfigurations.  Join the entries with newlines and read one entry per\nline instead.  All other entries give the same configurations as before.\n\nThe other suites fail now.  We will add them after we fix them in\nseparate changes.\n\nAssisted-by: Claude Code\n"
    }
  ],
  "next": "249dc0a019a7d0ea56b53f8964b628281faab017"
}
