<@U04S8PLJWMT> Can a same replication slot be used...
# ask-ai
w
@kapa.ai Can a same replication slot be used for two CDC based tables with REPLICA IDENTITY DEFAULT? My max_wal_size is 40960 with max_wal_senders 20, cloudsql.enable_pglogical on, cloudsql.logical_decoding on. My tables with CDC are having inserts and deletes. What is the correct usecase? My consumer is Airbyte which I am using to replicate or EL data from source postgres (two CDC based tables) to destination
k
Yes, you can use the same replication slot for multiple CDC-based tables with REPLICA IDENTITY DEFAULT in PostgreSQL when using Airbyte. In fact, this is the standard approach: a single logical replication slot and publication can include multiple tables, and Airbyte will consume changes for all tables included in the publication via that slot. The replication slot tracks the WAL (Write-Ahead Log) position for all tables in the publication, not just one table. Correct Use Case: - Create a single replication slot (e.g.,
airbyte_slot
) using a logical decoding plugin like
pgoutput
. - Create a publication that includes both tables you want to replicate. - Set REPLICA IDENTITY to DEFAULT for both tables (which is required for CDC to work properly and is the default if your tables have primary keys). - In Airbyte, configure the source to use the same replication slot and publication for both tables. Example:
Copy code
sql ALTER TABLE table1 REPLICA IDENTITY DEFAULT; ALTER TABLE table2 REPLICA IDENTITY DEFAULT;  CREATE PUBLICATION airbyte_publication FOR TABLE table1, table2;  SELECT pg_create_logical_replication_slot('airbyte_slot', 'pgoutput');
Then, in Airbyte, set the replication mode to Logical Replication (CDC), and enter the replication slot and publication you created. Airbyte will then capture inserts and deletes (as well as updates) for both tables using the same slot and publication. This is the recommended and supported approach for your use case, and your current Postgres settings (max_wal_size, max_wal_senders, logical decoding enabled) are appropriate for supporting logical replication with multiple tables in a single slot and publication. Important Notes: - The replication slot should be dedicated to Airbyte and not shared with other consumers. - All tables you want to replicate must be included in the publication; otherwise, changes to excluded tables will not be captured. - For CDC to work, each table must have a primary key and REPLICA IDENTITY DEFAULT (or FULL if needed for special cases) set. Tables without primary keys can only be replicated using Full Refresh, not CDC. - Frequent syncs are recommended to avoid WAL buildup, as the slot retains WAL segments until they are consumed by Airbyte. References: - [Cloud SQL for PostgreSQL CDC setup](https://docs.airbyte.com/integrations/sources/postgres/cloud-sql-postgres#step-5-create-publication-and-replication-identities-for-each-postgres-table) - [CDC requirements and limitations](https://docs.airbyte.com/integrations/sources/postgres/postgres-troubleshooting#cdc-requirements) - [Airbyte CDC tutorial](https://airbyte.com/tutorials/postgresql-change-data-capture-elt)
w
@kapa.ai What should be a sequence to DROP raw stream table created by airbyte with connection created intermediate table/table with prefix? The table is currently locked and the operation cannot be completed. Please try again later. Blocking Process ID : 1257591 Application Name : PostgreSQL JDBC Driver
k
A message from kapa.ai
To drop a raw stream table created by Airbyte, especially when intermediate tables (with prefixes like
_airbyte_tmp_
) are involved, you should follow these steps: 1. Ensure No Active Locks: The error message indicates the table is currently locked by another process (Process ID: 1257591). You must wait until the lock is released or terminate the blocking process if appropriate and safe. You can identify and terminate the blocking process using PostgreSQL administrative commands, but this should be done with caution. 2. Drop Intermediate (Temporary) Tables First: If there are intermediate tables with prefixes such as
_airbyte_tmp_
, you can safely drop these tables after the sync is complete. There is no built-in Airbyte feature to remove these prefixes automatically; manual deletion is required. Example SQL:
Copy code
sql    DROP TABLE IF EXISTS <schema>._airbyte_tmp_<table_name>;
[Forum reference](https://discuss.airbyte.io/t/2867) 3. Drop the Raw Table: Once you are sure no process is using the raw table and any related temporary tables are dropped, you can drop the raw table itself. Example SQL:
Copy code
sql    DROP TABLE IF EXISTS <schema>._airbyte_raw_<table_name>;
4. If There Are Dependent Objects: If you have created dependent objects (like views) on the Airbyte tables, you may need to use
DROP ... CASCADE
. Be aware that this will also drop all dependent objects, so ensure you have a way to recreate them if needed. [See: Creating dependent objects](https://docs.airbyte.com/integrations/destinations/postgres#creating-dependent-objects) Summary Sequence: 1. Wait for or terminate blocking processes. 2. Drop intermediate tables (e.g.,
_airbyte_tmp_...
). 3. Drop the raw table (e.g.,
_airbyte_raw_...
). 4. Use
CASCADE
if there are dependencies, but proceed with caution. If the table remains locked, you must resolve the lock before proceeding. The knowledge sources do not provide a built-in Airbyte feature for automated cleanup; manual intervention is required as described above.
w
@kapa.ai What is size of queue(Advanced) of source postgres connector when setting up postgres source with sync mode CDC or update method CDC?
k
A message from kapa.ai
I'm sorry, but the knowledge sources provided do not specify the default or configurable size of the queue (Advanced) for the source Postgres connector when the sync mode or update method is set to CDC. While some logs and discussions reference queue statistics (such as a capacity of 10,000 in log lines), there is no explicit documentation or configuration guidance about this parameter in the available sources. If you need the exact value or how to configure it, please refer to the official Airbyte documentation or the connector's configuration UI for the most accurate and up-to-date information.
A message from kapa.ai
Based on the available knowledge sources, the default size of the queue for the source Postgres connector when using CDC sync mode appears in log outputs as a capacity of 10,000:
Copy code
CDC events queue stats: size=0, cap=10000, puts=7, polls=0
This log line indicates that the queue capacity is set to 10,000 events during CDC operations. However, the knowledge sources do not explicitly state whether this value is configurable via the "queue (Advanced)" setting in the Airbyte UI or if it is hardcoded. There is no documentation in the provided sources detailing how to change this value or what the "queue (Advanced)" setting specifically controls in the context of the Postgres CDC connector. If you require confirmation or need to adjust this parameter, it is recommended to consult the Airbyte connector configuration UI or the official documentation for the most current and detailed information. The knowledge sources do not provide further details on this setting at this time [source](https://github.com/airbytehq/airbyte/issues/49803).
w
@kapa.ai Explain 2025-10-07 160518 destination INFO main i.a.c.i.d.j.JdbcBufferedConsumerFactory(onStartFunction$lambda$4):240 Preparing raw table in destination started for stream airbyte_expedia_revplus_v2. schema: airbyte_internal, table name: public_raw__stream_airbyte_expedia_revplus_v2 2025-10-07 160547 destination INFO pool-3-thread-1 i.a.c.i.d.a.b.BufferManager(printQueueInfo):89 [ASYNC QUEUE INFO] Global: max: 307.2 MB, allocated: 10 MB (10.0 MB), %% used: 0.03255208335354433 | State Manager memory usage: Allocated: 10 MB, Used: 0 bytes, percentage Used 0.0 2025-10-07 160547 destination INFO pool-6-thread-1 i.a.c.i.d.a.FlushWorkers(printWorkerInfo):127 [ASYNC WORKER INFO] Pool queue size: 0, Active threads: 0 2025-10-07 160647 destination INFO pool-3-thread-1 i.a.c.i.d.a.b.BufferManager(printQueueInfo):89 [ASYNC QUEUE INFO] Global: max: 307.2 MB, allocated: 10 MB (10.0 MB), %% used: 0.03255208335354433 | State Manager memory usage: Allocated: 10 MB, Used: 0 bytes, percentage Used 0.0 2025-10-07 160647 destination INFO pool-6-thread-1 i.a.c.i.d.a.FlushWorkers(printWorkerInfo):127 [ASYNC WORKER INFO] Pool queue size: 0, Active threads: 0 2025-10-07 160747 destination INFO pool-3-thread-1 i.a.c.i.d.a.b.BufferManager(printQueueInfo):89 [ASYNC QUEUE INFO] Global: max: 307.2 MB, allocated: 10 MB (10.0 MB), %% used: 0.03255208335354433 | State Manager memory usage: Allocated: 10 MB, Used: 0 bytes, percentage Used 0.0 2025-10-07 160747 destination INFO pool-6-thread-1 i.a.c.i.d.a.FlushWorkers(printWorkerInfo):127 [ASYNC WORKER INFO] Pool queue size: 0, Active threads: 0 2025-10-07 160847 destination INFO pool-3-thread-1 i.a.c.i.d.a.b.BufferManager(printQueueInfo):89 [ASYNC QUEUE INFO] Global: max: 307.2 MB, allocated: 10 MB (10.0 MB), %% used: 0.03255208335354433 | State Manager memory usage: Allocated: 10 MB, Used: 0 bytes, percentage Used 0.0 2025-10-07 160847 destination INFO pool-6-thread-1 i.a.c.i.d.a.FlushWorkers(printWorkerInfo):127 [ASYNC WORKER INFO] Pool queue size: 0, Active threads: 0 2025-10-07 160947 destination INFO pool-3-thread-1 i.a.c.i.d.a.b.BufferManager(printQueueInfo):89 [ASYNC QUEUE INFO] Global: max: 307.2 MB, allocated: 10 MB (10.0 MB), %% used: 0.03255208335354433 | State Manager memory usage: Allocated: 10 MB, Used: 0 bytes, percentage Used 0.0 2025-10-07 160947 destination INFO pool-6-thread-1 i.a.c.i.d.a.FlushWorkers(printWorkerInfo):127 [ASYNC WORKER INFO] Pool queue size: 0, Active threads: 0 2025-10-07 161047 destination INFO pool-3-thread-1 i.a.c.i.d.a.b.BufferManager(printQueueInfo):89 [ASYNC QUEUE INFO] Global: max: 307.2 MB, allocated: 10 MB (10.0 MB), %% used: 0.03255208335354433 | State Manager memory usage: Allocated: 10 MB, Used: 0 bytes, percentage Used 0.0 2025-10-07 161047 destination INFO pool-6-thread-1 i.a.c.i.d.a.FlushWorkers(printWorkerInfo):127 [ASYNC WORKER INFO] Pool queue size: 0, Active threads: 0 2025-10-07 161147 destination INFO pool-3-thread-1 i.a.c.i.d.a.b.BufferManager(printQueueInfo):89 [ASYNC QUEUE INFO] Global: max: 307.2 MB, allocated: 10 MB (10.0 MB), %% used: 0.03255208335354433 | State Manager memory usage: Allocated: 10 MB, Used: 0 bytes, percentage Used 0.0 2025-10-07 161147 destination INFO pool-6-thread-1 i.a.c.i.d.a.FlushWorkers(printWorkerInfo):127 [ASYNC WORKER INFO] Pool queue size: 0, Active threads: 0 2025-10-07 161247 destination INFO pool-3-thread-1 i.a.c.i.d.a.b.BufferManager(printQueueInfo):89 [ASYNC QUEUE INFO] Global: max: 307.2 MB, allocated: 10 MB (10.0 MB), %% used: 0.03255208335354433 | State Manager memory usage: Allocated: 10 MB, Used: 0 bytes, percentage Used 0.0 2025-10-07 161247 destination INFO pool-6-thread-1 i.a.c.i.d.a.FlushWorkers(printWorkerInfo):127 [ASYNC WORKER INFO] Pool queue size: 0, Active threads: 0 2025-10-07 161347 destination INFO pool-3-thread-1 i.a.c.i.d.a.b.BufferManager(printQueueInfo):89 [ASYNC QUEUE INFO] Global: max: 307.2 MB, allocated: 10 MB (10.0 MB), %% used: 0.03255208335354433 | State Manager memory usage: Allocated: 10 MB, Used: 0 bytes, percentage Used 0.0 2025-10-07 161347 destination INFO pool-6-thread-1 i.a.c.i.d.a.FlushWorkers(printWorkerInfo):127 [ASYNC WORKER INFO] Pool queue size: 0, Active threads: 0 2025-10-07 161447 destination INFO pool-3-thread-1 i.a.c.i.d.a.b.BufferManager(printQueueInfo):89 [ASYNC QUEUE INFO] Global: max: 307.2 MB, allocated: 10 MB (10.0 MB), %% used: 0.03255208335354433 | State Manager memory usage: Allocated: 10 MB, Used: 0 bytes, percentage Used 0.0 2025-10-07 161447 destination INFO pool-6-thread-1 i.a.c.i.d.a.FlushWorkers(printWorkerInfo):127 [ASYNC WORKER INFO] Pool queue size: 0, Active threads: 0 2025-10-07 161547 destination INFO pool-3-thread-1 i.a.c.i.d.a.b.BufferManager(printQueueInfo):89 [ASYNC QUEUE INFO] Global: max: 307.2 MB, allocated: 10 MB (10.0 MB), %% used: 0.03255208335354433 | State Manager memory usage: Allocated: 10 MB, Used: 0 bytes, percentage Used 0.0 2025-10-07 161547 destination INFO pool-6-thread-1 i.a.c.i.d.a.FlushWorkers(printWorkerInfo):127 [ASYNC WORKER INFO] Pool queue size: 0, Active threads: 0 2025-10-07 161647 destination INFO pool-3-thread-1 i.a.c.i.d.a.b.BufferManager(printQueueInfo):89 [ASYNC QUEUE INFO] Global: max: 307.2 MB, allocated: 10 MB (10.0 MB), %% used: 0.03255208335354433 | State Manager memory usage: Allocated: 10 MB, Used: 0 bytes, percentage Used 0.0 2025-10-07 161647 destination INFO pool-6-thread-1 i.a.c.i.d.a.FlushWorkers(printWorkerInfo):127 [ASYNC WORKER INFO] Pool queue size: 0, Active threads: 0 2025-10-07 161747 destination INFO pool-3-thread-1 i.a.c.i.d.a.b.BufferManager(printQueueInfo):89 [ASYNC QUEUE INFO] Global: max: 307.2 MB, allocated: 10 MB (10.0 MB), %% used: 0.03255208335354433 | State Manager memory usage: Allocated: 10 MB, Used: 0 bytes, percentage Used 0.0 2025-10-07 161747 destination INFO pool-6-thread-1 i.a.c.i.d.a.FlushWorkers(printWorkerInfo):127 [ASYNC WORKER INFO] Pool queue size: 0, Active threads: 0 2025-10-07 161847 destination INFO pool-3-thread-1 i.a.c.i.d.a.b.BufferManager(printQueueInfo):89 [ASYNC QUEUE INFO] Global: max: 307.2 MB, allocated: 10 MB (10.0 MB), %% used: 0.03255208335354433 | State Manager memory usage: Allocated: 10 MB, Used: 0 bytes, percentage Used 0.0 2025-10-07 161847 destination INFO pool-6-thread-1 i.a.c.i.d.a.FlushWorkers(printWorkerInfo):127 [ASYNC WORKER INFO] Pool queue size: 0, Active threads: 0 2025-10-07 161947 destination INFO pool-3-thread-1 i.a.c.i.d.a.b.BufferManager(printQueueInfo):89 [ASYNC QUEUE INFO] Global: max: 307.2 MB, allocated: 10 MB (10.0 MB), %% used: 0.03255208335354433 | State Manager memory usage: Allocated: 10 MB, Used: 0 bytes, percentage Used 0.0 2025-10-07 161947 destination INFO pool-6-thread-1 i.a.c.i.d.a.FlushWorkers(printWorkerInfo):127 [ASYNC WORKER INFO] Pool queue size: 0, Active threads: 0 2025-10-07 162047 destination INFO pool-3-thread-1 i.a.c.i.d.a.b.BufferManager(printQueueInfo):89 [ASYNC QUEUE INFO] Global: max: 307.2 MB, allocated: 10 MB (10.0 MB), %% used: 0.03255208335354433 | State Manager memory usage: Allocated: 10 MB, Used: 0 bytes, percentage Used 0.0 2025-10-07 162047 destination INFO pool-6-thread-1 i.a.c.i.d.a.FlushWorkers(printWorkerInfo):127 [ASYNC WORKER INFO] Pool queue size: 0, Active threads: 0 2025-10-07 162147 destination INFO pool-3-thread-1 i.a.c.i.d.a.b.BufferManager(printQueueInfo):89 [ASYNC QUEUE INFO] Global: max: 307.2 MB, allocated: 10 MB (10.0 MB), %% used: 0.03255208335354433 | State Manager memory usage: Allocated: 10 MB, Used: 0 bytes, percentage Used 0.0 2025-10-07 162147 destination INFO pool-6-thread-1 i.a.c.i.d.a.FlushWorkers(printWorkerInfo):127 [ASYNC WORKER INFO] Pool queue size: 0, Active threads: 0 2025-10-07 162247 destination INFO pool-3-thread-1 i.a.c.i.d.a.b.BufferManager(printQueueInfo):89 [ASYNC QUEUE INFO] Global: max: 307.2 MB, allocated: 10 MB (10.0 MB), %% used: 0.03255208335354433 | State Manager memory usage: Allocated: 10 MB, Used: 0 bytes, percentage Used 0.0 2025-10-07 162247 destination INFO pool-6-thread-1 i.a.c.i.d.a.FlushWorkers(printWorkerInfo):127 [ASYNC WORKER INFO] Pool queue size: 0, Active threads: 0 2025-10-07 162347 destination INFO pool-3-thread-1 i.a.c.i.d.a.b.BufferManager(printQueueInfo):89 [ASYNC QUEUE INFO] Global: max: 307.2 MB, allocated: 10 MB (10.0 MB), %% used: 0.03255208335354433 | State Manager memory usage: Allocated: 10 MB, Used: 0 bytes, percentage Used 0.0 2025-10-07 162347 destination INFO pool-6-thread-1 i.a.c.i.d.a.FlushWorkers(printWorkerInfo):127 [ASYNC WORKER INFO] Pool queue size: 0, Active threads: 0 2025-10-07 162447 destination INFO pool-3-thread-1 i.a.c.i.d.a.b.BufferManager(printQueueInfo):89 [ASYNC QUEUE INFO] Global: max: 307.2 MB, allocated: 10 MB (10.0 MB), %% used: 0.03255208335354433 | State Manager memory usage: Allocated: 10 MB, Used: 0 bytes, percentage Used 0.0 2025-10-07 162447 destination INFO pool-6-thread-1 i.a.c.i.d.a.FlushWorkers(printWorkerInfo):127 [ASYNC WORKER INFO] Pool queue size: 0, Active threads: 0 2025-10-07 162547 destination INFO pool-3-thread-1 i.a.c.i.d.a.b.BufferManager(printQueueInfo):89 [ASYNC QUEUE INFO] Global: max: 307.2 MB, allocated: 10 MB (10.0 MB), %% used: 0.03255208335354433 | State Manager memory usage: Allocated: 10 MB, Used: 0 bytes, percentage Used 0.0 2025-10-07 162547 destination INFO pool-6-thread-1 i.a.c.i.d.a.FlushWorkers(printWorkerInfo):127 [ASYNC WORKER INFO] Pool queue size: 0, Active threads: 0
k
A message from kapa.ai
New message text here
w
@kapa.ai Why continuous logs every minute when running clear out data for a connection from airbyte? 2025-10-07 180508 destination INFO pool-3-thread-1 i.a.c.i.d.a.b.BufferManager(printQueueInfo):89 [ASYNC QUEUE INFO] Global: max: 296.96 MB, allocated: 10 MB (10.0 MB), %% used: 0.03367428551701215 | State Manager memory usage: Allocated: 10 MB, Used: 0 bytes, percentage Used 0.0 2025-10-07 180508 destination INFO pool-6-thread-1 i.a.c.i.d.a.FlushWorkers(printWorkerInfo):127 [ASYNC WORKER INFO] Pool queue size: 0, Active threads: 0 2025-10-07 180608 destination INFO pool-3-thread-1 i.a.c.i.d.a.b.BufferManager(printQueueInfo):89 [ASYNC QUEUE INFO] Global: max: 296.96 MB, allocated: 10 MB (10.0 MB), %% used: 0.03367428551701215 | State Manager memory usage: Allocated: 10 MB, Used: 0 bytes, percentage Used 0.0 2025-10-07 180608 destination INFO pool-6-thread-1 i.a.c.i.d.a.FlushWorkers(printWorkerInfo):127 [ASYNC WORKER INFO] Pool queue size: 0, Active threads: 0
k
A message from kapa.ai
The continuous logs every minute during the "clear out data" operation for a connection in Airbyte are periodic status logs from the BufferManager and FlushWorkers. These logs show the current state of the internal buffer and worker threads, including memory allocation, queue size, and active threads. This behavior is normal and is intended to provide ongoing visibility into the system's internal state, even when no data is being processed or the system is idle. The knowledge sources show similar periodic logging patterns during idle or waiting states, where the buffer and queue status are reported at regular intervals, such as every minute. This helps with monitoring and debugging, ensuring that administrators can see that the system is still running and not stuck, even if no active data processing is occurring at that time. There is no indication in the knowledge sources that this is an error or misconfiguration—it is standard Airbyte logging behavior during operations like clearing out data or when the system is otherwise idle but active in a workflow [source](https://github.com/airbytehq/airbyte/issues/58082).