Commit 25dcc9d3 authored by Alvaro Herrera's avatar Alvaro Herrera

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 3b02ea4f 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
parent fe661259
...@@ -30,16 +30,17 @@ ...@@ -30,16 +30,17 @@
#include "utils/memutils.h" #include "utils/memutils.h"
#endif #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, static bool ValidXLogRecordHeader(XLogReaderState *state, XLogRecPtr RecPtr,
XLogRecPtr PrevRecPtr, XLogRecord *record, bool randAccess); XLogRecPtr PrevRecPtr, XLogRecord *record, bool randAccess);
static bool ValidXLogRecord(XLogReaderState *state, XLogRecord *record, static bool ValidXLogRecord(XLogReaderState *state, XLogRecord *record,
XLogRecPtr recptr); 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); static void ResetDecoder(XLogReaderState *state);
/* size of the buffer allocated for error message. */ /* size of the buffer allocated for error message. */
...@@ -621,7 +622,7 @@ err: ...@@ -621,7 +622,7 @@ err:
/* /*
* Invalidate the xlogreader's read state to force a re-read. * Invalidate the xlogreader's read state to force a re-read.
*/ */
void static void
XLogReaderInvalReadState(XLogReaderState *state) XLogReaderInvalReadState(XLogReaderState *state)
{ {
state->readSegNo = 0; state->readSegNo = 0;
......
...@@ -216,13 +216,9 @@ extern struct XLogRecord *XLogReadRecord(XLogReaderState *state, ...@@ -216,13 +216,9 @@ extern struct XLogRecord *XLogReadRecord(XLogReaderState *state,
extern bool XLogReaderValidatePageHeader(XLogReaderState *state, extern bool XLogReaderValidatePageHeader(XLogReaderState *state,
XLogRecPtr recptr, char *phdr); XLogRecPtr recptr, char *phdr);
/* Invalidate read state */
extern void XLogReaderInvalReadState(XLogReaderState *state);
#ifdef FRONTEND #ifdef FRONTEND
extern XLogRecPtr XLogFindNextRecord(XLogReaderState *state, XLogRecPtr RecPtr); extern XLogRecPtr XLogFindNextRecord(XLogReaderState *state, XLogRecPtr RecPtr);
#endif /* FRONTEND */ #endif /* FRONTEND */
/* Functions for decoding an XLogRecord */ /* Functions for decoding an XLogRecord */
extern bool DecodeXLogRecord(XLogReaderState *state, XLogRecord *record, extern bool DecodeXLogRecord(XLogReaderState *state, XLogRecord *record,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment