PostgreSQL Source Code
git master
|
#include "postgres.h"
#include <unistd.h>
#include "access/xact.h"
#include "access/xlog_internal.h"
#include "access/xlogrecovery.h"
#include "access/xlogutils.h"
#include "catalog/pg_type.h"
#include "fmgr.h"
#include "funcapi.h"
#include "mb/pg_wchar.h"
#include "miscadmin.h"
#include "nodes/makefuncs.h"
#include "replication/decode.h"
#include "replication/logical.h"
#include "replication/message.h"
#include "storage/fd.h"
#include "utils/array.h"
#include "utils/builtins.h"
#include "utils/inval.h"
#include "utils/lsyscache.h"
#include "utils/memutils.h"
#include "utils/pg_lsn.h"
#include "utils/regproc.h"
#include "utils/resowner.h"
Go to the source code of this file.
Data Structures | |
struct | DecodingOutputState |
Typedefs | |
typedef struct DecodingOutputState | DecodingOutputState |
Functions | |
static void | LogicalOutputPrepareWrite (LogicalDecodingContext *ctx, XLogRecPtr lsn, TransactionId xid, bool last_write) |
static void | LogicalOutputWrite (LogicalDecodingContext *ctx, XLogRecPtr lsn, TransactionId xid, bool last_write) |
static Datum | pg_logical_slot_get_changes_guts (FunctionCallInfo fcinfo, bool confirm, bool binary) |
Datum | pg_logical_slot_get_changes (PG_FUNCTION_ARGS) |
Datum | pg_logical_slot_peek_changes (PG_FUNCTION_ARGS) |
Datum | pg_logical_slot_get_binary_changes (PG_FUNCTION_ARGS) |
Datum | pg_logical_slot_peek_binary_changes (PG_FUNCTION_ARGS) |
Datum | pg_logical_emit_message_bytea (PG_FUNCTION_ARGS) |
Datum | pg_logical_emit_message_text (PG_FUNCTION_ARGS) |
typedef struct DecodingOutputState DecodingOutputState |
|
static |
Definition at line 56 of file logicalfuncs.c.
References LogicalDecodingContext::out, and resetStringInfo().
Referenced by pg_logical_slot_get_changes_guts().
|
static |
Definition at line 66 of file logicalfuncs.c.
References Assert(), DecodingOutputState::binary_output, cstring_to_text_with_len(), StringInfoData::data, elog(), ERROR, GetDatabaseEncoding(), StringInfoData::len, LSNGetDatum(), MaxAllocSize, LogicalDecodingContext::out, LogicalDecodingContext::output_writer_private, pg_verify_mbstr(), PointerGetDatum(), DecodingOutputState::returned_rows, TransactionIdGetDatum(), DecodingOutputState::tupdesc, tuplestore_putvalues(), DecodingOutputState::tupstore, values, and VARHDRSZ.
Referenced by pg_logical_slot_get_changes_guts().
Datum pg_logical_emit_message_bytea | ( | PG_FUNCTION_ARGS | ) |
Definition at line 360 of file logicalfuncs.c.
References data, LogLogicalMessage(), PG_GETARG_BOOL, PG_GETARG_BYTEA_PP, PG_GETARG_TEXT_PP, PG_RETURN_LSN, text_to_cstring(), VARDATA_ANY, and VARSIZE_ANY_EXHDR.
Referenced by pg_logical_emit_message_text().
Datum pg_logical_emit_message_text | ( | PG_FUNCTION_ARGS | ) |
Definition at line 373 of file logicalfuncs.c.
References pg_logical_emit_message_bytea().
Datum pg_logical_slot_get_binary_changes | ( | PG_FUNCTION_ARGS | ) |
Definition at line 341 of file logicalfuncs.c.
References pg_logical_slot_get_changes_guts().
Datum pg_logical_slot_get_changes | ( | PG_FUNCTION_ARGS | ) |
Definition at line 323 of file logicalfuncs.c.
References pg_logical_slot_get_changes_guts().
|
static |
Definition at line 103 of file logicalfuncs.c.
References ARR_ELEMTYPE, ARR_NDIM, array_contains_nulls(), Assert(), CHECK_FOR_INTERRUPTS, CheckLogicalDecodingRequirements(), CheckSlotPermissions(), CreateDecodingContext(), CurrentResourceOwner, ReplicationSlot::data, deconstruct_array_builtin(), ReturnSetInfo::econtext, ExprContext::ecxt_per_query_memory, elog(), ereport, errcode(), errmsg(), ERROR, FunctionCallInfoBaseData::flinfo, FmgrInfo::fn_oid, format_procedure(), FreeDecodingContext(), GetFlushRecPtr(), GetXLogReplayRecPtr(), i, InitMaterializedSRF(), InvalidateSystemCaches(), InvalidXLogRecPtr, lappend(), LogicalConfirmReceivedLocation(), LogicalDecodingProcessRecord(), LogicalOutputPrepareWrite(), LogicalOutputWrite(), makeDefElem(), makeString(), MemoryContextSwitchTo(), MyReplicationSlot, name, NameStr, NIL, OUTPUT_PLUGIN_TEXTUAL_OUTPUT, palloc0(), PG_ARGISNULL, PG_CATCH, PG_END_TRY, PG_GETARG_ARRAYTYPE_P, PG_GETARG_INT32, PG_GETARG_LSN, PG_GETARG_NAME, PG_RE_THROW, PG_TRY, ReplicationSlotPersistentData::plugin, read_local_xlog_page(), RecoveryInProgress(), ReplicationSlotAcquire(), ReplicationSlotMarkDirty(), ReplicationSlotRelease(), ReplicationSlotPersistentData::restart_lsn, FunctionCallInfoBaseData::resultinfo, ReturnSetInfo::setDesc, ReturnSetInfo::setResult, TextDatumGetCString, wal_segment_close(), wal_segment_open(), XL_ROUTINE, XLogBeginRead(), and XLogReadRecord().
Referenced by pg_logical_slot_get_binary_changes(), pg_logical_slot_get_changes(), pg_logical_slot_peek_binary_changes(), and pg_logical_slot_peek_changes().
Datum pg_logical_slot_peek_binary_changes | ( | PG_FUNCTION_ARGS | ) |
Definition at line 350 of file logicalfuncs.c.
References pg_logical_slot_get_changes_guts().
Datum pg_logical_slot_peek_changes | ( | PG_FUNCTION_ARGS | ) |
Definition at line 332 of file logicalfuncs.c.
References pg_logical_slot_get_changes_guts().