=== Applying patches on top of PostgreSQL commit ID caa76b91a60681dff0bf193b64d4dcdc1014e036 === /etc/rc.d/jail: WARNING: Per-jail configuration via jail_* variables is obsolete. Please consider migrating to /etc/jail.conf. Tue May 6 12:14:20 UTC 2025 On branch cf/5740 nothing to commit, working tree clean === using 'git am' to apply patch ./0001-Fix-a-typo.patch === Applying: Fix a typo Using index info to reconstruct a base tree... M src/backend/utils/adt/selfuncs.c Falling back to patching base and 3-way merge... Auto-merging src/backend/utils/adt/selfuncs.c CONFLICT (content): Merge conflict in src/backend/utils/adt/selfuncs.c error: Failed to merge in the changes. hint: Use 'git am --show-current-patch=diff' to see the failed patch Patch failed at 0001 Fix a typo When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort". Unstaged changes after reset: M src/backend/utils/adt/selfuncs.c === using patch(1) to apply patch ./0001-Fix-a-typo.patch === patching file src/backend/utils/adt/selfuncs.c Hunk #1 FAILED at 4148. 1 out of 1 hunk FAILED -- saving rejects to file src/backend/utils/adt/selfuncs.c.rej Removing src/backend/utils/adt/selfuncs.c.rej === using 'git apply' to apply patch ./0001-Fix-a-typo.patch === Applied patch to 'src/backend/utils/adt/selfuncs.c' with conflicts. U src/backend/utils/adt/selfuncs.c diff --cc src/backend/utils/adt/selfuncs.c index a96b1b9c0bc,23abfafb165..00000000000 --- a/src/backend/utils/adt/selfuncs.c +++ b/src/backend/utils/adt/selfuncs.c @@@ -4200,18 -4146,14 +4200,25 @@@ estimate_hashagg_tablesize(PlannerInfo */ /* ++<<<<<<< ours + * Find the best matching ndistinct extended statistics for the given list of + * GroupVarInfos. ++======= + * Find applicable ndistinct statistics for the given list of VarInfos (which + * must all belong to the given rel), and update *ndistinct to the estimate of + * the MVNDistinctItem that best matches. If a match is found, *varinfos is + * updated to remove the list of matched varinfos. ++>>>>>>> theirs * - * Varinfos that aren't for simple Vars are ignored. + * Callers must ensure that the given GroupVarInfos all belong to 'rel' and + * the GroupVarInfos list does not contain any duplicate Vars or expressions. * - * Return true if we're able to find a match, false otherwise. + * When statistics are found that match > 1 of the given GroupVarInfo, the + * *ndistinct parameter is set according to the ndistinct estimate and a new + * list is built with the matching GroupVarInfos removed, which is output via + * the *varinfos parameter before returning true. When no matching stats are + * found, false is returned and the *varinfos and *ndistinct parameters are + * left untouched. */ static bool estimate_multivariate_ndistinct(PlannerInfo *root, RelOptInfo *rel,