mirror of
https://github.com/postgres/postgres.git
synced 2025-07-05 07:21:24 +03:00
Add const qualifiers to XLogRegister*() functions
Add const qualifiers to XLogRegisterData() and XLogRegisterBufData(). Several unconstify() calls can be removed. Reviewed-by: Aleksander Alekseev <aleksander@timescale.com> Discussion: https://www.postgresql.org/message-id/dd889784-9ce7-436a-b4f1-52e4a5e577bd@eisentraut.org
This commit is contained in:
@ -312,7 +312,7 @@ typedef struct xl_end_of_recovery
|
||||
typedef struct XLogRecData
|
||||
{
|
||||
struct XLogRecData *next; /* next struct in chain, or NULL */
|
||||
char *data; /* start of rmgr data to include */
|
||||
const char *data; /* start of rmgr data to include */
|
||||
uint32 len; /* length of rmgr data to include */
|
||||
} XLogRecData;
|
||||
|
||||
|
@ -44,12 +44,12 @@ extern void XLogBeginInsert(void);
|
||||
extern void XLogSetRecordFlags(uint8 flags);
|
||||
extern XLogRecPtr XLogInsert(RmgrId rmid, uint8 info);
|
||||
extern void XLogEnsureRecordSpace(int max_block_id, int ndatas);
|
||||
extern void XLogRegisterData(char *data, uint32 len);
|
||||
extern void XLogRegisterData(const char *data, uint32 len);
|
||||
extern void XLogRegisterBuffer(uint8 block_id, Buffer buffer, uint8 flags);
|
||||
extern void XLogRegisterBlock(uint8 block_id, RelFileLocator *rlocator,
|
||||
ForkNumber forknum, BlockNumber blknum, char *page,
|
||||
ForkNumber forknum, BlockNumber blknum, const char *page,
|
||||
uint8 flags);
|
||||
extern void XLogRegisterBufData(uint8 block_id, char *data, uint32 len);
|
||||
extern void XLogRegisterBufData(uint8 block_id, const char *data, uint32 len);
|
||||
extern void XLogResetInsertion(void);
|
||||
extern bool XLogCheckBufferNeedsBackup(Buffer buffer);
|
||||
|
||||
|
Reference in New Issue
Block a user