Skip to content

Commit 85e6e16

Browse files
committed
Move AllowCascadeReplication() define from xlog.h to replication include
file. Per suggestion from Alvaro.
1 parent ca598c1 commit 85e6e16

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

src/include/access/xlog.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,6 @@ extern int wal_level;
221221
/* Do we need to WAL-log information required only for Hot Standby? */
222222
#define XLogStandbyInfoActive() (wal_level >= WAL_LEVEL_HOT_STANDBY)
223223

224-
/* Can we allow the standby to accept replication connection from another standby? */
225-
#define AllowCascadeReplication() (EnableHotStandby && max_wal_senders > 0)
226-
227224
#ifdef WAL_DEBUG
228225
extern bool XLOG_DEBUG;
229226
#endif

src/include/replication/walreceiver.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#ifndef _WALRECEIVER_H
1313
#define _WALRECEIVER_H
1414

15+
#include "access/xlog.h"
1516
#include "access/xlogdefs.h"
1617
#include "storage/spin.h"
1718
#include "pgtime.h"
@@ -27,6 +28,9 @@ extern bool hot_standby_feedback;
2728
*/
2829
#define MAXCONNINFO 1024
2930

31+
/* Can we allow the standby to accept replication connection from another standby? */
32+
#define AllowCascadeReplication() (EnableHotStandby && max_wal_senders > 0)
33+
3034
/*
3135
* Values for WalRcv->walRcvState.
3236
*/

src/include/replication/walsender.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#define _WALSENDER_H
1414

1515
#include "access/xlog.h"
16+
#include "fmgr.h"
1617
#include "nodes/nodes.h"
1718
#include "storage/latch.h"
1819
#include "replication/syncrep.h"

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy