=== Applying patches on top of PostgreSQL commit ID 9018c7d37bb464cd53567c0b553a6f49b50bec78 === /etc/rc.d/jail: WARNING: Per-jail configuration via jail_* variables is obsolete. Please consider migrating to /etc/jail.conf. Sun Apr 19 15:50:24 UTC 2026 On branch cf/5330 nothing to commit, working tree clean === using 'git am' to apply patch ./v53-0001-Add-function-to-log-the-plan-of-the-currently-ru.patch === Applying: Add function to log the plan of the currently running Using index info to reconstruct a base tree... M contrib/auto_explain/auto_explain.c M doc/src/sgml/func/func-admin.sgml M src/backend/access/transam/xact.c M src/backend/commands/Makefile M src/backend/commands/explain.c M src/backend/commands/meson.build M src/backend/executor/execMain.c M src/backend/executor/execProcnode.c M src/backend/storage/ipc/procsignal.c M src/backend/tcop/postgres.c M src/backend/utils/init/globals.c M src/include/access/xact.h M src/include/catalog/pg_proc.dat M src/include/commands/explain.h M src/include/commands/explain_state.h M src/include/executor/executor.h M src/include/miscadmin.h M src/include/storage/procsignal.h M src/test/regress/expected/misc_functions.out M src/test/regress/sql/misc_functions.sql Falling back to patching base and 3-way merge... Auto-merging src/test/regress/sql/misc_functions.sql Auto-merging src/test/regress/expected/misc_functions.out Auto-merging src/include/storage/procsignal.h Auto-merging src/include/miscadmin.h Auto-merging src/include/executor/executor.h Auto-merging src/include/commands/explain_state.h Auto-merging src/include/commands/explain.h Auto-merging src/include/catalog/pg_proc.dat Auto-merging src/include/access/xact.h Auto-merging src/backend/utils/init/globals.c Auto-merging src/backend/tcop/postgres.c Auto-merging src/backend/storage/ipc/procsignal.c CONFLICT (content): Merge conflict in src/backend/storage/ipc/procsignal.c Auto-merging src/backend/executor/execProcnode.c Auto-merging src/backend/executor/execMain.c Auto-merging src/backend/commands/meson.build Auto-merging src/backend/commands/explain.c Auto-merging src/backend/commands/Makefile Auto-merging src/backend/access/transam/xact.c Auto-merging doc/src/sgml/func/func-admin.sgml Auto-merging contrib/auto_explain/auto_explain.c CONFLICT (content): Merge conflict in contrib/auto_explain/auto_explain.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 Add function to log the plan of the currently running 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". === using patch(1) to apply patch ./v53-0001-Add-function-to-log-the-plan-of-the-currently-ru.patch === patching file contrib/auto_explain/auto_explain.c Hunk #1 FAILED at 15. Hunk #2 FAILED at 404. 2 out of 2 hunks FAILED -- saving rejects to file contrib/auto_explain/auto_explain.c.rej patching file doc/src/sgml/func/func-admin.sgml patching file src/backend/access/transam/xact.c Hunk #5 succeeded at 2977 (offset 28 lines). Hunk #6 succeeded at 5374 (offset 28 lines). patching file src/backend/commands/Makefile Hunk #1 succeeded at 31 (offset -1 lines). patching file src/backend/commands/dynamic_explain.c patching file src/backend/commands/explain.c Hunk #1 succeeded at 1092 (offset 6 lines). Hunk #2 succeeded at 1858 (offset 4 lines). Hunk #3 succeeded at 1869 (offset 4 lines). patching file src/backend/commands/meson.build Hunk #1 succeeded at 19 (offset -1 lines). patching file src/backend/executor/execMain.c Hunk #1 succeeded at 44 (offset 1 line). Hunk #2 succeeded at 324 (offset 11 lines). Hunk #3 succeeded at 337 (offset 11 lines). Hunk #4 succeeded at 406 with fuzz 1 (offset 11 lines). patching file src/backend/executor/execProcnode.c Hunk #1 succeeded at 72 with fuzz 2. Hunk #4 succeeded at 545 (offset -19 lines). patching file src/backend/storage/ipc/procsignal.c Hunk #1 FAILED at 19. Hunk #2 succeeded at 705 (offset 8 lines). 1 out of 2 hunks FAILED -- saving rejects to file src/backend/storage/ipc/procsignal.c.rej patching file src/backend/tcop/postgres.c Hunk #2 succeeded at 3609 with fuzz 1 (offset 35 lines). patching file src/backend/utils/init/globals.c patching file src/include/access/xact.h Hunk #2 succeeded at 459 with fuzz 2. patching file src/include/catalog/pg_proc.dat Hunk #1 succeeded at 8755 (offset 60 lines). patching file src/include/commands/dynamic_explain.h patching file src/include/commands/explain.h Hunk #1 succeeded at 71 (offset 1 line). Hunk #2 succeeded at 83 (offset 1 line). patching file src/include/commands/explain_state.h Hunk #1 succeeded at 73 (offset 2 lines). patching file src/include/executor/executor.h Hunk #1 succeeded at 299 (offset 1 line). patching file src/include/miscadmin.h Hunk #1 succeeded at 98 (offset 2 lines). patching file src/include/storage/procsignal.h Hunk #1 succeeded at 35 with fuzz 2. patching file src/test/modules/test_misc/t/011_pg_log_query_plan.pl patching file src/test/regress/expected/misc_functions.out Hunk #1 succeeded at 357 (offset -40 lines). patching file src/test/regress/sql/misc_functions.sql Hunk #1 succeeded at 113 (offset -41 lines). Unstaged changes after reset: M doc/src/sgml/func/func-admin.sgml M src/backend/access/transam/xact.c M src/backend/commands/Makefile M src/backend/commands/explain.c M src/backend/commands/meson.build M src/backend/executor/execMain.c M src/backend/executor/execProcnode.c M src/backend/storage/ipc/procsignal.c M src/backend/tcop/postgres.c M src/backend/utils/init/globals.c M src/include/access/xact.h M src/include/catalog/pg_proc.dat M src/include/commands/explain.h M src/include/commands/explain_state.h M src/include/executor/executor.h M src/include/miscadmin.h M src/include/storage/procsignal.h M src/test/regress/expected/misc_functions.out M src/test/regress/sql/misc_functions.sql Removing contrib/auto_explain/auto_explain.c.rej Removing src/backend/commands/dynamic_explain.c Removing src/backend/storage/ipc/procsignal.c.rej Removing src/include/commands/dynamic_explain.h Removing src/test/modules/test_misc/t/011_pg_log_query_plan.pl === using 'git apply' to apply patch ./v53-0001-Add-function-to-log-the-plan-of-the-currently-ru.patch === Applied patch to 'contrib/auto_explain/auto_explain.c' with conflicts. Applied patch to 'doc/src/sgml/func/func-admin.sgml' cleanly. Applied patch to 'src/backend/access/transam/xact.c' cleanly. Applied patch to 'src/backend/commands/Makefile' cleanly. Falling back to direct application... Applied patch to 'src/backend/commands/explain.c' cleanly. Applied patch to 'src/backend/commands/meson.build' cleanly. Applied patch to 'src/backend/executor/execMain.c' cleanly. Applied patch to 'src/backend/executor/execProcnode.c' cleanly. Applied patch to 'src/backend/storage/ipc/procsignal.c' with conflicts. Applied patch to 'src/backend/tcop/postgres.c' cleanly. Applied patch to 'src/backend/utils/init/globals.c' cleanly. Applied patch to 'src/include/access/xact.h' cleanly. Applied patch to 'src/include/catalog/pg_proc.dat' cleanly. Falling back to direct application... Applied patch to 'src/include/commands/explain.h' cleanly. Applied patch to 'src/include/commands/explain_state.h' cleanly. Applied patch to 'src/include/executor/executor.h' cleanly. Applied patch to 'src/include/miscadmin.h' cleanly. Applied patch to 'src/include/storage/procsignal.h' cleanly. Falling back to direct application... Applied patch to 'src/test/regress/expected/misc_functions.out' cleanly. Applied patch to 'src/test/regress/sql/misc_functions.sql' cleanly. U contrib/auto_explain/auto_explain.c U src/backend/storage/ipc/procsignal.c diff --cc contrib/auto_explain/auto_explain.c index 97ce498d0c1,9c04214925d..00000000000 --- a/contrib/auto_explain/auto_explain.c +++ b/contrib/auto_explain/auto_explain.c @@@ -15,7 -15,7 +15,11 @@@ #include #include "access/parallel.h" ++<<<<<<< ours +#include "commands/defrem.h" ++======= + #include "commands/dynamic_explain.h" ++>>>>>>> theirs #include "commands/explain.h" #include "commands/explain_format.h" #include "commands/explain_state.h" @@@ -449,34 -405,9 +453,40 @@@ explain_ExecutorEnd(QueryDesc *queryDes es->format = auto_explain_log_format; es->settings = auto_explain_log_settings; ++<<<<<<< ours + apply_extension_options(es, extension_options); + + ExplainBeginOutput(es); + ExplainQueryText(es, queryDesc); + ExplainQueryParameters(es, queryDesc->params, auto_explain_log_parameter_max_length); + ExplainPrintPlan(es, queryDesc); + if (es->analyze && auto_explain_log_triggers) + ExplainPrintTriggers(es, queryDesc); + if (es->costs) + ExplainPrintJITSummary(es, queryDesc); + if (explain_per_plan_hook) + (*explain_per_plan_hook) (queryDesc->plannedstmt, + NULL, es, + queryDesc->sourceText, + queryDesc->params, + queryDesc->estate->es_queryEnv); + ExplainEndOutput(es); + + /* Remove last line break */ + if (es->str->len > 0 && es->str->data[es->str->len - 1] == '\n') + es->str->data[--es->str->len] = '\0'; + + /* Fix JSON to output an object */ + if (auto_explain_log_format == EXPLAIN_FORMAT_JSON) + { + es->str->data[0] = '{'; + es->str->data[es->str->len - 1] = '}'; + } ++======= + ExplainStringAssemble(es, queryDesc, auto_explain_log_format, + auto_explain_log_triggers, + auto_explain_log_parameter_max_length); ++>>>>>>> theirs /* * Note: we rely on the existing logging of context or diff --cc src/backend/storage/ipc/procsignal.c index 264e4c22ca6,9f69cff7892..00000000000 --- a/src/backend/storage/ipc/procsignal.c +++ b/src/backend/storage/ipc/procsignal.c @@@ -19,7 -19,7 +19,11 @@@ #include "access/parallel.h" #include "commands/async.h" ++<<<<<<< ours +#include "commands/repack.h" ++======= + #include "commands/dynamic_explain.h" ++>>>>>>> theirs #include "miscadmin.h" #include "pgstat.h" #include "port/pg_bitutils.h"