Diagnostic Queries
Symptoms
A subscription was created successfully but its apply worker is not yet connected to the publisher. PostgreSQL emits this as a warning (SQLSTATE 01000).
- The subscription exists but isn’t streaming.
- Often a connectivity/credentials issue to the publisher.
- A warning, not a hard failure.
What the server log shows
WARNING: subscription was created, but is not connected
HINT: To initiate replication, you must manually create the replication slot, enable the subscription, and refresh the subscription.
Why PostgreSQL raises this — what the manual says
the CREATE SUBSCRIPTION reference (Description):
“A subscription represents a replication connection to the publisher.”
A subscription’s apply worker must connect to the publisher to stream changes. When created with connect = false or when the connection can’t be made, PostgreSQL still creates the subscription but warns (01000) that replication isn’t active.
Common causes
connect = falsewas used at creation.- Wrong connection string/credentials to the publisher.
- Network/firewall blocking the publisher connection.
How to fix it
- Verify the publisher connection string and credentials.
- Enable and refresh:
ALTER SUBSCRIPTION sub ENABLE; ALTER SUBSCRIPTION sub REFRESH PUBLICATION;. - Ensure network connectivity to the publisher host/port.
Related & next steps
Reference: PostgreSQL 18 — CREATE SUBSCRIPTION.
Thanks — noted. This helps keep the database accurate.