mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +03:00
Split out rmgr rm_desc functions into their own files
This is necessary (but not sufficient) to have them compilable outside of a backend environment.
This commit is contained in:
@@ -205,6 +205,25 @@ typedef XLogLongPageHeaderData *XLogLongPageHeader;
|
||||
(uint32) ((logSegNo) / XLogSegmentsPerXLogId), \
|
||||
(uint32) ((logSegNo) % XLogSegmentsPerXLogId), offset)
|
||||
|
||||
/*
|
||||
* Information logged when we detect a change in one of the parameters
|
||||
* important for Hot Standby.
|
||||
*/
|
||||
typedef struct xl_parameter_change
|
||||
{
|
||||
int MaxConnections;
|
||||
int max_prepared_xacts;
|
||||
int max_locks_per_xact;
|
||||
int wal_level;
|
||||
} xl_parameter_change;
|
||||
|
||||
/* logs restore point */
|
||||
typedef struct xl_restore_point
|
||||
{
|
||||
TimestampTz rp_time;
|
||||
char rp_name[MAXFNAMELEN];
|
||||
} xl_restore_point;
|
||||
|
||||
|
||||
/*
|
||||
* Method table for resource managers.
|
||||
|
@@ -14,7 +14,6 @@
|
||||
#ifndef STORAGE_H
|
||||
#define STORAGE_H
|
||||
|
||||
#include "access/xlog.h"
|
||||
#include "storage/block.h"
|
||||
#include "storage/relfilenode.h"
|
||||
#include "utils/relcache.h"
|
||||
@@ -34,9 +33,4 @@ extern void AtSubCommit_smgr(void);
|
||||
extern void AtSubAbort_smgr(void);
|
||||
extern void PostPrepare_smgr(void);
|
||||
|
||||
extern void log_smgrcreate(RelFileNode *rnode, ForkNumber forkNum);
|
||||
|
||||
extern void smgr_redo(XLogRecPtr lsn, XLogRecord *record);
|
||||
extern void smgr_desc(StringInfo buf, uint8 xl_info, char *rec);
|
||||
|
||||
#endif /* STORAGE_H */
|
||||
|
49
src/include/catalog/storage_xlog.h
Normal file
49
src/include/catalog/storage_xlog.h
Normal file
@@ -0,0 +1,49 @@
|
||||
/*-------------------------------------------------------------------------
|
||||
*
|
||||
* storage_xlog.h
|
||||
* prototypes for XLog support for backend/catalog/storage.c
|
||||
*
|
||||
*
|
||||
* Portions Copyright (c) 1996-2012, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* src/include/catalog/storage_xlog.h
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
#ifndef STORAGE_XLOG_H
|
||||
#define STORAGE_XLOG_H
|
||||
|
||||
#include "access/xlog.h"
|
||||
#include "storage/block.h"
|
||||
#include "storage/relfilenode.h"
|
||||
|
||||
/*
|
||||
* Declarations for smgr-related XLOG records
|
||||
*
|
||||
* Note: we log file creation and truncation here, but logging of deletion
|
||||
* actions is handled by xact.c, because it is part of transaction commit.
|
||||
*/
|
||||
|
||||
/* XLOG gives us high 4 bits */
|
||||
#define XLOG_SMGR_CREATE 0x10
|
||||
#define XLOG_SMGR_TRUNCATE 0x20
|
||||
|
||||
typedef struct xl_smgr_create
|
||||
{
|
||||
RelFileNode rnode;
|
||||
ForkNumber forkNum;
|
||||
} xl_smgr_create;
|
||||
|
||||
typedef struct xl_smgr_truncate
|
||||
{
|
||||
BlockNumber blkno;
|
||||
RelFileNode rnode;
|
||||
} xl_smgr_truncate;
|
||||
|
||||
extern void log_smgrcreate(RelFileNode *rnode, ForkNumber forkNum);
|
||||
|
||||
extern void smgr_redo(XLogRecPtr lsn, XLogRecord *record);
|
||||
extern void smgr_desc(StringInfo buf, uint8 xl_info, char *rec);
|
||||
|
||||
#endif /* STORAGE_XLOG_H */
|
Reference in New Issue
Block a user