mirror of https://github.com/citusdata/citus.git
change name of logical decoding plugin
parent
25bae46cd6
commit
4b064fa321
7
Makefile
7
Makefile
|
@ -17,16 +17,17 @@ all: extension pg_send_cancellation
|
|||
# build columnar only
|
||||
columnar:
|
||||
$(MAKE) -C src/backend/columnar all
|
||||
logical_decoding_plugin:
|
||||
# build logical decoding plugin for shard split
|
||||
decoding_plugin_for_shard_split:
|
||||
$(MAKE) -C src/backend/distributed/shardsplit all
|
||||
# build extension
|
||||
extension: $(citus_top_builddir)/src/include/citus_version.h columnar
|
||||
$(MAKE) -C src/backend/distributed/ all
|
||||
install-columnar: columnar
|
||||
$(MAKE) -C src/backend/columnar install
|
||||
install-logical_decoding_plugin: logical_decoding_plugin
|
||||
install-decoding_plugin_for_shard_split: decoding_plugin_for_shard_split
|
||||
$(MAKE) -C src/backend/distributed/shardsplit install
|
||||
install-extension: extension install-columnar install-logical_decoding_plugin
|
||||
install-extension: extension install-columnar install-decoding_plugin_for_shard_split
|
||||
$(MAKE) -C src/backend/distributed/ install
|
||||
install-headers: extension
|
||||
$(MKDIR_P) '$(DESTDIR)$(includedir_server)/distributed/'
|
||||
|
|
|
@ -86,7 +86,7 @@ static void SetupHashMapForShardInfo();
|
|||
*
|
||||
* There is a 1-1 mapping between a target node and a replication slot as one replication
|
||||
* slot takes care of replicating changes for one node.
|
||||
* The 'logical_decoding_plugin' consumes this information and routes the tuple
|
||||
* The 'decoding_plugin_for_shard_split' consumes this information and routes the tuple
|
||||
* from the source shard to the appropriate destination shard that falls in the
|
||||
* respective range.
|
||||
*/
|
||||
|
|
|
@ -16,7 +16,7 @@ ENSURE_SUBDIRS_EXIST := $(shell mkdir -p $(SUBDIRS))
|
|||
$(patsubst $(citus_abs_srcdir)/%.c,%.o,$(foreach dir,$(SUBDIRS), $(sort $(wildcard $(citus_abs_srcdir)/$(dir)/*.c))))
|
||||
OBJS += pgoutput.o
|
||||
|
||||
MODULE_big = logical_decoding_plugin
|
||||
MODULE_big = decoding_plugin_for_shard_split
|
||||
|
||||
PG_CPPFLAGS += -I$(libpq_srcdir) -I$(safestringlib_srcdir)/include
|
||||
|
||||
|
|
|
@ -57,12 +57,12 @@ begin
|
|||
|
||||
SELECT * into sharedMemoryId from SplitShardReplicationSetup(targetNode1, targetNode2);
|
||||
SELECT FORMAT('%s_%s', targetNode1, sharedMemoryId) into derivedSlotName;
|
||||
SELECT slot_name into targetOneSlotName from pg_create_logical_replication_slot(derivedSlotName, 'logical_decoding_plugin');
|
||||
SELECT slot_name into targetOneSlotName from pg_create_logical_replication_slot(derivedSlotName, 'decoding_plugin_for_shard_split');
|
||||
|
||||
-- if new child shards are placed on different nodes, create one more replication slot
|
||||
if (targetNode1 != targetNode2) then
|
||||
SELECT FORMAT('%s_%s', targetNode2, sharedMemoryId) into derivedSlotName;
|
||||
SELECT slot_name into targetTwoSlotName from pg_create_logical_replication_slot(derivedSlotName, 'logical_decoding_plugin');
|
||||
SELECT slot_name into targetTwoSlotName from pg_create_logical_replication_slot(derivedSlotName, 'decoding_plugin_for_shard_split');
|
||||
INSERT INTO slotName_table values(targetTwoSlotName, targetNode2, 1);
|
||||
end if;
|
||||
|
||||
|
@ -102,7 +102,7 @@ $$ LANGUAGE plpgsql;
|
|||
-- ARRAY[1, 3 , 0 , 2147483647, 18 ]
|
||||
-- ]
|
||||
-- );
|
||||
-- 5. Create Replication slot with 'logical_decoding_plugin'
|
||||
-- 5. Create Replication slot with 'decoding_plugin_for_shard_split'
|
||||
-- 6. Setup Pub/Sub
|
||||
-- 7. Insert into table_to_split_1 at source worker1
|
||||
-- 8. Expect the results in either table_to_split_2 or table_to_split_2 at worker2
|
||||
|
|
|
@ -43,12 +43,12 @@ begin
|
|||
|
||||
SELECT * into sharedMemoryId from SplitShardReplicationSetup(targetNode1, targetNode2);
|
||||
SELECT FORMAT('%s_%s', targetNode1, sharedMemoryId) into derivedSlotName;
|
||||
SELECT slot_name into targetOneSlotName from pg_create_logical_replication_slot(derivedSlotName, 'logical_decoding_plugin');
|
||||
SELECT slot_name into targetOneSlotName from pg_create_logical_replication_slot(derivedSlotName, 'decoding_plugin_for_shard_split');
|
||||
|
||||
-- if new child shards are placed on different nodes, create one more replication slot
|
||||
if (targetNode1 != targetNode2) then
|
||||
SELECT FORMAT('%s_%s', targetNode2, sharedMemoryId) into derivedSlotName;
|
||||
SELECT slot_name into targetTwoSlotName from pg_create_logical_replication_slot(derivedSlotName, 'logical_decoding_plugin');
|
||||
SELECT slot_name into targetTwoSlotName from pg_create_logical_replication_slot(derivedSlotName, 'decoding_plugin_for_shard_split');
|
||||
INSERT INTO slotName_table values(targetTwoSlotName, targetNode2, 1);
|
||||
end if;
|
||||
|
||||
|
@ -91,7 +91,7 @@ $$ LANGUAGE plpgsql;
|
|||
-- ARRAY[1, 3 , 0 , 2147483647, 18 ]
|
||||
-- ]
|
||||
-- );
|
||||
-- 5. Create Replication slot with 'logical_decoding_plugin'
|
||||
-- 5. Create Replication slot with 'decoding_plugin_for_shard_split'
|
||||
-- 6. Setup Pub/Sub
|
||||
-- 7. Insert into table_to_split_1 at source worker1
|
||||
-- 8. Expect the results in either table_to_split_2 or table_to_split_2 at worker2
|
||||
|
|
Loading…
Reference in New Issue