mirror of
https://github.com/postgres/postgres.git
synced 2026-02-22 01:11:05 -05:00
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
19 lines
575 B
C
19 lines
575 B
C
/*-------------------------------------------------------------------------
|
|
* logicalfuncs.h
|
|
* PostgreSQL WAL to logical transformation support functions
|
|
*
|
|
* Copyright (c) 2012-2019, PostgreSQL Global Development Group
|
|
*
|
|
*-------------------------------------------------------------------------
|
|
*/
|
|
#ifndef LOGICALFUNCS_H
|
|
#define LOGICALFUNCS_H
|
|
|
|
#include "replication/logical.h"
|
|
|
|
extern int logical_read_local_xlog_page(XLogReaderState *state,
|
|
XLogRecPtr targetPagePtr,
|
|
int reqLen, XLogRecPtr targetRecPtr,
|
|
char *cur_page);
|
|
|
|
#endif
|