Fix inconsistent comments for some function declarations in headers
authorMichael Paquier <michael@paquier.xyz>
Thu, 4 Aug 2022 08:36:21 +0000 (17:36 +0900)
committerMichael Paquier <michael@paquier.xyz>
Thu, 4 Aug 2022 08:36:21 +0000 (17:36 +0900)
Some of the headers list a couple of function prototypes located in a
different file than what is referred to.  This fixes a couple of
places where this inconsistency exists.

Author: Richard Guo
Discussion: https://postgr.es/m/CAMbWs4__RdcSNXPa7L62Ozvo_Q4LvT60o3Bnp8yrQ_m9y5CKvg@mail.gmail.com

src/include/access/nbtxlog.h
src/include/replication/walreceiver.h
src/include/storage/bufmgr.h

index d79489efe47f8d44453a9607b0c81a711a8ccaec..dd504d1885119ad876867daeb56091d365356471 100644 (file)
@@ -342,10 +342,14 @@ typedef struct xl_btree_newroot
  * prototypes for functions in nbtxlog.c
  */
 extern void btree_redo(XLogReaderState *record);
-extern void btree_desc(StringInfo buf, XLogReaderState *record);
-extern const char *btree_identify(uint8 info);
 extern void btree_xlog_startup(void);
 extern void btree_xlog_cleanup(void);
 extern void btree_mask(char *pagedata, BlockNumber blkno);
 
+/*
+ * prototypes for functions in nbtdesc.c
+ */
+extern void btree_desc(StringInfo buf, XLogReaderState *record);
+extern const char *btree_identify(uint8 info);
+
 #endif                         /* NBTXLOG_H */
index 88d7cc6abcbd9b1c190252cdd8a95355b3448d7e..bd8398de0b9e51d1796ab0c78912fac60f170801 100644 (file)
@@ -455,6 +455,7 @@ walrcv_clear_result(WalRcvExecResult *walres)
 /* prototypes for functions in walreceiver.c */
 extern void WalReceiverMain(void) pg_attribute_noreturn();
 extern void ProcessWalRcvInterrupts(void);
+extern void WalRcvForceReply(void);
 
 /* prototypes for functions in walreceiverfuncs.c */
 extern Size WalRcvShmemSize(void);
@@ -469,6 +470,5 @@ extern XLogRecPtr GetWalRcvFlushRecPtr(XLogRecPtr *latestChunkStart, TimeLineID
 extern XLogRecPtr GetWalRcvWriteRecPtr(void);
 extern int GetReplicationApplyDelay(void);
 extern int GetReplicationTransferLatency(void);
-extern void WalRcvForceReply(void);
 
 #endif                         /* _WALRECEIVER_H */
index bf8cce7ccf6d59fd89e76e3aec795e59f3b68c1f..6f4dfa096028ce85c384731569316d27c45c39eb 100644 (file)
@@ -123,7 +123,6 @@ extern void IncrBufferRefCount(Buffer buffer);
 extern Buffer ReleaseAndReadBuffer(Buffer buffer, Relation relation,
                                   BlockNumber blockNum);
 
-extern void InitBufferPool(void);
 extern void InitBufferPoolAccess(void);
 extern void AtEOXact_Buffers(bool isCommit);
 extern void PrintBufferLeakWarning(Buffer buffer);
@@ -154,7 +153,6 @@ extern XLogRecPtr BufferGetLSNAtomic(Buffer buffer);
 #ifdef NOT_USED
 extern void PrintPinnedBufs(void);
 #endif
-extern Size BufferShmemSize(void);
 extern void BufferGetTag(Buffer buffer, RelFileLocator *rlocator,
                         ForkNumber *forknum, BlockNumber *blknum);
 
@@ -173,10 +171,15 @@ extern void AbortBufferIO(void);
 extern void BufmgrCommit(void);
 extern bool BgBufferSync(struct WritebackContext *wb_context);
 
-extern void AtProcExit_LocalBuffers(void);
-
 extern void TestForOldSnapshot_impl(Snapshot snapshot, Relation relation);
 
+/* in buf_init.c */
+extern void InitBufferPool(void);
+extern Size BufferShmemSize(void);
+
+/* in localbuf.c */
+extern void AtProcExit_LocalBuffers(void);
+
 /* in freelist.c */
 extern BufferAccessStrategy GetAccessStrategy(BufferAccessStrategyType btype);
 extern void FreeAccessStrategy(BufferAccessStrategy strategy);