diff options
author | Thomas Munro <tmunro@postgresql.org> | 2021-05-10 16:00:53 +1200 |
---|---|---|
committer | Thomas Munro <tmunro@postgresql.org> | 2021-05-10 16:06:09 +1200 |
commit | c2dc19342e05e081dc13b296787baa38352681ef (patch) | |
tree | 10ba15831ecc5e9795912cac612c871ffad63a82 /src/backend/utils/misc/guc.c | |
parent | 63db0ac3f9e6bae313da67f640c95c0045b7f0ee (diff) |
Revert recovery prefetching feature.
This set of commits has some bugs with known fixes, but at this late
stage in the release cycle it seems best to revert and resubmit next
time, along with some new automated test coverage for this whole area.
Commits reverted:
dc88460c: Doc: Review for "Optionally prefetch referenced data in recovery."
1d257577: Optionally prefetch referenced data in recovery.
f003d9f8: Add circular WAL decoding buffer.
323cbe7c: Remove read_page callback from XLogReader.
Remove the new GUC group WAL_RECOVERY recently added by a55a9847, as the
corresponding section of config.sgml is now reverted.
Discussion: https://postgr.es/m/CAOuzzgrn7iKnFRsB4MHp3UisEQAGgZMbk_ViTN4HV4-Ksq8zCg%40mail.gmail.com
Diffstat (limited to 'src/backend/utils/misc/guc.c')
-rw-r--r-- | src/backend/utils/misc/guc.c | 53 |
1 files changed, 1 insertions, 52 deletions
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index 9db40b134a8..0a180341c22 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -41,7 +41,6 @@ #include "access/twophase.h" #include "access/xact.h" #include "access/xlog_internal.h" -#include "access/xlogprefetch.h" #include "catalog/namespace.h" #include "catalog/pg_authid.h" #include "catalog/storage.h" @@ -210,7 +209,6 @@ static bool check_effective_io_concurrency(int *newval, void **extra, GucSource static bool check_maintenance_io_concurrency(int *newval, void **extra, GucSource source); static bool check_huge_page_size(int *newval, void **extra, GucSource source); static bool check_client_connection_check_interval(int *newval, void **extra, GucSource source); -static void assign_maintenance_io_concurrency(int newval, void *extra); static void assign_pgstat_temp_directory(const char *newval, void *extra); static bool check_application_name(char **newval, void **extra, GucSource source); static void assign_application_name(const char *newval, void *extra); @@ -727,8 +725,6 @@ const char *const config_group_names[] = gettext_noop("Write-Ahead Log / Checkpoints"), /* WAL_ARCHIVING */ gettext_noop("Write-Ahead Log / Archiving"), - /* WAL_RECOVERY */ - gettext_noop("Write-Ahead Log / Recovery"), /* WAL_ARCHIVE_RECOVERY */ gettext_noop("Write-Ahead Log / Archive Recovery"), /* WAL_RECOVERY_TARGET */ @@ -1280,27 +1276,6 @@ static struct config_bool ConfigureNamesBool[] = true, NULL, NULL, NULL }, - { - {"recovery_prefetch", PGC_SIGHUP, WAL_RECOVERY, - gettext_noop("Prefetch referenced blocks during recovery."), - gettext_noop("Read ahead of the current replay position to find uncached blocks.") - }, - &recovery_prefetch, - false, - NULL, assign_recovery_prefetch, NULL - }, - { - {"recovery_prefetch_fpw", PGC_SIGHUP, WAL_RECOVERY, - gettext_noop("Prefetch blocks that have full page images in the WAL."), - gettext_noop("On some systems, there is no benefit to prefetching pages that will be " - "entirely overwritten, but if the logical page size of the filesystem is " - "larger than PostgreSQL's, this can be beneficial. This option has no " - "effect unless recovery_prefetch is enabled.") - }, - &recovery_prefetch_fpw, - false, - NULL, assign_recovery_prefetch_fpw, NULL - }, { {"wal_log_hints", PGC_POSTMASTER, WAL_SETTINGS, @@ -2756,17 +2731,6 @@ static struct config_int ConfigureNamesInt[] = }, { - {"wal_decode_buffer_size", PGC_POSTMASTER, WAL_RECOVERY, - gettext_noop("Maximum buffer size for reading ahead in the WAL during recovery."), - gettext_noop("This controls the maximum distance we can read ahead in the WAL to prefetch referenced blocks."), - GUC_UNIT_BYTE - }, - &wal_decode_buffer_size, - 512 * 1024, 64 * 1024, INT_MAX, - NULL, NULL, NULL - }, - - { {"wal_keep_size", PGC_SIGHUP, REPLICATION_SENDING, gettext_noop("Sets the size of WAL files held for standby servers."), NULL, @@ -3086,8 +3050,7 @@ static struct config_int ConfigureNamesInt[] = 0, #endif 0, MAX_IO_CONCURRENCY, - check_maintenance_io_concurrency, assign_maintenance_io_concurrency, - NULL + check_maintenance_io_concurrency, NULL, NULL }, { @@ -12092,20 +12055,6 @@ check_client_connection_check_interval(int *newval, void **extra, GucSource sour } static void -assign_maintenance_io_concurrency(int newval, void *extra) -{ -#ifdef USE_PREFETCH - /* - * Reconfigure recovery prefetching, because a setting it depends on - * changed. - */ - maintenance_io_concurrency = newval; - if (AmStartupProcess()) - XLogPrefetchReconfigure(); -#endif -} - -static void assign_pgstat_temp_directory(const char *newval, void *extra) { /* check_canonical_path already canonicalized newval for us */ |