we are not able to replicate 5GB table in postgresql using logical replication

153 views Asked by At

we have multiple tables and all are replicated successfully except one table which is in size of 5GB. Once we created replication slot, the size of the server is growing high but can't see the data. we are using Postgres 12 and Logical replication.

we have verified conflicts, error logs, replication configuration, permissions and server parameters.

1

There are 1 answers

0
Stavros Koureas On

I am assuming that you are talking about initial load using snapshot option. So have you changed the max_wal_size (the default size is 1GB)?

https://postgresqlco.nf/doc/en/param/max_wal_size/

You may exceeding the maximum wal size but I am not sure because the WAL size is configured on the server level. On the other side I am thinking that the WAL size is rising while performing a snapshot until the data are flushed from subscriber and this is happening in serial. in this case when the "monster" table comes it cannot be loaded to wal.

There is also a similar discussion here

Postgresql cannot archive WAL, after reach above max_wal_size

You may try change this parameter and give it a try.