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/replication/logical/logicalfuncs.c | |
parent | 63db0ac3f9e6bae313da67f640c95c0045b7f0ee (diff) | |
download | postgresql-c2dc19342e05e081dc13b296787baa38352681ef.tar.gz postgresql-c2dc19342e05e081dc13b296787baa38352681ef.zip |
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/replication/logical/logicalfuncs.c')
-rw-r--r-- | src/backend/replication/logical/logicalfuncs.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/backend/replication/logical/logicalfuncs.c b/src/backend/replication/logical/logicalfuncs.c index 8f8c129620f..01d354829b9 100644 --- a/src/backend/replication/logical/logicalfuncs.c +++ b/src/backend/replication/logical/logicalfuncs.c @@ -233,8 +233,9 @@ pg_logical_slot_get_changes_guts(FunctionCallInfo fcinfo, bool confirm, bool bin ctx = CreateDecodingContext(InvalidXLogRecPtr, options, false, - read_local_xlog_page, - wal_segment_close, + XL_ROUTINE(.page_read = read_local_xlog_page, + .segment_open = wal_segment_open, + .segment_close = wal_segment_close), LogicalOutputPrepareWrite, LogicalOutputWrite, NULL); @@ -283,13 +284,7 @@ pg_logical_slot_get_changes_guts(FunctionCallInfo fcinfo, bool confirm, bool bin XLogRecord *record; char *errm = NULL; - while (XLogReadRecord(ctx->reader, &record, &errm) == - XLREAD_NEED_DATA) - { - if (!ctx->page_read(ctx->reader)) - break; - } - + record = XLogReadRecord(ctx->reader, &errm); if (errm) elog(ERROR, "%s", errm); |