Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions include/spock_exception_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ typedef struct SpockExceptionLog
HeapTuple local_tuple;
char initial_error_message[1024];
char initial_operation[16];
XLogRecPtr failed_lsn;
} SpockExceptionLog;

typedef enum SpockExceptionBehaviour
Expand Down Expand Up @@ -99,4 +100,11 @@ extern void spock_disable_subscription(SpockSubscription *sub,
XLogRecPtr lsn,
TimestampTz ts);

extern bool discardfile_write(const char *node_name, SpockRelation *rel,
Oid remote_origin, Oid local_origin,
const char *operation, SpockTupleData *oldtup,
SpockTupleData *newtup,
TransactionId remote_xid,
const char *ddl_sql, const char *ddl_user);

#endif /* SPOCK_EXCEPTION_HANDLER_H */
3 changes: 3 additions & 0 deletions include/spock_worker.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ typedef struct SpockContext
/* Manages access to SpockGroupHash */
LWLock *apply_group_master_lock;

/* DISCARDFILE: lock for concurrent append by apply workers */
LWLock *discard_file_lock;

/* Background workers. */
int total_workers;
SpockWorker workers[FLEXIBLE_ARRAY_MEMBER];
Expand Down
3 changes: 3 additions & 0 deletions sql/spock--6.0.0-devel.sql
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ CREATE TABLE spock.exception_status_detail (
REFERENCES spock.exception_status
) WITH (user_catalog_table=true);

CREATE OR REPLACE FUNCTION spock.discard_read()
RETURNS SETOF jsonb VOLATILE LANGUAGE c AS 'MODULE_PATHNAME', 'spock_discard_read';

CREATE FUNCTION spock.apply_group_progress (
OUT dbid oid,
OUT node_id oid,
Expand Down
Loading
Loading