PostgreSQL Source Code  git master
walsender_private.h File Reference
#include "access/xlog.h"
#include "lib/ilist.h"
#include "nodes/nodes.h"
#include "nodes/replnodes.h"
#include "replication/syncrep.h"
#include "storage/condition_variable.h"
#include "storage/shmem.h"
#include "storage/spin.h"
Include dependency graph for walsender_private.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  WalSnd
 
struct  WalSndCtlData
 

Typedefs

typedef enum WalSndState WalSndState
 
typedef struct WalSnd WalSnd
 

Enumerations

enum  WalSndState {
  WALSNDSTATE_STARTUP = 0 , WALSNDSTATE_BACKUP , WALSNDSTATE_CATCHUP , WALSNDSTATE_STREAMING ,
  WALSNDSTATE_STOPPING
}
 

Functions

void WalSndSetState (WalSndState state)
 
int replication_yyparse (void)
 
int replication_yylex (void)
 
void replication_yyerror (const char *message) pg_attribute_noreturn()
 
void replication_scanner_init (const char *str)
 
void replication_scanner_finish (void)
 
bool replication_scanner_is_replication_command (void)
 

Variables

PGDLLIMPORT WalSndMyWalSnd
 
PGDLLIMPORT WalSndCtlDataWalSndCtl
 
PGDLLIMPORT Nodereplication_parse_result
 

Typedef Documentation

◆ WalSnd

typedef struct WalSnd WalSnd

◆ WalSndState

typedef enum WalSndState WalSndState

Enumeration Type Documentation

◆ WalSndState

Enumerator
WALSNDSTATE_STARTUP 
WALSNDSTATE_BACKUP 
WALSNDSTATE_CATCHUP 
WALSNDSTATE_STREAMING 
WALSNDSTATE_STOPPING 

Definition at line 24 of file walsender_private.h.

25 {
31 } WalSndState;
WalSndState
@ WALSNDSTATE_STREAMING
@ WALSNDSTATE_BACKUP
@ WALSNDSTATE_CATCHUP
@ WALSNDSTATE_STARTUP
@ WALSNDSTATE_STOPPING

Function Documentation

◆ replication_scanner_finish()

void replication_scanner_finish ( void  )

◆ replication_scanner_init()

void replication_scanner_init ( const char *  str)

◆ replication_scanner_is_replication_command()

bool replication_scanner_is_replication_command ( void  )

◆ replication_yyerror()

void replication_yyerror ( const char *  message)

◆ replication_yylex()

int replication_yylex ( void  )

◆ replication_yyparse()

int replication_yyparse ( void  )

◆ WalSndSetState()

void WalSndSetState ( WalSndState  state)

Definition at line 3781 of file walsender.c.

3782 {
3783  WalSnd *walsnd = MyWalSnd;
3784 
3786 
3787  if (walsnd->state == state)
3788  return;
3789 
3790  SpinLockAcquire(&walsnd->mutex);
3791  walsnd->state = state;
3792  SpinLockRelease(&walsnd->mutex);
3793 }
#define Assert(condition)
Definition: c.h:812
#define SpinLockRelease(lock)
Definition: spin.h:61
#define SpinLockAcquire(lock)
Definition: spin.h:59
slock_t mutex
WalSndState state
Definition: regguts.h:323
WalSnd * MyWalSnd
Definition: walsender.c:112
bool am_walsender
Definition: walsender.c:115

References am_walsender, Assert, WalSnd::mutex, MyWalSnd, SpinLockAcquire, SpinLockRelease, and WalSnd::state.

Referenced by exec_replication_command(), SendBaseBackup(), StartLogicalReplication(), StartReplication(), WalSndErrorCleanup(), WalSndLoop(), and XLogSendPhysical().

Variable Documentation

◆ MyWalSnd

◆ replication_parse_result

PGDLLIMPORT Node* replication_parse_result
extern

◆ WalSndCtl