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
1
vote
1 answer

How to do logical replication on cascading standby server on postgres?

Is it possible to enable logical replication on standby server which is in cascading replication mode?
1
vote
0 answers

WALs getting pilled up - restart_lsn of logical replication not moving in PostgreSQL

We have a replication setup from AWS RDS PostgreSQL to Kafka. The replication slot's restart_lsn is not moving and WALs keep pilling up. I tried to remove all the Kafka replications and tried using logical replication and AWS DMS on the same…
1
vote
0 answers

PostgreSQL to Kafka replication using Pglogical

Can we setup PostgreSQL to Kafka replication using Pglogical? Please share steps if possible. Note- We are using AWS RDS and Aurora for PostgreSQL. Thanks,
1
vote
1 answer

Are ENABLE REPLICA TRIGGER and ENABLE ALWAYS TRIGGER different in any way in Postgres 12.3?

I'm checking out logical replication in Postges 12.3...and it's awesome. A quick question, is there any difference in behavior between ENABLE REPLICA TRIGGER and ENABLE ALWAYS TRIGGER? I've tried both, in a simple test setup, and they both enable…
Morris de Oryx
  • 1,857
  • 10
  • 28
1
vote
1 answer

PostgreSQL Monitor Logical replication Failure and Lag

I have logical replication running among multiple PostgreSQL environments. I need to setup some alerting mechanism where I get an alert if one of my logical replication failed for whatever reason. How can I achieve that? I am aware of these Views,…
1
vote
2 answers

pg_repack and logical replication: any risk to missing out on changes from the table while running pg_repack?

As I understand, pg_repack creates a temporary 'mirror' table (table B) and copies the rows from the original table (table A) and re-indexes them and then replaces the original with the mirror. The mirroring step creates a lot of noise with logical…
john2x
  • 22,546
  • 16
  • 57
  • 95
1
vote
1 answer

Do PostgreSQL subscriber servers lock when synchronizing to an update to the publisher server?

If I have 3 databases Db1: only for writes, publisher Db2: only for reads, subscriber to Db1 Db3: only for reads, subscriber to Db1 Just to clarify that "only for reads" means that my application won't try to modify that database. The inverse…
Seu Madruga
  • 325
  • 7
  • 13
1
vote
0 answers

How to disable subscription automatically on connexion lost (PostgreSQL Logical Replication)?

I am currently working on logical replication (master / slave) with PostgreSQL. It is working very well, but I would like to anticipate the scenario where the connexion is broken unexpectedly (master offline, or socket broken...). I have found a way…
Ashaka
  • 61
  • 1
  • 4
1
vote
2 answers

PostgreSQL Large Table Logical Replication Infinite Sync

I have a large and fast-growing PostgreSQL table (166gb Index and 72 GB database). And I want to set up a logical replication of this table. Version 11.4 on both sides. I'm trying to do it for 2 weeks, but the only thing I have is infinite syncing…
wishcaster
  • 43
  • 7
1
vote
1 answer

Is it possible to get the current 64 bit transactionId (with the epoch) in a postgreSQL logical replication plugin

I am building a Change Capture system that consumes the Postgres WAL through a logical decoding output plugin. In the callbacks it is very easy to access the current transactionId…
fpacifici
  • 523
  • 2
  • 11
1
vote
1 answer

Where can I find a complete list about replication slot options in PostgreSQL?

I an working on PG logical replication by Java, and find a demo on the jdbc driver docs PGReplicationStream stream = replConnection.getReplicationAPI() .replicationStream() .logical() …
Bing
  • 29
  • 1
  • 6
1
vote
0 answers

Postgres Logical Replication disaster recovery

We are looking to use Postgres Logical Replication to move changes from an upstream server ("source" server) to a downstream server ("sink" server). We run into issues when we simulate a disaster recovery scenario. In order to simulate this, we…
Kyle
  • 11
  • 1
1
vote
1 answer

PostgreSQL logical replication depends on WAL segments?

I am successfully using logical replication between 2 PG 11 cloud VMs for latest data. But I tried to publish also some older tables to transfer data between databases and got strange error about missing WAL segment. These older partitions contain…
JosMac
  • 2,164
  • 1
  • 17
  • 23
1
vote
0 answers

starting or restarting logical replication in postgres when tables out of sync

I have a table in two databases called test. I was able to make a row in the source database and have it replicated in the target database. But then I deleted the row in the target database. How do I get the row back? What if it's a million rows…
1
vote
1 answer

Error running custom plugin on Postgres, "output plugins have to declare the _PG_output_plugin_init symbol"

I'm trying to create a custom output plugin for logical replication (Postgres is 9.5.4 version and I'm building the project from a Windows 8/64 bit machine - same machine where the db is installed). I started from the code of the sample…
valeriof
  • 28
  • 4