|
PostgreSQL Source Code git master
|
#include "postgres.h"#include <unistd.h>#include <sys/time.h>#include "common/connect.h"#include "funcapi.h"#include "libpq-fe.h"#include "libpq/libpq-be-fe-helpers.h"#include "mb/pg_wchar.h"#include "miscadmin.h"#include "pgstat.h"#include "pqexpbuffer.h"#include "replication/walreceiver.h"#include "storage/latch.h"#include "utils/builtins.h"#include "utils/memutils.h"#include "utils/pg_lsn.h"#include "utils/tuplestore.h"
Go to the source code of this file.
Data Structures | |
| struct | WalReceiverConn |
Macros | |
| #define | appendQuotedIdentifier(b, s) appendQuotedString(b, s, '"') |
| #define | appendQuotedLiteral(b, s) appendQuotedString(b, s, '\'') |
Variables | |
| static WalReceiverFunctionsType | PQWalReceiverFunctions |
| #define appendQuotedIdentifier | ( | b, | |
| s | |||
| ) | appendQuotedString(b, s, '"') |
Definition at line 548 of file libpqwalreceiver.c.
| #define appendQuotedLiteral | ( | b, | |
| s | |||
| ) | appendQuotedString(b, s, '\'') |
Definition at line 549 of file libpqwalreceiver.c.
Definition at line 125 of file libpqwalreceiver.c.
References elog, ERROR, fb(), PQWalReceiverFunctions, and WalReceiverFunctions.
Definition at line 534 of file libpqwalreceiver.c.
References appendStringInfoChar(), buf, and str.
|
static |
Definition at line 1021 of file libpqwalreceiver.c.
References appendQuotedIdentifier, appendStringInfo(), appendStringInfoString(), conn, StringInfoData::data, ereport, errcode(), ERRCODE_PROTOCOL_VIOLATION, errmsg, ERROR, failover, fb(), initStringInfo(), libpqsrv_exec(), pchomp(), pfree(), PGRES_COMMAND_OK, PQclear, PQerrorMessage(), PQresultStatus, and two_phase.
Definition at line 296 of file libpqwalreceiver.c.
References ereport, err(), errcode(), errdetail(), errmsg, ERROR, fb(), _PQconninfoOption::keyword, opts, PQconninfoFree(), PQconninfoParse(), PQfreemem(), pstrdup(), and _PQconninfoOption::val.
Referenced by libpqrcv_connect().
|
static |
Definition at line 148 of file libpqwalreceiver.c.
References _, ALWAYS_SECURE_SEARCH_PATH_SQL, Assert, conn, CONNECTION_OK, ereport, err(), errcode(), errdetail(), errhint(), errmsg, ERROR, fb(), GetDatabaseEncodingName(), i, lengthof, libpqrcv_check_conninfo(), libpqrcv_get_option_from_conninfo(), libpqsrv_connect_complete(), libpqsrv_connect_params_start(), libpqsrv_disconnect(), libpqsrv_exec(), libpqsrv_notice_receiver(), palloc0_object, pchomp(), pfree(), PGRES_TUPLES_OK, PQclear, PQconnectionUsedPassword(), PQerrorMessage(), PQresultStatus, PQsetNoticeReceiver(), PQstatus(), and psprintf().
|
static |
Definition at line 908 of file libpqwalreceiver.c.
|
static |
Definition at line 779 of file libpqwalreceiver.c.
|
static |
Definition at line 658 of file libpqwalreceiver.c.
|
static |
Definition at line 1148 of file libpqwalreceiver.c.
References _, conn, ereport, errcode(), errmsg, ERROR, fb(), InvalidOid, libpqrcv_processTuples(), libpqsrv_exec(), MAKE_SQLSTATE, MyDatabaseId, palloc0_object, pchomp(), PG_DIAG_SQLSTATE, PGRES_BAD_RESPONSE, PGRES_COMMAND_OK, PGRES_COPY_BOTH, PGRES_COPY_IN, PGRES_COPY_OUT, PGRES_EMPTY_QUERY, PGRES_FATAL_ERROR, PGRES_NONFATAL_ERROR, PGRES_PIPELINE_ABORTED, PGRES_PIPELINE_SYNC, PGRES_SINGLE_TUPLE, PGRES_TUPLES_CHUNK, PGRES_TUPLES_OK, PQclear, PQerrorMessage(), PQresultErrorField, PQresultStatus, WALRCV_ERROR, WALRCV_OK_COMMAND, WALRCV_OK_COPY_BOTH, WALRCV_OK_COPY_IN, WALRCV_OK_COPY_OUT, and WALRCV_OK_TUPLES.
|
static |
Definition at line 1062 of file libpqwalreceiver.c.
References conn, and PQbackendPID().
|
static |
Definition at line 351 of file libpqwalreceiver.c.
References _, appendPQExpBuffer(), Assert, buf, conn, ereport, errcode(), errmsg, ERROR, fb(), initPQExpBuffer(), PQconninfo(), PQconninfoFree(), PQExpBufferDataBroken, pstrdup(), and termPQExpBuffer().
Definition at line 475 of file libpqwalreceiver.c.
References fb(), and libpqrcv_get_option_from_conninfo().
|
static |
Definition at line 487 of file libpqwalreceiver.c.
References ereport, err(), errcode(), errmsg, ERROR, fb(), opts, pfree(), PQconninfoFree(), PQconninfoParse(), PQfreemem(), and pstrdup().
Referenced by libpqrcv_connect(), and libpqrcv_get_dbname_from_conninfo().
|
static |
|
static |
Definition at line 424 of file libpqwalreceiver.c.
References conn, ereport, errcode(), ERRCODE_PROTOCOL_VIOLATION, errdetail(), errmsg, ERROR, fb(), libpqsrv_exec(), pchomp(), pg_strtoint32(), PGRES_TUPLES_OK, PQclear, PQerrorMessage(), PQgetvalue, PQnfields, PQntuples, PQresultStatus, and pstrdup().
|
static |
Definition at line 1071 of file libpqwalreceiver.c.
References ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, BuildTupleFromCStrings(), CHECK_FOR_INTERRUPTS, CreateTemplateTupleDesc(), CurrentMemoryContext, ereport, errcode(), ERRCODE_PROTOCOL_VIOLATION, errdetail(), errmsg, ERROR, fb(), MaxTupleAttributeNumber, MemoryContextDelete(), MemoryContextReset(), MemoryContextSwitchTo(), PQfname, PQgetisnull, PQgetvalue, PQnfields, PQntuples, TupleDescFinalize(), TupleDescGetAttInMetadata(), TupleDescInitEntry(), tuplestore_begin_heap(), tuplestore_puttuple(), and work_mem.
Referenced by libpqrcv_exec().
|
static |
Definition at line 739 of file libpqwalreceiver.c.
|
static |
Definition at line 803 of file libpqwalreceiver.c.
Definition at line 892 of file libpqwalreceiver.c.
|
static |
Definition at line 464 of file libpqwalreceiver.c.
References conn, and PQserverVersion().
|
static |
Definition at line 562 of file libpqwalreceiver.c.
| PG_MODULE_MAGIC_EXT | ( | . | name = "libpqwalreceiver", |
| . | version = PG_VERSION |
||
| ) |
Definition at line 1230 of file libpqwalreceiver.c.
References appendQuotedIdentifier, appendStringInfoChar(), StringInfoData::data, fb(), initStringInfo(), lfirst, strVal, and val.
|
static |
Definition at line 98 of file libpqwalreceiver.c.
Referenced by _PG_init().