agora inbox for [email protected]help / color / mirror / Atom feed
[PATCH 04/10] wal_compression_method: default to zlib.. 10+ messages / 2 participants [nested] [flat]
* [PATCH 04/10] wal_compression_method: default to zlib.. @ 2021-03-11 23:36 Justin Pryzby <[email protected]> 0 siblings, 0 replies; 10+ messages in thread From: Justin Pryzby @ 2021-03-11 23:36 UTC (permalink / raw) this is meant to exercise the CIs, and not meant to be merged --- src/backend/access/transam/xlog.c | 2 +- src/backend/utils/misc/guc.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 6eb46ea8a7..f5d4450654 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -99,7 +99,7 @@ bool EnableHotStandby = false; bool fullPageWrites = true; bool wal_log_hints = false; bool wal_compression = false; -int wal_compression_method = WAL_COMPRESSION_PGLZ; +int wal_compression_method = WAL_COMPRESSION_ZLIB; char *wal_consistency_checking_string = NULL; bool *wal_consistency_checking = NULL; bool wal_init_zero = true; diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index 8084027465..c37a8313d3 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -1269,7 +1269,7 @@ static struct config_bool ConfigureNamesBool[] = NULL }, &wal_compression, - false, + true, NULL, NULL, NULL }, @@ -4728,7 +4728,7 @@ static struct config_enum ConfigureNamesEnum[] = NULL }, &wal_compression_method, - WAL_COMPRESSION_PGLZ, wal_compression_options, + WAL_COMPRESSION_ZLIB, wal_compression_options, NULL, NULL, NULL }, -- 2.17.0 --jozmn01XJZjDjM3N Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0005-re-add-wal_compression_method-lz4.patch" ^ permalink raw reply [nested|flat] 10+ messages in thread
* [PATCH v3 1/3] s/ArchiveContext/ArchiveCallbacks @ 2023-01-28 05:01 Nathan Bossart <[email protected]> 0 siblings, 0 replies; 10+ messages in thread From: Nathan Bossart @ 2023-01-28 05:01 UTC (permalink / raw) --- src/backend/postmaster/pgarch.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/backend/postmaster/pgarch.c b/src/backend/postmaster/pgarch.c index 3c714a79c6..dda6698509 100644 --- a/src/backend/postmaster/pgarch.c +++ b/src/backend/postmaster/pgarch.c @@ -97,7 +97,7 @@ char *XLogArchiveLibrary = ""; */ static time_t last_sigterm_time = 0; static PgArchData *PgArch = NULL; -static ArchiveModuleCallbacks ArchiveContext; +static ArchiveModuleCallbacks ArchiveCallbacks; /* @@ -406,8 +406,8 @@ pgarch_ArchiverCopyLoop(void) HandlePgArchInterrupts(); /* can't do anything if not configured ... */ - if (ArchiveContext.check_configured_cb != NULL && - !ArchiveContext.check_configured_cb()) + if (ArchiveCallbacks.check_configured_cb != NULL && + !ArchiveCallbacks.check_configured_cb()) { ereport(WARNING, (errmsg("archive_mode enabled, yet archiving is not configured"))); @@ -508,7 +508,7 @@ pgarch_archiveXlog(char *xlog) snprintf(activitymsg, sizeof(activitymsg), "archiving %s", xlog); set_ps_display(activitymsg); - ret = ArchiveContext.archive_file_cb(xlog, pathname); + ret = ArchiveCallbacks.archive_file_cb(xlog, pathname); if (ret) snprintf(activitymsg, sizeof(activitymsg), "last was %s", xlog); else @@ -814,7 +814,7 @@ HandlePgArchInterrupts(void) /* * LoadArchiveLibrary * - * Loads the archiving callbacks into our local ArchiveContext. + * Loads the archiving callbacks into our local ArchiveCallbacks. */ static void LoadArchiveLibrary(void) @@ -827,7 +827,7 @@ LoadArchiveLibrary(void) errmsg("both archive_command and archive_library set"), errdetail("Only one of archive_command, archive_library may be set."))); - memset(&ArchiveContext, 0, sizeof(ArchiveModuleCallbacks)); + memset(&ArchiveCallbacks, 0, sizeof(ArchiveModuleCallbacks)); /* * If shell archiving is enabled, use our special initialization function. @@ -844,9 +844,9 @@ LoadArchiveLibrary(void) ereport(ERROR, (errmsg("archive modules have to define the symbol %s", "_PG_archive_module_init"))); - (*archive_init) (&ArchiveContext); + (*archive_init) (&ArchiveCallbacks); - if (ArchiveContext.archive_file_cb == NULL) + if (ArchiveCallbacks.archive_file_cb == NULL) ereport(ERROR, (errmsg("archive modules must register an archive callback"))); @@ -859,6 +859,6 @@ LoadArchiveLibrary(void) static void pgarch_call_module_shutdown_cb(int code, Datum arg) { - if (ArchiveContext.shutdown_cb != NULL) - ArchiveContext.shutdown_cb(); + if (ArchiveCallbacks.shutdown_cb != NULL) + ArchiveCallbacks.shutdown_cb(); } -- 2.25.1 --sm4nu43k4a2Rpi4c Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v3-0002-move-archive-module-exports-to-dedicated-headers.patch" ^ permalink raw reply [nested|flat] 10+ messages in thread
* [PATCH v4 1/3] s/ArchiveContext/ArchiveCallbacks @ 2023-01-28 05:01 Nathan Bossart <[email protected]> 0 siblings, 0 replies; 10+ messages in thread From: Nathan Bossart @ 2023-01-28 05:01 UTC (permalink / raw) --- src/backend/postmaster/pgarch.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/backend/postmaster/pgarch.c b/src/backend/postmaster/pgarch.c index 3c714a79c6..dda6698509 100644 --- a/src/backend/postmaster/pgarch.c +++ b/src/backend/postmaster/pgarch.c @@ -97,7 +97,7 @@ char *XLogArchiveLibrary = ""; */ static time_t last_sigterm_time = 0; static PgArchData *PgArch = NULL; -static ArchiveModuleCallbacks ArchiveContext; +static ArchiveModuleCallbacks ArchiveCallbacks; /* @@ -406,8 +406,8 @@ pgarch_ArchiverCopyLoop(void) HandlePgArchInterrupts(); /* can't do anything if not configured ... */ - if (ArchiveContext.check_configured_cb != NULL && - !ArchiveContext.check_configured_cb()) + if (ArchiveCallbacks.check_configured_cb != NULL && + !ArchiveCallbacks.check_configured_cb()) { ereport(WARNING, (errmsg("archive_mode enabled, yet archiving is not configured"))); @@ -508,7 +508,7 @@ pgarch_archiveXlog(char *xlog) snprintf(activitymsg, sizeof(activitymsg), "archiving %s", xlog); set_ps_display(activitymsg); - ret = ArchiveContext.archive_file_cb(xlog, pathname); + ret = ArchiveCallbacks.archive_file_cb(xlog, pathname); if (ret) snprintf(activitymsg, sizeof(activitymsg), "last was %s", xlog); else @@ -814,7 +814,7 @@ HandlePgArchInterrupts(void) /* * LoadArchiveLibrary * - * Loads the archiving callbacks into our local ArchiveContext. + * Loads the archiving callbacks into our local ArchiveCallbacks. */ static void LoadArchiveLibrary(void) @@ -827,7 +827,7 @@ LoadArchiveLibrary(void) errmsg("both archive_command and archive_library set"), errdetail("Only one of archive_command, archive_library may be set."))); - memset(&ArchiveContext, 0, sizeof(ArchiveModuleCallbacks)); + memset(&ArchiveCallbacks, 0, sizeof(ArchiveModuleCallbacks)); /* * If shell archiving is enabled, use our special initialization function. @@ -844,9 +844,9 @@ LoadArchiveLibrary(void) ereport(ERROR, (errmsg("archive modules have to define the symbol %s", "_PG_archive_module_init"))); - (*archive_init) (&ArchiveContext); + (*archive_init) (&ArchiveCallbacks); - if (ArchiveContext.archive_file_cb == NULL) + if (ArchiveCallbacks.archive_file_cb == NULL) ereport(ERROR, (errmsg("archive modules must register an archive callback"))); @@ -859,6 +859,6 @@ LoadArchiveLibrary(void) static void pgarch_call_module_shutdown_cb(int code, Datum arg) { - if (ArchiveContext.shutdown_cb != NULL) - ArchiveContext.shutdown_cb(); + if (ArchiveCallbacks.shutdown_cb != NULL) + ArchiveCallbacks.shutdown_cb(); } -- 2.25.1 --9amGYk9869ThD9tj Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v4-0002-move-archive-module-exports-to-dedicated-headers.patch" ^ permalink raw reply [nested|flat] 10+ messages in thread
* [PATCH v5 1/3] s/ArchiveContext/ArchiveCallbacks @ 2023-01-28 05:01 Nathan Bossart <[email protected]> 0 siblings, 0 replies; 10+ messages in thread From: Nathan Bossart @ 2023-01-28 05:01 UTC (permalink / raw) --- src/backend/postmaster/pgarch.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/backend/postmaster/pgarch.c b/src/backend/postmaster/pgarch.c index 3c714a79c6..dda6698509 100644 --- a/src/backend/postmaster/pgarch.c +++ b/src/backend/postmaster/pgarch.c @@ -97,7 +97,7 @@ char *XLogArchiveLibrary = ""; */ static time_t last_sigterm_time = 0; static PgArchData *PgArch = NULL; -static ArchiveModuleCallbacks ArchiveContext; +static ArchiveModuleCallbacks ArchiveCallbacks; /* @@ -406,8 +406,8 @@ pgarch_ArchiverCopyLoop(void) HandlePgArchInterrupts(); /* can't do anything if not configured ... */ - if (ArchiveContext.check_configured_cb != NULL && - !ArchiveContext.check_configured_cb()) + if (ArchiveCallbacks.check_configured_cb != NULL && + !ArchiveCallbacks.check_configured_cb()) { ereport(WARNING, (errmsg("archive_mode enabled, yet archiving is not configured"))); @@ -508,7 +508,7 @@ pgarch_archiveXlog(char *xlog) snprintf(activitymsg, sizeof(activitymsg), "archiving %s", xlog); set_ps_display(activitymsg); - ret = ArchiveContext.archive_file_cb(xlog, pathname); + ret = ArchiveCallbacks.archive_file_cb(xlog, pathname); if (ret) snprintf(activitymsg, sizeof(activitymsg), "last was %s", xlog); else @@ -814,7 +814,7 @@ HandlePgArchInterrupts(void) /* * LoadArchiveLibrary * - * Loads the archiving callbacks into our local ArchiveContext. + * Loads the archiving callbacks into our local ArchiveCallbacks. */ static void LoadArchiveLibrary(void) @@ -827,7 +827,7 @@ LoadArchiveLibrary(void) errmsg("both archive_command and archive_library set"), errdetail("Only one of archive_command, archive_library may be set."))); - memset(&ArchiveContext, 0, sizeof(ArchiveModuleCallbacks)); + memset(&ArchiveCallbacks, 0, sizeof(ArchiveModuleCallbacks)); /* * If shell archiving is enabled, use our special initialization function. @@ -844,9 +844,9 @@ LoadArchiveLibrary(void) ereport(ERROR, (errmsg("archive modules have to define the symbol %s", "_PG_archive_module_init"))); - (*archive_init) (&ArchiveContext); + (*archive_init) (&ArchiveCallbacks); - if (ArchiveContext.archive_file_cb == NULL) + if (ArchiveCallbacks.archive_file_cb == NULL) ereport(ERROR, (errmsg("archive modules must register an archive callback"))); @@ -859,6 +859,6 @@ LoadArchiveLibrary(void) static void pgarch_call_module_shutdown_cb(int code, Datum arg) { - if (ArchiveContext.shutdown_cb != NULL) - ArchiveContext.shutdown_cb(); + if (ArchiveCallbacks.shutdown_cb != NULL) + ArchiveCallbacks.shutdown_cb(); } -- 2.25.1 --+QahgC5+KEYLbs62 Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v5-0002-move-archive-module-exports-to-dedicated-headers.patch" ^ permalink raw reply [nested|flat] 10+ messages in thread
* [PATCH v6 1/3] s/ArchiveContext/ArchiveCallbacks @ 2023-01-28 05:01 Nathan Bossart <[email protected]> 0 siblings, 0 replies; 10+ messages in thread From: Nathan Bossart @ 2023-01-28 05:01 UTC (permalink / raw) --- src/backend/postmaster/pgarch.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/backend/postmaster/pgarch.c b/src/backend/postmaster/pgarch.c index e551af2905..065d7d1313 100644 --- a/src/backend/postmaster/pgarch.c +++ b/src/backend/postmaster/pgarch.c @@ -97,7 +97,7 @@ char *XLogArchiveLibrary = ""; */ static time_t last_sigterm_time = 0; static PgArchData *PgArch = NULL; -static ArchiveModuleCallbacks ArchiveContext; +static ArchiveModuleCallbacks ArchiveCallbacks; /* @@ -406,8 +406,8 @@ pgarch_ArchiverCopyLoop(void) HandlePgArchInterrupts(); /* can't do anything if not configured ... */ - if (ArchiveContext.check_configured_cb != NULL && - !ArchiveContext.check_configured_cb()) + if (ArchiveCallbacks.check_configured_cb != NULL && + !ArchiveCallbacks.check_configured_cb()) { ereport(WARNING, (errmsg("archive_mode enabled, yet archiving is not configured"))); @@ -508,7 +508,7 @@ pgarch_archiveXlog(char *xlog) snprintf(activitymsg, sizeof(activitymsg), "archiving %s", xlog); set_ps_display(activitymsg); - ret = ArchiveContext.archive_file_cb(xlog, pathname); + ret = ArchiveCallbacks.archive_file_cb(xlog, pathname); if (ret) snprintf(activitymsg, sizeof(activitymsg), "last was %s", xlog); else @@ -814,7 +814,7 @@ HandlePgArchInterrupts(void) /* * LoadArchiveLibrary * - * Loads the archiving callbacks into our local ArchiveContext. + * Loads the archiving callbacks into our local ArchiveCallbacks. */ static void LoadArchiveLibrary(void) @@ -827,7 +827,7 @@ LoadArchiveLibrary(void) errmsg("both archive_command and archive_library set"), errdetail("Only one of archive_command, archive_library may be set."))); - memset(&ArchiveContext, 0, sizeof(ArchiveModuleCallbacks)); + memset(&ArchiveCallbacks, 0, sizeof(ArchiveModuleCallbacks)); /* * If shell archiving is enabled, use our special initialization function. @@ -844,9 +844,9 @@ LoadArchiveLibrary(void) ereport(ERROR, (errmsg("archive modules have to define the symbol %s", "_PG_archive_module_init"))); - (*archive_init) (&ArchiveContext); + (*archive_init) (&ArchiveCallbacks); - if (ArchiveContext.archive_file_cb == NULL) + if (ArchiveCallbacks.archive_file_cb == NULL) ereport(ERROR, (errmsg("archive modules must register an archive callback"))); @@ -859,6 +859,6 @@ LoadArchiveLibrary(void) static void pgarch_call_module_shutdown_cb(int code, Datum arg) { - if (ArchiveContext.shutdown_cb != NULL) - ArchiveContext.shutdown_cb(); + if (ArchiveCallbacks.shutdown_cb != NULL) + ArchiveCallbacks.shutdown_cb(); } -- 2.25.1 --OXfL5xGRrasGEqWY Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v6-0002-move-archive-module-exports-to-dedicated-headers.patch" ^ permalink raw reply [nested|flat] 10+ messages in thread
* [PATCH v7 1/4] s/ArchiveContext/ArchiveCallbacks @ 2023-01-28 05:01 Nathan Bossart <[email protected]> 0 siblings, 0 replies; 10+ messages in thread From: Nathan Bossart @ 2023-01-28 05:01 UTC (permalink / raw) --- src/backend/postmaster/pgarch.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/backend/postmaster/pgarch.c b/src/backend/postmaster/pgarch.c index e551af2905..065d7d1313 100644 --- a/src/backend/postmaster/pgarch.c +++ b/src/backend/postmaster/pgarch.c @@ -97,7 +97,7 @@ char *XLogArchiveLibrary = ""; */ static time_t last_sigterm_time = 0; static PgArchData *PgArch = NULL; -static ArchiveModuleCallbacks ArchiveContext; +static ArchiveModuleCallbacks ArchiveCallbacks; /* @@ -406,8 +406,8 @@ pgarch_ArchiverCopyLoop(void) HandlePgArchInterrupts(); /* can't do anything if not configured ... */ - if (ArchiveContext.check_configured_cb != NULL && - !ArchiveContext.check_configured_cb()) + if (ArchiveCallbacks.check_configured_cb != NULL && + !ArchiveCallbacks.check_configured_cb()) { ereport(WARNING, (errmsg("archive_mode enabled, yet archiving is not configured"))); @@ -508,7 +508,7 @@ pgarch_archiveXlog(char *xlog) snprintf(activitymsg, sizeof(activitymsg), "archiving %s", xlog); set_ps_display(activitymsg); - ret = ArchiveContext.archive_file_cb(xlog, pathname); + ret = ArchiveCallbacks.archive_file_cb(xlog, pathname); if (ret) snprintf(activitymsg, sizeof(activitymsg), "last was %s", xlog); else @@ -814,7 +814,7 @@ HandlePgArchInterrupts(void) /* * LoadArchiveLibrary * - * Loads the archiving callbacks into our local ArchiveContext. + * Loads the archiving callbacks into our local ArchiveCallbacks. */ static void LoadArchiveLibrary(void) @@ -827,7 +827,7 @@ LoadArchiveLibrary(void) errmsg("both archive_command and archive_library set"), errdetail("Only one of archive_command, archive_library may be set."))); - memset(&ArchiveContext, 0, sizeof(ArchiveModuleCallbacks)); + memset(&ArchiveCallbacks, 0, sizeof(ArchiveModuleCallbacks)); /* * If shell archiving is enabled, use our special initialization function. @@ -844,9 +844,9 @@ LoadArchiveLibrary(void) ereport(ERROR, (errmsg("archive modules have to define the symbol %s", "_PG_archive_module_init"))); - (*archive_init) (&ArchiveContext); + (*archive_init) (&ArchiveCallbacks); - if (ArchiveContext.archive_file_cb == NULL) + if (ArchiveCallbacks.archive_file_cb == NULL) ereport(ERROR, (errmsg("archive modules must register an archive callback"))); @@ -859,6 +859,6 @@ LoadArchiveLibrary(void) static void pgarch_call_module_shutdown_cb(int code, Datum arg) { - if (ArchiveContext.shutdown_cb != NULL) - ArchiveContext.shutdown_cb(); + if (ArchiveCallbacks.shutdown_cb != NULL) + ArchiveCallbacks.shutdown_cb(); } -- 2.25.1 --/04w6evG8XlLl3ft Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v7-0002-move-archive-module-exports-to-dedicated-headers.patch" ^ permalink raw reply [nested|flat] 10+ messages in thread
* [PATCH v8 2/4] s/ArchiveContext/ArchiveCallbacks @ 2023-01-28 05:01 Nathan Bossart <[email protected]> 0 siblings, 0 replies; 10+ messages in thread From: Nathan Bossart @ 2023-01-28 05:01 UTC (permalink / raw) --- src/backend/postmaster/pgarch.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/backend/postmaster/pgarch.c b/src/backend/postmaster/pgarch.c index e551af2905..065d7d1313 100644 --- a/src/backend/postmaster/pgarch.c +++ b/src/backend/postmaster/pgarch.c @@ -97,7 +97,7 @@ char *XLogArchiveLibrary = ""; */ static time_t last_sigterm_time = 0; static PgArchData *PgArch = NULL; -static ArchiveModuleCallbacks ArchiveContext; +static ArchiveModuleCallbacks ArchiveCallbacks; /* @@ -406,8 +406,8 @@ pgarch_ArchiverCopyLoop(void) HandlePgArchInterrupts(); /* can't do anything if not configured ... */ - if (ArchiveContext.check_configured_cb != NULL && - !ArchiveContext.check_configured_cb()) + if (ArchiveCallbacks.check_configured_cb != NULL && + !ArchiveCallbacks.check_configured_cb()) { ereport(WARNING, (errmsg("archive_mode enabled, yet archiving is not configured"))); @@ -508,7 +508,7 @@ pgarch_archiveXlog(char *xlog) snprintf(activitymsg, sizeof(activitymsg), "archiving %s", xlog); set_ps_display(activitymsg); - ret = ArchiveContext.archive_file_cb(xlog, pathname); + ret = ArchiveCallbacks.archive_file_cb(xlog, pathname); if (ret) snprintf(activitymsg, sizeof(activitymsg), "last was %s", xlog); else @@ -814,7 +814,7 @@ HandlePgArchInterrupts(void) /* * LoadArchiveLibrary * - * Loads the archiving callbacks into our local ArchiveContext. + * Loads the archiving callbacks into our local ArchiveCallbacks. */ static void LoadArchiveLibrary(void) @@ -827,7 +827,7 @@ LoadArchiveLibrary(void) errmsg("both archive_command and archive_library set"), errdetail("Only one of archive_command, archive_library may be set."))); - memset(&ArchiveContext, 0, sizeof(ArchiveModuleCallbacks)); + memset(&ArchiveCallbacks, 0, sizeof(ArchiveModuleCallbacks)); /* * If shell archiving is enabled, use our special initialization function. @@ -844,9 +844,9 @@ LoadArchiveLibrary(void) ereport(ERROR, (errmsg("archive modules have to define the symbol %s", "_PG_archive_module_init"))); - (*archive_init) (&ArchiveContext); + (*archive_init) (&ArchiveCallbacks); - if (ArchiveContext.archive_file_cb == NULL) + if (ArchiveCallbacks.archive_file_cb == NULL) ereport(ERROR, (errmsg("archive modules must register an archive callback"))); @@ -859,6 +859,6 @@ LoadArchiveLibrary(void) static void pgarch_call_module_shutdown_cb(int code, Datum arg) { - if (ArchiveContext.shutdown_cb != NULL) - ArchiveContext.shutdown_cb(); + if (ArchiveCallbacks.shutdown_cb != NULL) + ArchiveCallbacks.shutdown_cb(); } -- 2.25.1 --4Ckj6UjgE2iN1+kY Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v8-0003-move-archive-module-exports-to-dedicated-headers.patch" ^ permalink raw reply [nested|flat] 10+ messages in thread
* [PATCH v9 1/3] s/ArchiveContext/ArchiveCallbacks @ 2023-01-28 05:01 Nathan Bossart <[email protected]> 0 siblings, 0 replies; 10+ messages in thread From: Nathan Bossart @ 2023-01-28 05:01 UTC (permalink / raw) --- src/backend/postmaster/pgarch.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/backend/postmaster/pgarch.c b/src/backend/postmaster/pgarch.c index e551af2905..065d7d1313 100644 --- a/src/backend/postmaster/pgarch.c +++ b/src/backend/postmaster/pgarch.c @@ -97,7 +97,7 @@ char *XLogArchiveLibrary = ""; */ static time_t last_sigterm_time = 0; static PgArchData *PgArch = NULL; -static ArchiveModuleCallbacks ArchiveContext; +static ArchiveModuleCallbacks ArchiveCallbacks; /* @@ -406,8 +406,8 @@ pgarch_ArchiverCopyLoop(void) HandlePgArchInterrupts(); /* can't do anything if not configured ... */ - if (ArchiveContext.check_configured_cb != NULL && - !ArchiveContext.check_configured_cb()) + if (ArchiveCallbacks.check_configured_cb != NULL && + !ArchiveCallbacks.check_configured_cb()) { ereport(WARNING, (errmsg("archive_mode enabled, yet archiving is not configured"))); @@ -508,7 +508,7 @@ pgarch_archiveXlog(char *xlog) snprintf(activitymsg, sizeof(activitymsg), "archiving %s", xlog); set_ps_display(activitymsg); - ret = ArchiveContext.archive_file_cb(xlog, pathname); + ret = ArchiveCallbacks.archive_file_cb(xlog, pathname); if (ret) snprintf(activitymsg, sizeof(activitymsg), "last was %s", xlog); else @@ -814,7 +814,7 @@ HandlePgArchInterrupts(void) /* * LoadArchiveLibrary * - * Loads the archiving callbacks into our local ArchiveContext. + * Loads the archiving callbacks into our local ArchiveCallbacks. */ static void LoadArchiveLibrary(void) @@ -827,7 +827,7 @@ LoadArchiveLibrary(void) errmsg("both archive_command and archive_library set"), errdetail("Only one of archive_command, archive_library may be set."))); - memset(&ArchiveContext, 0, sizeof(ArchiveModuleCallbacks)); + memset(&ArchiveCallbacks, 0, sizeof(ArchiveModuleCallbacks)); /* * If shell archiving is enabled, use our special initialization function. @@ -844,9 +844,9 @@ LoadArchiveLibrary(void) ereport(ERROR, (errmsg("archive modules have to define the symbol %s", "_PG_archive_module_init"))); - (*archive_init) (&ArchiveContext); + (*archive_init) (&ArchiveCallbacks); - if (ArchiveContext.archive_file_cb == NULL) + if (ArchiveCallbacks.archive_file_cb == NULL) ereport(ERROR, (errmsg("archive modules must register an archive callback"))); @@ -859,6 +859,6 @@ LoadArchiveLibrary(void) static void pgarch_call_module_shutdown_cb(int code, Datum arg) { - if (ArchiveContext.shutdown_cb != NULL) - ArchiveContext.shutdown_cb(); + if (ArchiveCallbacks.shutdown_cb != NULL) + ArchiveCallbacks.shutdown_cb(); } -- 2.25.1 --2oS5YaxWCcQjTEyO Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v9-0002-move-archive-module-exports-to-dedicated-headers.patch" ^ permalink raw reply [nested|flat] 10+ messages in thread
* [PATCH 1/4] s/ArchiveContext/ArchiveCallbacks @ 2023-01-28 05:01 Nathan Bossart <[email protected]> 0 siblings, 0 replies; 10+ messages in thread From: Nathan Bossart @ 2023-01-28 05:01 UTC (permalink / raw) --- src/backend/postmaster/pgarch.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/backend/postmaster/pgarch.c b/src/backend/postmaster/pgarch.c index 8ecdb9ca23..36800127e8 100644 --- a/src/backend/postmaster/pgarch.c +++ b/src/backend/postmaster/pgarch.c @@ -97,7 +97,7 @@ char *XLogArchiveLibrary = ""; */ static time_t last_sigterm_time = 0; static PgArchData *PgArch = NULL; -static ArchiveModuleCallbacks ArchiveContext; +static ArchiveModuleCallbacks ArchiveCallbacks; /* @@ -416,8 +416,8 @@ pgarch_ArchiverCopyLoop(void) HandlePgArchInterrupts(); /* can't do anything if not configured ... */ - if (ArchiveContext.check_configured_cb != NULL && - !ArchiveContext.check_configured_cb()) + if (ArchiveCallbacks.check_configured_cb != NULL && + !ArchiveCallbacks.check_configured_cb()) { ereport(WARNING, (errmsg("archive_mode enabled, yet archiving is not configured"))); @@ -518,7 +518,7 @@ pgarch_archiveXlog(char *xlog) snprintf(activitymsg, sizeof(activitymsg), "archiving %s", xlog); set_ps_display(activitymsg); - ret = ArchiveContext.archive_file_cb(xlog, pathname); + ret = ArchiveCallbacks.archive_file_cb(xlog, pathname); if (ret) snprintf(activitymsg, sizeof(activitymsg), "last was %s", xlog); else @@ -824,7 +824,7 @@ HandlePgArchInterrupts(void) /* * LoadArchiveLibrary * - * Loads the archiving callbacks into our local ArchiveContext. + * Loads the archiving callbacks into our local ArchiveCallbacks. */ static void LoadArchiveLibrary(void) @@ -837,7 +837,7 @@ LoadArchiveLibrary(void) errmsg("both archive_command and archive_library set"), errdetail("Only one of archive_command, archive_library may be set."))); - memset(&ArchiveContext, 0, sizeof(ArchiveModuleCallbacks)); + memset(&ArchiveCallbacks, 0, sizeof(ArchiveModuleCallbacks)); /* * If shell archiving is enabled, use our special initialization function. @@ -854,9 +854,9 @@ LoadArchiveLibrary(void) ereport(ERROR, (errmsg("archive modules have to define the symbol %s", "_PG_archive_module_init"))); - (*archive_init) (&ArchiveContext); + (*archive_init) (&ArchiveCallbacks); - if (ArchiveContext.archive_file_cb == NULL) + if (ArchiveCallbacks.archive_file_cb == NULL) ereport(ERROR, (errmsg("archive modules must register an archive callback"))); @@ -869,6 +869,6 @@ LoadArchiveLibrary(void) static void pgarch_call_module_shutdown_cb(int code, Datum arg) { - if (ArchiveContext.shutdown_cb != NULL) - ArchiveContext.shutdown_cb(); + if (ArchiveCallbacks.shutdown_cb != NULL) + ArchiveCallbacks.shutdown_cb(); } -- 2.25.1 --9amGYk9869ThD9tj Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0002-move-archive-module-exports-to-dedicated-header.patch" ^ permalink raw reply [nested|flat] 10+ messages in thread
* [PATCH v2 1/3] s/ArchiveContext/ArchiveCallbacks @ 2023-01-28 05:01 Nathan Bossart <[email protected]> 0 siblings, 0 replies; 10+ messages in thread From: Nathan Bossart @ 2023-01-28 05:01 UTC (permalink / raw) --- src/backend/postmaster/pgarch.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/backend/postmaster/pgarch.c b/src/backend/postmaster/pgarch.c index 8ecdb9ca23..36800127e8 100644 --- a/src/backend/postmaster/pgarch.c +++ b/src/backend/postmaster/pgarch.c @@ -97,7 +97,7 @@ char *XLogArchiveLibrary = ""; */ static time_t last_sigterm_time = 0; static PgArchData *PgArch = NULL; -static ArchiveModuleCallbacks ArchiveContext; +static ArchiveModuleCallbacks ArchiveCallbacks; /* @@ -416,8 +416,8 @@ pgarch_ArchiverCopyLoop(void) HandlePgArchInterrupts(); /* can't do anything if not configured ... */ - if (ArchiveContext.check_configured_cb != NULL && - !ArchiveContext.check_configured_cb()) + if (ArchiveCallbacks.check_configured_cb != NULL && + !ArchiveCallbacks.check_configured_cb()) { ereport(WARNING, (errmsg("archive_mode enabled, yet archiving is not configured"))); @@ -518,7 +518,7 @@ pgarch_archiveXlog(char *xlog) snprintf(activitymsg, sizeof(activitymsg), "archiving %s", xlog); set_ps_display(activitymsg); - ret = ArchiveContext.archive_file_cb(xlog, pathname); + ret = ArchiveCallbacks.archive_file_cb(xlog, pathname); if (ret) snprintf(activitymsg, sizeof(activitymsg), "last was %s", xlog); else @@ -824,7 +824,7 @@ HandlePgArchInterrupts(void) /* * LoadArchiveLibrary * - * Loads the archiving callbacks into our local ArchiveContext. + * Loads the archiving callbacks into our local ArchiveCallbacks. */ static void LoadArchiveLibrary(void) @@ -837,7 +837,7 @@ LoadArchiveLibrary(void) errmsg("both archive_command and archive_library set"), errdetail("Only one of archive_command, archive_library may be set."))); - memset(&ArchiveContext, 0, sizeof(ArchiveModuleCallbacks)); + memset(&ArchiveCallbacks, 0, sizeof(ArchiveModuleCallbacks)); /* * If shell archiving is enabled, use our special initialization function. @@ -854,9 +854,9 @@ LoadArchiveLibrary(void) ereport(ERROR, (errmsg("archive modules have to define the symbol %s", "_PG_archive_module_init"))); - (*archive_init) (&ArchiveContext); + (*archive_init) (&ArchiveCallbacks); - if (ArchiveContext.archive_file_cb == NULL) + if (ArchiveCallbacks.archive_file_cb == NULL) ereport(ERROR, (errmsg("archive modules must register an archive callback"))); @@ -869,6 +869,6 @@ LoadArchiveLibrary(void) static void pgarch_call_module_shutdown_cb(int code, Datum arg) { - if (ArchiveContext.shutdown_cb != NULL) - ArchiveContext.shutdown_cb(); + if (ArchiveCallbacks.shutdown_cb != NULL) + ArchiveCallbacks.shutdown_cb(); } -- 2.25.1 --cWoXeonUoKmBZSoM Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v2-0002-move-archive-module-exports-to-dedicated-header.patch" ^ permalink raw reply [nested|flat] 10+ messages in thread
end of thread, other threads:[~2023-01-28 05:01 UTC | newest] Thread overview: 10+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2021-03-11 23:36 [PATCH 04/10] wal_compression_method: default to zlib.. Justin Pryzby <[email protected]> 2023-01-28 05:01 [PATCH v9 1/3] s/ArchiveContext/ArchiveCallbacks Nathan Bossart <[email protected]> 2023-01-28 05:01 [PATCH 1/4] s/ArchiveContext/ArchiveCallbacks Nathan Bossart <[email protected]> 2023-01-28 05:01 [PATCH v7 1/4] s/ArchiveContext/ArchiveCallbacks Nathan Bossart <[email protected]> 2023-01-28 05:01 [PATCH v8 2/4] s/ArchiveContext/ArchiveCallbacks Nathan Bossart <[email protected]> 2023-01-28 05:01 [PATCH v2 1/3] s/ArchiveContext/ArchiveCallbacks Nathan Bossart <[email protected]> 2023-01-28 05:01 [PATCH v3 1/3] s/ArchiveContext/ArchiveCallbacks Nathan Bossart <[email protected]> 2023-01-28 05:01 [PATCH v4 1/3] s/ArchiveContext/ArchiveCallbacks Nathan Bossart <[email protected]> 2023-01-28 05:01 [PATCH v5 1/3] s/ArchiveContext/ArchiveCallbacks Nathan Bossart <[email protected]> 2023-01-28 05:01 [PATCH v6 1/3] s/ArchiveContext/ArchiveCallbacks Nathan Bossart <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox