aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/transam/xlogreader.c
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2019-09-03 17:41:43 -0400
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2019-09-03 17:41:43 -0400
commit25dcc9d35dfeb027047ebaea9b27cda1eaa9b393 (patch)
tree81624fb8c2e14c3663917751178f41192f1970af /src/backend/access/transam/xlogreader.c
parentfe66125974c58cc749ba441ff53e72216c819da0 (diff)
downloadpostgresql-25dcc9d35dfeb027047ebaea9b27cda1eaa9b393.tar.gz
postgresql-25dcc9d35dfeb027047ebaea9b27cda1eaa9b393.zip
Make XLogReaderInvalReadState static
This function is only used by xlogreader.c itself, so there's no need to export it. It was introduced by commit 3b02ea4f0780 with the apparent intention that it could be used externally, but I couldn't find any external code calling it. I (Álvaro) couldn't resist the urge to sort nearby function prototypes properly while at it. Author: Antonin Houska Discussion: https://postgr.es/m/14984.1554998742@spoje.net
Diffstat (limited to 'src/backend/access/transam/xlogreader.c')
-rw-r--r--src/backend/access/transam/xlogreader.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/backend/access/transam/xlogreader.c b/src/backend/access/transam/xlogreader.c
index c6faf48d24f..a66e3324b11 100644
--- a/src/backend/access/transam/xlogreader.c
+++ b/src/backend/access/transam/xlogreader.c
@@ -30,16 +30,17 @@
#include "utils/memutils.h"
#endif
-static bool allocate_recordbuf(XLogReaderState *state, uint32 reclength);
+static void report_invalid_record(XLogReaderState *state, const char *fmt,...)
+ pg_attribute_printf(2, 3);
+static bool allocate_recordbuf(XLogReaderState *state, uint32 reclength);
+static int ReadPageInternal(XLogReaderState *state, XLogRecPtr pageptr,
+ int reqLen);
+static void XLogReaderInvalReadState(XLogReaderState *state);
static bool ValidXLogRecordHeader(XLogReaderState *state, XLogRecPtr RecPtr,
XLogRecPtr PrevRecPtr, XLogRecord *record, bool randAccess);
static bool ValidXLogRecord(XLogReaderState *state, XLogRecord *record,
XLogRecPtr recptr);
-static int ReadPageInternal(XLogReaderState *state, XLogRecPtr pageptr,
- int reqLen);
-static void report_invalid_record(XLogReaderState *state, const char *fmt,...) pg_attribute_printf(2, 3);
-
static void ResetDecoder(XLogReaderState *state);
/* size of the buffer allocated for error message. */
@@ -621,7 +622,7 @@ err:
/*
* Invalidate the xlogreader's read state to force a re-read.
*/
-void
+static void
XLogReaderInvalReadState(XLogReaderState *state)
{
state->readSegNo = 0;