|
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 |
Variables | |
| static WalReceiverFunctionsType | PQWalReceiverFunctions |
Definition at line 125 of file libpqwalreceiver.c.
References elog, ERROR, fb(), PQWalReceiverFunctions, and WalReceiverFunctions.
|
static |
Definition at line 1001 of file libpqwalreceiver.c.
References appendStringInfo(), appendStringInfoString(), conn, StringInfoData::data, ereport, errcode(), errmsg(), ERROR, failover, fb(), initStringInfo(), libpqsrv_exec(), pchomp(), pfree(), PGRES_COMMAND_OK, PQclear, PQerrorMessage(), PQresultStatus, quote_identifier(), 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_params(), 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 889 of file libpqwalreceiver.c.
References appendStringInfo(), appendStringInfoChar(), appendStringInfoString(), conn, CRS_EXPORT_SNAPSHOT, CRS_NOEXPORT_SNAPSHOT, CRS_USE_SNAPSHOT, CStringGetDatum(), StringInfoData::data, DatumGetLSN(), DirectFunctionCall1Coll(), ereport, errcode(), errmsg(), ERROR, failover, fb(), initStringInfo(), InvalidOid, libpqsrv_exec(), pchomp(), pfree(), pg_lsn_in(), PGRES_TUPLES_OK, PQclear, PQerrorMessage(), PQgetisnull, PQgetvalue, PQresultStatus, PQserverVersion(), pstrdup(), and two_phase.
|
static |
Definition at line 760 of file libpqwalreceiver.c.
References conn, libpqsrv_disconnect(), pfree(), and PQfreemem().
|
static |
Definition at line 639 of file libpqwalreceiver.c.
References conn, ereport, errcode(), errmsg(), ERROR, fb(), libpqsrv_get_result(), pchomp(), pg_strtoint32(), PGRES_COMMAND_OK, PGRES_COPY_OUT, PGRES_TUPLES_OK, PQclear, PQendcopy(), PQerrorMessage(), PQflush(), PQgetvalue, PQnfields, PQntuples, PQputCopyEnd(), and PQresultStatus.
|
static |
Definition at line 1126 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 1041 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(), errdetail(), errmsg(), ERROR, fb(), libpqsrv_exec(), pchomp(), pg_strtoint32(), PGRES_TUPLES_OK, PQclear, PQerrorMessage(), PQgetvalue, PQnfields, PQntuples, PQresultStatus, and pstrdup().
|
static |
Definition at line 1050 of file libpqwalreceiver.c.
References ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, BuildTupleFromCStrings(), CHECK_FOR_INTERRUPTS, CreateTemplateTupleDesc(), CurrentMemoryContext, ereport, errcode(), errdetail(), errmsg(), ERROR, fb(), MaxTupleAttributeNumber, MemoryContextDelete(), MemoryContextReset(), MemoryContextSwitchTo(), PQfname, PQgetisnull, PQgetvalue, PQnfields, PQntuples, TupleDescGetAttInMetadata(), TupleDescInitEntry(), tuplestore_begin_heap(), tuplestore_puttuple(), and work_mem.
Referenced by libpqrcv_exec().
|
static |
Definition at line 720 of file libpqwalreceiver.c.
References Assert, conn, ereport, errcode(), errdetail(), errmsg(), ERROR, fb(), filename, len, libpqsrv_exec(), palloc(), pchomp(), PGRES_TUPLES_OK, PQclear, PQerrorMessage(), PQgetlength, PQgetvalue, PQnfields, PQntuples, PQresultStatus, pstrdup(), and snprintf.
|
static |
Definition at line 784 of file libpqwalreceiver.c.
References conn, CONNECTION_BAD, ereport, errcode(), errmsg(), ERROR, fb(), libpqsrv_get_result(), pchomp(), PGRES_COMMAND_OK, PGRES_COPY_IN, PQclear, PQconsumeInput(), PQerrorMessage(), PQfreemem(), PQgetCopyData(), PQresultStatus, PQsocket(), and PQstatus().
Definition at line 873 of file libpqwalreceiver.c.
References conn, ereport, errcode(), errmsg(), ERROR, fb(), pchomp(), PQerrorMessage(), PQflush(), and PQputCopyData().
|
static |
Definition at line 464 of file libpqwalreceiver.c.
References conn, and PQserverVersion().
|
static |
Definition at line 536 of file libpqwalreceiver.c.
References appendStringInfo(), appendStringInfoChar(), appendStringInfoString(), Assert, conn, StringInfoData::data, ereport, errcode(), errmsg(), ERROR, fb(), initStringInfo(), libpqsrv_exec(), LSN_FORMAT_ARGS, pchomp(), pfree(), PGRES_COMMAND_OK, PGRES_COPY_BOTH, PQclear, PQerrorMessage(), PQescapeLiteral(), PQfreemem(), PQresultStatus, PQserverVersion(), and stringlist_to_identifierstr().
| PG_MODULE_MAGIC_EXT | ( | . | name = "libpqwalreceiver", |
| . | version = PG_VERSION |
||
| ) |
Definition at line 1208 of file libpqwalreceiver.c.
References appendStringInfoChar(), appendStringInfoString(), conn, StringInfoData::data, fb(), free, initStringInfo(), lfirst, PQescapeIdentifier(), PQfreemem(), strVal, and val.
Referenced by libpqrcv_startstreaming().
|
static |
Definition at line 98 of file libpqwalreceiver.c.
Referenced by _PG_init().