|
PostgreSQL Source Code git master
|
#include "access/xact.h"#include "executor/tuptable.h"#include "replication/reorderbuffer.h"#include "utils/rel.h"

Go to the source code of this file.
Data Structures | |
| struct | LogicalRepTupleData |
| struct | LogicalRepRelation |
| struct | LogicalRepTyp |
| struct | LogicalRepBeginData |
| struct | LogicalRepCommitData |
| struct | LogicalRepPreparedTxnData |
| struct | LogicalRepCommitPreparedTxnData |
| struct | LogicalRepRollbackPreparedTxnData |
| struct | LogicalRepStreamAbortData |
Enumerations | |
| enum | LogicalRepMsgType { LOGICAL_REP_MSG_BEGIN = 'B' , LOGICAL_REP_MSG_COMMIT = 'C' , LOGICAL_REP_MSG_ORIGIN = 'O' , LOGICAL_REP_MSG_INSERT = 'I' , LOGICAL_REP_MSG_UPDATE = 'U' , LOGICAL_REP_MSG_DELETE = 'D' , LOGICAL_REP_MSG_TRUNCATE = 'T' , LOGICAL_REP_MSG_RELATION = 'R' , LOGICAL_REP_MSG_TYPE = 'Y' , LOGICAL_REP_MSG_MESSAGE = 'M' , LOGICAL_REP_MSG_BEGIN_PREPARE = 'b' , LOGICAL_REP_MSG_PREPARE = 'P' , LOGICAL_REP_MSG_COMMIT_PREPARED = 'K' , LOGICAL_REP_MSG_ROLLBACK_PREPARED = 'r' , LOGICAL_REP_MSG_STREAM_START = 'S' , LOGICAL_REP_MSG_STREAM_STOP = 'E' , LOGICAL_REP_MSG_STREAM_COMMIT = 'c' , LOGICAL_REP_MSG_STREAM_ABORT = 'A' , LOGICAL_REP_MSG_STREAM_PREPARE = 'p' } |
Definition at line 99 of file logicalproto.h.
| #define LOGICALREP_COLUMN_NULL 'n' |
Definition at line 96 of file logicalproto.h.
| #define LOGICALREP_COLUMN_TEXT 't' |
Definition at line 98 of file logicalproto.h.
| #define LOGICALREP_COLUMN_UNCHANGED 'u' |
Definition at line 97 of file logicalproto.h.
| #define LOGICALREP_PROTO_MAX_VERSION_NUM LOGICALREP_PROTO_STREAM_PARALLEL_VERSION_NUM |
Definition at line 45 of file logicalproto.h.
| #define LOGICALREP_PROTO_MIN_VERSION_NUM 1 |
Definition at line 40 of file logicalproto.h.
| #define LOGICALREP_PROTO_STREAM_PARALLEL_VERSION_NUM 4 |
Definition at line 44 of file logicalproto.h.
| #define LOGICALREP_PROTO_STREAM_VERSION_NUM 2 |
Definition at line 42 of file logicalproto.h.
| #define LOGICALREP_PROTO_TWOPHASE_VERSION_NUM 3 |
Definition at line 43 of file logicalproto.h.
| #define LOGICALREP_PROTO_VERSION_NUM 1 |
Definition at line 41 of file logicalproto.h.
Definition at line 101 of file logicalproto.h.
Definition at line 57 of file logicalproto.h.
|
extern |
Definition at line 1212 of file proto.c.
References fb(), LOGICAL_REP_MSG_BEGIN, LOGICAL_REP_MSG_BEGIN_PREPARE, LOGICAL_REP_MSG_COMMIT, LOGICAL_REP_MSG_COMMIT_PREPARED, LOGICAL_REP_MSG_DELETE, LOGICAL_REP_MSG_INSERT, LOGICAL_REP_MSG_MESSAGE, LOGICAL_REP_MSG_ORIGIN, LOGICAL_REP_MSG_PREPARE, LOGICAL_REP_MSG_RELATION, LOGICAL_REP_MSG_ROLLBACK_PREPARED, LOGICAL_REP_MSG_STREAM_ABORT, LOGICAL_REP_MSG_STREAM_COMMIT, LOGICAL_REP_MSG_STREAM_PREPARE, LOGICAL_REP_MSG_STREAM_START, LOGICAL_REP_MSG_STREAM_STOP, LOGICAL_REP_MSG_TRUNCATE, LOGICAL_REP_MSG_TYPE, LOGICAL_REP_MSG_UPDATE, and snprintf.
Referenced by apply_error_callback().
|
extern |
Definition at line 63 of file proto.c.
References elog, ERROR, fb(), pq_getmsgint(), pq_getmsgint64(), and XLogRecPtrIsValid.
Referenced by apply_handle_begin().
|
extern |
Definition at line 134 of file proto.c.
References elog, ERROR, fb(), pq_getmsgint(), pq_getmsgint64(), pq_getmsgstring(), strlcpy(), and XLogRecPtrIsValid.
Referenced by apply_handle_begin_prepare().
|
extern |
Definition at line 98 of file proto.c.
References elog, ERROR, fb(), pq_getmsgbyte(), and pq_getmsgint64().
Referenced by apply_handle_commit().
|
extern |
Definition at line 267 of file proto.c.
References elog, ERROR, fb(), pq_getmsgbyte(), pq_getmsgint(), pq_getmsgint64(), pq_getmsgstring(), strlcpy(), and XLogRecPtrIsValid.
Referenced by apply_handle_commit_prepared().
|
extern |
Definition at line 561 of file proto.c.
References elog, ERROR, fb(), logicalrep_read_tuple(), pq_getmsgbyte(), and pq_getmsgint().
Referenced by apply_handle_delete().
|
extern |
Definition at line 428 of file proto.c.
References elog, ERROR, fb(), logicalrep_read_tuple(), pq_getmsgbyte(), and pq_getmsgint().
Referenced by apply_handle_insert().
|
extern |
Definition at line 390 of file proto.c.
References pq_getmsgint64(), pq_getmsgstring(), and pstrdup().
|
extern |
Definition at line 228 of file proto.c.
References fb(), and logicalrep_read_prepare_common().
Referenced by apply_handle_prepare().
|
extern |
Definition at line 698 of file proto.c.
References logicalrep_read_attrs(), logicalrep_read_namespace(), LogicalRepRelation::nspname, palloc_object, pq_getmsgbyte(), pq_getmsgint(), pq_getmsgstring(), pstrdup(), LogicalRepRelation::relkind, LogicalRepRelation::relname, LogicalRepRelation::remoteid, and LogicalRepRelation::replident.
Referenced by apply_handle_relation().
|
extern |
Definition at line 325 of file proto.c.
References elog, ERROR, fb(), pq_getmsgbyte(), pq_getmsgint(), pq_getmsgint64(), pq_getmsgstring(), strlcpy(), and XLogRecPtrIsValid.
Referenced by apply_handle_rollback_prepared().
|
extern |
Definition at line 1187 of file proto.c.
References Assert, fb(), InvalidXLogRecPtr, pq_getmsgint(), and pq_getmsgint64().
Referenced by apply_handle_stream_abort().
|
extern |
Definition at line 1132 of file proto.c.
References elog, ERROR, fb(), pq_getmsgbyte(), pq_getmsgint(), and pq_getmsgint64().
Referenced by apply_handle_stream_commit().
|
extern |
Definition at line 365 of file proto.c.
References fb(), and logicalrep_read_prepare_common().
Referenced by apply_handle_stream_prepare().
|
extern |
Definition at line 1082 of file proto.c.
References Assert, fb(), pq_getmsgbyte(), and pq_getmsgint().
Referenced by apply_handle_stream_start().
|
extern |
Definition at line 615 of file proto.c.
References i, lappend_oid(), NIL, pq_getmsgint(), TRUNCATE_CASCADE, and TRUNCATE_RESTART_SEQS.
Referenced by apply_handle_truncate().
|
extern |
Definition at line 757 of file proto.c.
References fb(), logicalrep_read_namespace(), pq_getmsgint(), pq_getmsgstring(), and pstrdup().
Referenced by apply_handle_type().
|
extern |
Definition at line 487 of file proto.c.
References elog, ERROR, fb(), logicalrep_read_tuple(), pq_getmsgbyte(), and pq_getmsgint().
Referenced by apply_handle_update().
|
extern |
Definition at line 1282 of file proto.c.
References bms_is_member(), and fb().
Referenced by logicalrep_write_attrs(), logicalrep_write_tuple(), and send_relation_and_attrs().
|
extern |
Definition at line 49 of file proto.c.
References ReorderBufferTXN::commit_time, ReorderBufferTXN::final_lsn, LOGICAL_REP_MSG_BEGIN, pq_sendbyte(), pq_sendint32(), pq_sendint64(), and ReorderBufferTXN::xid.
Referenced by pgoutput_send_begin().
|
extern |
Definition at line 116 of file proto.c.
References ReorderBufferTXN::end_lsn, ReorderBufferTXN::final_lsn, ReorderBufferTXN::gid, LOGICAL_REP_MSG_BEGIN_PREPARE, pq_sendbyte(), pq_sendint32(), pq_sendint64(), pq_sendstring(), ReorderBufferTXN::prepare_time, and ReorderBufferTXN::xid.
Referenced by pgoutput_begin_prepare_txn().
|
extern |
Definition at line 78 of file proto.c.
References ReorderBufferTXN::commit_time, ReorderBufferTXN::end_lsn, LOGICAL_REP_MSG_COMMIT, pq_sendbyte(), and pq_sendint64().
Referenced by pgoutput_commit_txn().
|
extern |
Definition at line 237 of file proto.c.
References Assert, ReorderBufferTXN::commit_time, ReorderBufferTXN::end_lsn, fb(), ReorderBufferTXN::gid, LOGICAL_REP_MSG_COMMIT_PREPARED, pq_sendbyte(), pq_sendint32(), pq_sendint64(), pq_sendstring(), and ReorderBufferTXN::xid.
Referenced by pgoutput_commit_prepared_txn().
|
extern |
Definition at line 528 of file proto.c.
References Assert, fb(), LOGICAL_REP_MSG_DELETE, logicalrep_write_tuple(), pq_sendbyte(), pq_sendint32(), RelationData::rd_rel, RelationGetRelid, and TransactionIdIsValid.
Referenced by pgoutput_change().
|
extern |
Definition at line 403 of file proto.c.
References fb(), LOGICAL_REP_MSG_INSERT, logicalrep_write_tuple(), pq_sendbyte(), pq_sendint32(), RelationGetRelid, and TransactionIdIsValid.
Referenced by pgoutput_change().
|
extern |
Definition at line 640 of file proto.c.
References fb(), LOGICAL_REP_MSG_MESSAGE, MESSAGE_TRANSACTIONAL, pq_sendbyte(), pq_sendbytes(), pq_sendint32(), pq_sendint64(), pq_sendint8(), pq_sendstring(), and TransactionIdIsValid.
Referenced by pgoutput_message().
|
extern |
Definition at line 374 of file proto.c.
References LOGICAL_REP_MSG_ORIGIN, pq_sendbyte(), pq_sendint64(), and pq_sendstring().
Referenced by send_repl_origin().
|
extern |
Definition at line 187 of file proto.c.
References LOGICAL_REP_MSG_PREPARE, and logicalrep_write_prepare_common().
Referenced by pgoutput_prepare_txn().
|
extern |
Definition at line 667 of file proto.c.
References LOGICAL_REP_MSG_RELATION, logicalrep_write_attrs(), logicalrep_write_namespace(), pq_sendbyte(), pq_sendint32(), pq_sendstring(), RelationData::rd_rel, RelationGetNamespace, RelationGetRelationName, RelationGetRelid, relname, and TransactionIdIsValid.
Referenced by send_relation_and_attrs().
|
extern |
Definition at line 293 of file proto.c.
References Assert, ReorderBufferTXN::commit_time, ReorderBufferTXN::end_lsn, fb(), ReorderBufferTXN::gid, LOGICAL_REP_MSG_ROLLBACK_PREPARED, pq_sendbyte(), pq_sendint32(), pq_sendint64(), pq_sendstring(), and ReorderBufferTXN::xid.
Referenced by pgoutput_rollback_prepared_txn().
|
extern |
Definition at line 1161 of file proto.c.
References Assert, fb(), LOGICAL_REP_MSG_STREAM_ABORT, pq_sendbyte(), pq_sendint32(), pq_sendint64(), and TransactionIdIsValid.
Referenced by pgoutput_stream_abort().
|
extern |
Definition at line 1107 of file proto.c.
References Assert, ReorderBufferTXN::commit_time, ReorderBufferTXN::end_lsn, LOGICAL_REP_MSG_STREAM_COMMIT, pq_sendbyte(), pq_sendint32(), pq_sendint64(), TransactionIdIsValid, and ReorderBufferTXN::xid.
Referenced by pgoutput_stream_commit().
|
extern |
Definition at line 353 of file proto.c.
References LOGICAL_REP_MSG_STREAM_PREPARE, and logicalrep_write_prepare_common().
Referenced by pgoutput_stream_prepare_txn().
|
extern |
Definition at line 1064 of file proto.c.
References Assert, fb(), LOGICAL_REP_MSG_STREAM_START, pq_sendbyte(), pq_sendint32(), and TransactionIdIsValid.
Referenced by pgoutput_stream_start().
|
extern |
Definition at line 1098 of file proto.c.
References LOGICAL_REP_MSG_STREAM_STOP, and pq_sendbyte().
Referenced by pgoutput_stream_stop().
|
extern |
Definition at line 583 of file proto.c.
References i, LOGICAL_REP_MSG_TRUNCATE, pq_sendbyte(), pq_sendint32(), pq_sendint8(), TransactionIdIsValid, TRUNCATE_CASCADE, and TRUNCATE_RESTART_SEQS.
Referenced by pgoutput_truncate().
|
extern |
Definition at line 726 of file proto.c.
References elog, ERROR, fb(), getBaseType(), GETSTRUCT(), HeapTupleIsValid, LOGICAL_REP_MSG_TYPE, logicalrep_write_namespace(), NameStr, ObjectIdGetDatum(), pq_sendbyte(), pq_sendint32(), pq_sendstring(), ReleaseSysCache(), SearchSysCache1(), and TransactionIdIsValid.
Referenced by send_relation_and_attrs().
|
extern |
Definition at line 450 of file proto.c.
References Assert, fb(), LOGICAL_REP_MSG_UPDATE, logicalrep_write_tuple(), pq_sendbyte(), pq_sendint32(), RelationData::rd_rel, RelationGetRelid, and TransactionIdIsValid.
Referenced by pgoutput_change().