Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
c80b31d5
Commit
c80b31d5
authored
Jan 20, 2016
by
Simon Riggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor headers to split out standby defs
Jeff Janes
parent
978b2f65
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
56 additions
and
37 deletions
+56
-37
src/backend/access/rmgrdesc/standbydesc.c
src/backend/access/rmgrdesc/standbydesc.c
+1
-1
src/bin/pg_xlogdump/rmgrdesc.c
src/bin/pg_xlogdump/rmgrdesc.c
+1
-1
src/include/storage/standby.h
src/include/storage/standby.h
+1
-35
src/include/storage/standbydefs.h
src/include/storage/standbydefs.h
+53
-0
No files found.
src/backend/access/rmgrdesc/standbydesc.c
View file @
c80b31d5
...
...
@@ -14,7 +14,7 @@
*/
#include "postgres.h"
#include "storage/standby.h"
#include "storage/standby
defs
.h"
static
void
standby_desc_running_xacts
(
StringInfo
buf
,
xl_running_xacts
*
xlrec
)
...
...
src/bin/pg_xlogdump/rmgrdesc.c
View file @
c80b31d5
...
...
@@ -27,7 +27,7 @@
#include "commands/tablespace.h"
#include "replication/origin.h"
#include "rmgrdesc.h"
#include "storage/standby.h"
#include "storage/standby
defs
.h"
#include "utils/relmapper.h"
#define PG_RMGR(symname,name,redo,desc,identify,startup,cleanup) \
...
...
src/include/storage/standby.h
View file @
c80b31d5
...
...
@@ -14,9 +14,7 @@
#ifndef STANDBY_H
#define STANDBY_H
#include "access/xlogreader.h"
#include "lib/stringinfo.h"
#include "storage/lockdefs.h"
#include "storage/standbydefs.h"
#include "storage/procsignal.h"
#include "storage/relfilenode.h"
...
...
@@ -51,41 +49,9 @@ extern void StandbyReleaseLockTree(TransactionId xid,
extern
void
StandbyReleaseAllLocks
(
void
);
extern
void
StandbyReleaseOldLocks
(
int
nxids
,
TransactionId
*
xids
);
/*
* XLOG message types
*/
#define XLOG_STANDBY_LOCK 0x00
#define XLOG_RUNNING_XACTS 0x10
typedef
struct
xl_standby_locks
{
int
nlocks
;
/* number of entries in locks array */
xl_standby_lock
locks
[
FLEXIBLE_ARRAY_MEMBER
];
}
xl_standby_locks
;
/*
* When we write running xact data to WAL, we use this structure.
*/
typedef
struct
xl_running_xacts
{
int
xcnt
;
/* # of xact ids in xids[] */
int
subxcnt
;
/* # of subxact ids in xids[] */
bool
subxid_overflow
;
/* snapshot overflowed, subxids missing */
TransactionId
nextXid
;
/* copy of ShmemVariableCache->nextXid */
TransactionId
oldestRunningXid
;
/* *not* oldestXmin */
TransactionId
latestCompletedXid
;
/* so we can set xmax */
TransactionId
xids
[
FLEXIBLE_ARRAY_MEMBER
];
}
xl_running_xacts
;
#define MinSizeOfXactRunningXacts offsetof(xl_running_xacts, xids)
/* Recovery handlers for the Standby Rmgr (RM_STANDBY_ID) */
extern
void
standby_redo
(
XLogReaderState
*
record
);
extern
void
standby_desc
(
StringInfo
buf
,
XLogReaderState
*
record
);
extern
const
char
*
standby_identify
(
uint8
info
);
/*
* Declarations for GetRunningTransactionData(). Similar to Snapshots, but
* not quite. This has nothing at all to do with visibility on this server,
...
...
src/include/storage/standbydefs.h
0 → 100644
View file @
c80b31d5
/*-------------------------------------------------------------------------
*
* standbydef.h
* Frontend exposed definitions for hot standby mode.
*
*
* Portions Copyright (c) 1996-2015, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* src/include/storage/standbydefs.h
*
*-------------------------------------------------------------------------
*/
#ifndef STANDBYDEFS_H
#define STANDBYDEFS_H
#include "access/xlogreader.h"
#include "lib/stringinfo.h"
#include "storage/lockdefs.h"
/* Recovery handlers for the Standby Rmgr (RM_STANDBY_ID) */
extern
void
standby_redo
(
XLogReaderState
*
record
);
extern
void
standby_desc
(
StringInfo
buf
,
XLogReaderState
*
record
);
extern
const
char
*
standby_identify
(
uint8
info
);
/*
* XLOG message types
*/
#define XLOG_STANDBY_LOCK 0x00
#define XLOG_RUNNING_XACTS 0x10
typedef
struct
xl_standby_locks
{
int
nlocks
;
/* number of entries in locks array */
xl_standby_lock
locks
[
FLEXIBLE_ARRAY_MEMBER
];
}
xl_standby_locks
;
/*
* When we write running xact data to WAL, we use this structure.
*/
typedef
struct
xl_running_xacts
{
int
xcnt
;
/* # of xact ids in xids[] */
int
subxcnt
;
/* # of subxact ids in xids[] */
bool
subxid_overflow
;
/* snapshot overflowed, subxids missing */
TransactionId
nextXid
;
/* copy of ShmemVariableCache->nextXid */
TransactionId
oldestRunningXid
;
/* *not* oldestXmin */
TransactionId
latestCompletedXid
;
/* so we can set xmax */
TransactionId
xids
[
FLEXIBLE_ARRAY_MEMBER
];
}
xl_running_xacts
;
#endif
/* STANDBYDEFS_H */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment