]> granicus.if.org Git - postgresql/commit
Rework WAL-reading supporting structs
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Tue, 24 Sep 2019 19:08:31 +0000 (16:08 -0300)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Tue, 24 Sep 2019 19:39:53 +0000 (16:39 -0300)
commit709d003fbd98b975a4fbcb4c5750fa6efaf9ad87
tree27b0ace3e968a4af0a9f2ee433627562e99e92ef
parenta9ae99d0190960ce2d3dd3e5f10e7f4adc3cf203
Rework WAL-reading supporting structs

The state-tracking of WAL reading in various places was pretty messy,
mostly because the ancient physical-replication WAL reading code wasn't
using the XLogReader abstraction.  This led to some untidy code.  Make
it prettier by creating two additional supporting structs,
WALSegmentContext and WALOpenSegment which keep track of WAL-reading
state.  This makes code cleaner, as well as supports more future
cleanup.

Author: Antonin Houska
Reviewed-by: Álvaro Herrera and (older versions) Robert Haas
Discussion: https://postgr.es/m/14984.1554998742@spoje.net
12 files changed:
src/backend/access/transam/twophase.c
src/backend/access/transam/xlog.c
src/backend/access/transam/xlogreader.c
src/backend/access/transam/xlogutils.c
src/backend/replication/logical/logical.c
src/backend/replication/logical/logicalfuncs.c
src/backend/replication/walsender.c
src/bin/pg_rewind/parsexlog.c
src/bin/pg_waldump/pg_waldump.c
src/include/access/xlogreader.h
src/include/access/xlogutils.h
src/include/replication/logicalfuncs.h