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/latch.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 25 of file walsender_private.h.

26 {
32 } 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 3697 of file walsender.c.

3698 {
3699  WalSnd *walsnd = MyWalSnd;
3700 
3702 
3703  if (walsnd->state == state)
3704  return;
3705 
3706  SpinLockAcquire(&walsnd->mutex);
3707  walsnd->state = state;
3708  SpinLockRelease(&walsnd->mutex);
3709 }
Assert(fmt[strlen(fmt) - 1] !='\n')
#define SpinLockRelease(lock)
Definition: spin.h:64
#define SpinLockAcquire(lock)
Definition: spin.h:62
slock_t mutex
WalSndState state
Definition: regguts.h:323
WalSnd * MyWalSnd
Definition: walsender.c:115
bool am_walsender
Definition: walsender.c:118

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