Skip to main content
After configuring logical replication, follow these steps to prepare your replica for queries.

Operating Model

When ParadeDB is used as a logical subscriber:
  1. Your application writes to tables on the publisher
  2. Postgres logical replication applies those row changes to matching tables on ParadeDB
  3. ParadeDB maintains ParadeDB indexes locally on the subscriber
  4. Search and analytics queries run against ParadeDB instead of the primary
This keeps the source database authoritative while isolating search traffic from OLTP traffic.
Logical replication copies row changes into ParadeDB, but it does not copy ParadeDB indexes from the publisher. For the deployment described in this guide, build the ParadeDB indexes directly on the ParadeDB subscriber.

1. Wait for the Initial Copy to Finish

By default, logical replication starts with an initial copy of the existing data. Let Postgres finish copying the base table data before you build ParadeDB indexes. This avoids extra indexing work during the bootstrap phase.

Initial-Copy Parallelism

max_sync_workers_per_subscription controls how many tables a subscription can copy at once when it is created or refreshed. The default is 2. Raising it lets multi-table subscriptions copy more tables at once, but requires more slots and workers. See Replication Configuration for capacity settings.

Checking Copy Progress

On ParadeDB, you can check whether the initial copy is still running with:
The initial copy is complete when there are no remaining rows with worker_type = 'table synchronization'. If you want a stricter per-table check, run:
The initial copy is complete when every replicated table is in state r (ready).

2. Build ParadeDB Indexes

Once the replicated tables are caught up, create ParadeDB indexes locally on the ParadeDB logical replica:
After this, ongoing replicated INSERT, UPDATE, and DELETE operations will keep the ParadeDB index current automatically.

3. Query ParadeDB

Your application can now issue queries to ParadeDB without adding indexes to the primary database:
For more query examples, see Run Your First Queries.