summaryrefslogtreecommitdiff
path: root/src/include/utils/guc.h
diff options
context:
space:
mode:
authorPeter Eisentraut2024-07-24 04:21:39 +0000
committerPeter Eisentraut2024-07-24 04:31:07 +0000
commit774d47b6c01a8b8111ae390b97343f25ebdf9267 (patch)
treed76544c7d7c068fbe6a10635864424b6261f8c4c /src/include/utils/guc.h
parent991f8cf8abe244547093ddffcc4b9209076f3525 (diff)
Move all extern declarations for GUC variables to header files
Add extern declarations in appropriate header files for global variables related to GUC. In many cases, this was handled quite inconsistently before, with some GUC variables declared in a header file and some only pulled in via ad-hoc extern declarations in various .c files. Also add PGDLLIMPORT qualifications to those variables. These were previously missing because src/tools/mark_pgdllimport.pl has only been used with header files. This also fixes -Wmissing-variable-declarations warnings for GUC variables (not yet part of the standard warning options). Reviewed-by: Andres Freund <[email protected]> Discussion: https://www.postgresql.org/message-id/flat/[email protected]
Diffstat (limited to 'src/include/utils/guc.h')
-rw-r--r--src/include/utils/guc.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/include/utils/guc.h b/src/include/utils/guc.h
index ff506bf48d9..cd2cee3dfe0 100644
--- a/src/include/utils/guc.h
+++ b/src/include/utils/guc.h
@@ -250,6 +250,7 @@ extern PGDLLIMPORT bool log_planner_stats;
extern PGDLLIMPORT bool log_executor_stats;
extern PGDLLIMPORT bool log_statement_stats;
extern PGDLLIMPORT bool log_btree_build_stats;
+extern PGDLLIMPORT char *event_source;
extern PGDLLIMPORT bool check_function_bodies;
extern PGDLLIMPORT bool current_role_is_superuser;
@@ -285,10 +286,34 @@ extern PGDLLIMPORT int tcp_keepalives_interval;
extern PGDLLIMPORT int tcp_keepalives_count;
extern PGDLLIMPORT int tcp_user_timeout;
+extern PGDLLIMPORT char *role_string;
+extern PGDLLIMPORT bool in_hot_standby_guc;
+
#ifdef TRACE_SORT
extern PGDLLIMPORT bool trace_sort;
#endif
+#ifdef DEBUG_BOUNDED_SORT
+extern PGDLLIMPORT bool optimize_bounded_sort;
+#endif
+
+/*
+ * Declarations for options for enum values
+ *
+ * For most parameters, these are defined statically inside guc_tables.c. But
+ * for some parameters, the definitions require symbols that are not easily
+ * available inside guc_tables.c, so they are instead defined in their home
+ * modules. For those, we keep the extern declarations here. (An alternative
+ * would be to put the extern declarations in the modules' header files, but
+ * that would then require including the definition of struct
+ * config_enum_entry into those header files.)
+ */
+extern const struct config_enum_entry archive_mode_options[];
+extern const struct config_enum_entry dynamic_shared_memory_options[];
+extern const struct config_enum_entry recovery_target_action_options[];
+extern const struct config_enum_entry wal_level_options[];
+extern const struct config_enum_entry wal_sync_method_options[];
+
/*
* Functions exported by guc.c
*/