56 errmsg(
"unsupported use of logical decoding plugin \"%s\"",
58 errdetail(
"This plugin can only be used by %s.",
59 "REPACK (CONCURRENTLY)"));
77 errmsg(
"this plugin does not expect any options"));
133 if (newtuple ==
NULL)
147 if (newtuple ==
NULL)
150 if (oldtuple !=
NULL)
162 if (oldtuple ==
NULL)
239 for (
int i = 0;
i < desc->
natts;
i++)
void BufFileWrite(BufFile *file, const void *ptr, size_t size)
#define PG_USED_FOR_ASSERTS_ONLY
#define Assert(condition)
varlena * detoast_external_attr(varlena *attr)
int errcode(int sqlerrcode)
int errdetail(const char *fmt,...) pg_attribute_printf(1
#define ereport(elevel,...)
TupleTableSlot * MakeSingleTupleTableSlot(TupleDesc tupdesc, const TupleTableSlotOps *tts_ops)
const TupleTableSlotOps TTSOpsHeapTuple
TupleTableSlot * ExecStoreHeapTuple(HeapTuple tuple, TupleTableSlot *slot, bool shouldFree)
#define palloc0_object(type)
static bool HeapTupleHasExternal(const HeapTupleData *tuple)
List * lappend(List *list, void *datum)
void MemoryContextReset(MemoryContext context)
void pfree(void *pointer)
MemoryContext CurrentMemoryContext
#define AllocSetContextCreate
#define ALLOCSET_DEFAULT_SIZES
@ OUTPUT_PLUGIN_BINARY_OUTPUT
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
static int list_length(const List *l)
#define foreach_ptr(type, var, lst)
static void repack_commit_txn(LogicalDecodingContext *ctx, ReorderBufferTXN *txn, XLogRecPtr commit_lsn)
static void repack_shutdown(LogicalDecodingContext *ctx)
static void repack_startup(LogicalDecodingContext *ctx, OutputPluginOptions *opt, bool is_init)
static void repack_process_change(LogicalDecodingContext *ctx, ReorderBufferTXN *txn, Relation relation, ReorderBufferChange *change)
static void repack_store_change(LogicalDecodingContext *ctx, Relation relation, ConcurrentChangeKind kind, HeapTuple tuple)
static void repack_begin_txn(LogicalDecodingContext *ctx, ReorderBufferTXN *txn)
void _PG_output_plugin_init(OutputPluginCallbacks *cb)
static Pointer DatumGetPointer(Datum X)
#define RelationGetRelid(relation)
#define RelationGetDescr(relation)
@ REORDER_BUFFER_CHANGE_INSERT
@ REORDER_BUFFER_CHANGE_DELETE
@ REORDER_BUFFER_CHANGE_UPDATE
#define CHANGE_UPDATE_OLD
#define CHANGE_UPDATE_NEW
char ConcurrentChangeKind
bool AmRepackWorker(void)
ResourceOwner CurrentResourceOwner
void * output_writer_private
List * output_plugin_options
LogicalDecodeStartupCB startup_cb
LogicalDecodeCommitCB commit_cb
LogicalDecodeBeginCB begin_cb
LogicalDecodeChangeCB change_cb
LogicalDecodeShutdownCB shutdown_cb
OutputPluginOutputType output_type
ReorderBufferChangeType action
struct ReorderBufferChange::@118::@119 tp
union ReorderBufferChange::@118 data
static CompactAttribute * TupleDescCompactAttr(TupleDesc tupdesc, int i)
static void slot_getsomeattrs(TupleTableSlot *slot, int attnum)
static TupleTableSlot * ExecClearTuple(TupleTableSlot *slot)
static bool slot_attisnull(TupleTableSlot *slot, int attnum)
static bool VARATT_IS_EXTERNAL_ONDISK(const void *PTR)
static Size VARSIZE_ANY(const void *PTR)
static bool VARATT_IS_EXTERNAL(const void *PTR)
static bool VARATT_IS_EXTERNAL_INDIRECT(const void *PTR)