Content-Length: 448671 | pFad | http://github.com/tonybelloni/postgres/commit/f5d9698a8400972bd604069a3f15ca33e535ea6e

87 Add infrastructure to save and restore GUC values. · tonybelloni/postgres@f5d9698 · GitHub
Skip to content

Commit f5d9698

Browse files
committed
Add infrastructure to save and restore GUC values.
This is further infrastructure for parallelism. Amit Khandekar, Noah Misch, Robert Haas
1 parent 49b86fb commit f5d9698

File tree

7 files changed

+446
-43
lines changed

7 files changed

+446
-43
lines changed

contrib/dblink/dblink.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -2980,7 +2980,7 @@ applyRemoteGucs(PGconn *conn)
29802980
/* Apply the option (this will throw error on failure) */
29812981
(void) set_config_option(gucName, remoteVal,
29822982
PGC_USERSET, PGC_S_SESSION,
2983-
GUC_ACTION_SAVE, true, 0);
2983+
GUC_ACTION_SAVE, true, 0, false);
29842984
}
29852985

29862986
return nestlevel;

contrib/postgres_fdw/postgres_fdw.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -2104,15 +2104,15 @@ set_transmission_modes(void)
21042104
if (DateStyle != USE_ISO_DATES)
21052105
(void) set_config_option("datestyle", "ISO",
21062106
PGC_USERSET, PGC_S_SESSION,
2107-
GUC_ACTION_SAVE, true, 0);
2107+
GUC_ACTION_SAVE, true, 0, false);
21082108
if (IntervalStyle != INTSTYLE_POSTGRES)
21092109
(void) set_config_option("intervalstyle", "postgres",
21102110
PGC_USERSET, PGC_S_SESSION,
2111-
GUC_ACTION_SAVE, true, 0);
2111+
GUC_ACTION_SAVE, true, 0, false);
21122112
if (extra_float_digits < 3)
21132113
(void) set_config_option("extra_float_digits", "3",
21142114
PGC_USERSET, PGC_S_SESSION,
2115-
GUC_ACTION_SAVE, true, 0);
2115+
GUC_ACTION_SAVE, true, 0, false);
21162116

21172117
return nestlevel;
21182118
}

src/backend/commands/extension.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -814,11 +814,11 @@ execute_extension_script(Oid extensionOid, ExtensionControlFile *control,
814814
if (client_min_messages < WARNING)
815815
(void) set_config_option("client_min_messages", "warning",
816816
PGC_USERSET, PGC_S_SESSION,
817-
GUC_ACTION_SAVE, true, 0);
817+
GUC_ACTION_SAVE, true, 0, false);
818818
if (log_min_messages < WARNING)
819819
(void) set_config_option("log_min_messages", "warning",
820820
PGC_SUSET, PGC_S_SESSION,
821-
GUC_ACTION_SAVE, true, 0);
821+
GUC_ACTION_SAVE, true, 0, false);
822822

823823
/*
824824
* Set up the search path to contain the target schema, then the schemas
@@ -843,7 +843,7 @@ execute_extension_script(Oid extensionOid, ExtensionControlFile *control,
843843

844844
(void) set_config_option("search_path", pathbuf.data,
845845
PGC_USERSET, PGC_S_SESSION,
846-
GUC_ACTION_SAVE, true, 0);
846+
GUC_ACTION_SAVE, true, 0, false);
847847

848848
/*
849849
* Set creating_extension and related variables so that

src/backend/utils/adt/ri_triggers.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -2422,7 +2422,7 @@ RI_Initial_Check(Trigger *trigger, Relation fk_rel, Relation pk_rel)
24222422
snprintf(workmembuf, sizeof(workmembuf), "%d", maintenance_work_mem);
24232423
(void) set_config_option("work_mem", workmembuf,
24242424
PGC_USERSET, PGC_S_SESSION,
2425-
GUC_ACTION_SAVE, true, 0);
2425+
GUC_ACTION_SAVE, true, 0, false);
24262426

24272427
if (SPI_connect() != SPI_OK_CONNECT)
24282428
elog(ERROR, "SPI_connect failed");

src/backend/utils/misc/guc-file.l

+2-2
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ ProcessConfigFile(GucContext context)
318318
/* Now we can re-apply the wired-in default (i.e., the boot_val) */
319319
if (set_config_option(gconf->name, NULL,
320320
context, PGC_S_DEFAULT,
321-
GUC_ACTION_SET, true, 0) > 0)
321+
GUC_ACTION_SET, true, 0, false) > 0)
322322
{
323323
/* Log the change if appropriate */
324324
if (context == PGC_SIGHUP)
@@ -373,7 +373,7 @@ ProcessConfigFile(GucContext context)
373373

374374
scres = set_config_option(item->name, item->value,
375375
context, PGC_S_FILE,
376-
GUC_ACTION_SET, true, 0);
376+
GUC_ACTION_SET, true, 0, false);
377377
if (scres > 0)
378378
{
379379
/* variable was updated, so log the change if appropriate */

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/tonybelloni/postgres/commit/f5d9698a8400972bd604069a3f15ca33e535ea6e

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy