#include "access/xlog.h"#include "nodes/nodes.h"#include "replication/syncrep.h"#include "storage/latch.h"#include "storage/shmem.h"#include "storage/spin.h"

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 } |
Functions | |
| void | WalSndSetState (WalSndState state) |
| int | replication_yyparse (void) |
| int | replication_yylex (void) |
| void | replication_yyerror (const char *str) |
| void | replication_scanner_init (const char *query_string) |
| void | replication_scanner_finish (void) |
Variables | |
| WalSnd * | MyWalSnd |
| WalSndCtlData * | WalSndCtl |
| Node * | replication_parse_result |
| typedef enum WalSndState WalSndState |
| enum WalSndState |
Definition at line 22 of file walsender_private.h.
{
WALSNDSTATE_STARTUP = 0,
WALSNDSTATE_BACKUP,
WALSNDSTATE_CATCHUP,
WALSNDSTATE_STREAMING
} WalSndState;
| void replication_scanner_finish | ( | void | ) |
| void replication_scanner_init | ( | const char * | query_string | ) |
Referenced by exec_replication_command().
| void replication_yyerror | ( | const char * | str | ) |
| int replication_yylex | ( | void | ) |
| int replication_yyparse | ( | void | ) |
Referenced by exec_replication_command().
| void WalSndSetState | ( | WalSndState | state | ) |
Definition at line 1796 of file walsender.c.
References am_walsender, Assert, WalSnd::mutex, SpinLockAcquire, SpinLockRelease, and WalSnd::state.
Referenced by SendBaseBackup(), StartReplication(), WalSndErrorCleanup(), and WalSndLoop().
{
/* use volatile pointer to prevent code rearrangement */
volatile WalSnd *walsnd = MyWalSnd;
Assert(am_walsender);
if (walsnd->state == state)
return;
SpinLockAcquire(&walsnd->mutex);
walsnd->state = state;
SpinLockRelease(&walsnd->mutex);
}
Definition at line 88 of file walsender.c.
Referenced by SyncRepInitConfig(), and SyncRepReleaseWaiters().
Referenced by exec_replication_command().
Definition at line 85 of file walsender.c.
Referenced by SyncRepQueueInsert(), SyncRepReleaseWaiters(), SyncRepUpdateSyncStandbysDefined(), SyncRepWaitForLSN(), and SyncRepWakeQueue().
1.7.1