citusdata / citusdata/citus

CDC FATAL: out of relcache_callback_list slots

Open
#7,117 0 comments 0 reactions 1 assignee Claimed by @rajeshkt78 View on GitHub
bug
Dominant language
C
Stars
12.8k
Forks
794
Avg merge
2d 14h
Merged PRs (30d)
31

Description

https://docs.citusdata.com/en/v12.0/develop/integrations.html#logical-replication-of-distributed-tables-to-postgresql-tables

When I follow the documentation to use CDC to replicate a distributed table to another pg database, the citus pg instance reports the following error:

```shell
LOG: Initializing CDC decoder
2023-08-15 07:32:23.187 UTC [3171229] czmpcity@czmpcity STATEMENT: COPY (select lsn, data FROM pg_logical_slot_peek_binary_changes('cityserver_mater_pg_ch_replication_slot', NULL, 1, 'publication_names', 'cityserver_mater_pg_ch_publication', 'proto_version', '1')) TO STDOUT
2023-08-15 07:32:23.187 UTC [3171229] czmpcity@czmpcity FATAL: out of relcache_callback_list slots
```
Since the creation of SUBSCRIPTION, the target table can constantly get new data from the coordinator node. But there is no initialization of millions of rows of data and no new data from other working nodes.

Not sure if it has anything to do with the fact that I have more data in my table (with 5 million rows).

Here are my main operation steps.
coordinator node:
```sql
CREATE PUBLICATION cdc_publication_check FOR TABLE bs_dd_check_weight;
SELECT * FROM run_command_on_all_nodes($$
SELECT pg_create_logical_replication_slot('cdc_replication_slot_check', 'pgoutput', false)
$$);
```
client:
```sql
CREATE SUBSCRIPTION cdc_subscription_check_4
CONNECTION 'dbname= host= user= port='
PUBLICATION cdc_publication_check
WITH (copy_data=true,create_slot=false,slot_name='cdc_replication_slot_check');
CREATE SUBSCRIPTION cdc_subscription_check_3
CONNECTION 'dbname= host=< worker1 host> user= port='
PUBLICATION cdc_publication_check
WITH (copy_data=false,create_slot=false,slot_name='cdc_replication_slot_check');
CREATE SUBSCRIPTION cdc_subscription_check_5
CONNECTION 'dbname= host=< worker2 host> user= port='
PUBLICATION cdc_publication_check
WITH (copy_data=false,create_slot=false,slot_name='cdc_replication_slot_check');
......
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.