Questions tagged [logical-replication]

Logical replication is a feature of PostgreSQL 10. It is a method of replicating data objects and their changes, based upon their replication identity (usually a primary key)

113 questions
0
votes
1 answer

Postgres Logical Replication - Monitor Subscriber Without Accessing the Publisher Server

I would like each subscriber server to monitor its health without accessing the publisher server 1. I use the following code from the publisher to get the lag. Is it possible to compute the lag also from the subscriber server SELECT …
user1409708
  • 953
  • 2
  • 11
  • 20
0
votes
1 answer

Does logical replication supports bidirectional?

I have created two publications one on each PostgreSQL instance but on the same table. Then I subscribed to these publications from each instance. I didn't see an error in the logs of two instances but I can see replication works on one side i.e.…
CrazyCoder
  • 2,465
  • 8
  • 36
  • 57
0
votes
1 answer

Getting error `replication slot "pgl_testdb_pgnode_pdaaa79d_sub1" does not exist`

I have a 3 node cluster having logical replication enabled and subscriber connected to the virtual IP pointing to the current leader/master under the cluster setup. Data is getting streaming/replicated to the subscriber. Whenever the master node…
Dushyant Sapra
  • 585
  • 1
  • 8
  • 16
0
votes
1 answer

Logical Replication does not Fire FOR EACH STATEMENT Trigger only FOR EACH ROW

I'm using logical replication and managed to have the trigger fire when I have the following: CREATE TRIGGER set_updated_time_trig AFTER INSERT OR UPDATE OR DELETE ON test FOR EACH ROW EXECUTE FUNCTION set_updated_time(); alter table test…
user1409708
  • 953
  • 2
  • 11
  • 20
0
votes
1 answer

postgres could not create replication slot

I'm trying to setup a simple replication scenario in postgres using logical-replication and docker-compose. As you can see I'm using a postgres service for the master database (publisher) and one more for the replica (subscriber). wal_level =…
0
votes
1 answer

Is postgresql COPY replicable via logical replication?

I've set up a couple of (logical) replicated tables between two postgres instances. All SELECT, INSERT, UPDATE, DELETE Transactions are replicated as expected. My use case is to restore/append a couple of thousands of rows out of a logical dump file…
Jürgen Zornig
  • 1,174
  • 20
  • 48
0
votes
0 answers

Table locked by background worker in PostgreSQL RDS

We have one RDS PostgreSQL running. I run pg_locks to check the locks on objects - There is this one table which is always locked( RowExclusiveLock ) by Superuser and when I try to get the details of that session from pg_Stat_Activity, it shows a…
0
votes
0 answers

How can I set up a CDC replication from AWS RDS PostgreSQL to Kafka using Pglogical?

Is it possible to setup replication from PostgreSQL to Kafka using PGlogical? Currently we are using attunity as our replication tool which has been causing issues on our instances. We are using RDS PostgreSQL.
0
votes
0 answers

Postgres 11 logical replication partition table

Getting an error on Postgres 11 when creating a publication for a partitioned table. ERROR: table is a partitioned table Detail : Adding partitioned tables to publications is not supported. Hint: You can add the table partitions individually. Is…
0
votes
0 answers

How much data can be copied to a publisher in postgres logical replication

Logical replication copies a snapshot of the data on the publisher database. I want to find out how much data can be copied to the publisher at once.
0
votes
1 answer

Do replication slots of Postgres get duplicated in cross region replication?

I have a PostgreSQL DB on Amazon RDS. I need a replication available on a different AWS Region for having high availability. I read the Posgres Docs here. However, I'm not sure if the replication slots are also replicated (along with the lsn's). Can…
ghost
  • 1,107
  • 3
  • 12
  • 31
0
votes
1 answer

Postgresql 10 logical replication - what is the best way to sync replica`s db tables

I was set up two VMs where are the first VM is master PostgreSQL and the second is the slave. I use PostgreSQL 10 with logical replicating, so I created publisher and subscription. Initially, I created necessary tables on Master, then take backup…
prosto.vint
  • 1,403
  • 2
  • 17
  • 30
0
votes
0 answers

Knex migrations to two separate databases with postgres 10 logical replication

I am currently using knex migrations to manage postgres schema changes. I have a source db and a target db with logical replication enabled using posgres 10.7. I am trying to figure out the best way to keep the schemas identical otherwise…
0
votes
1 answer

PostgreSQL 10 Logical Replication - is it possible to clone tables?

I have two DB instances with postgresql 10. First instance working with wal_level = logical, have ALL TABLE publisher. Second - have subscription to the publisher, described above. All data from the Master DB tables are successfully sending to the…
0
votes
0 answers

Why PostgreSQL keeps WAL files on logical replication longer than necessary? How to limit them?

I am trying to run a PostgreSQL (10.6) logical replication between two servers on one table only. The table has Id(int2) as a primary key. This is intentional and the table acts as a rolling window for some IoT time series data. It is heavy on…