0

I have a postgresql source database where I have enabled logical replication to replicate data in another postgresql destination database. Publication contains only one table which is arround 3MBs of data configured to replicate all the columns. In this table, no new records are beeing generated, updated or deleted. At the moment there is a problem and subscription is not working.

I insepected the replication slot with the following statement

SELECT
slot_name,
(pg_current_wal_lsn() - confirmed_flush_lsn) AS lag
FROM pg_replication_slots;

The above query is getting increased every second, in two days went from 1MB to 10GBs, is there any explanation why this is getting increased if there are no transactions?

Is this number related to the current wal size of database?

3
  • If there is no activity, WAL won't grow. Perhaps there is VACUUM running. Commented Oct 21, 2024 at 13:36
  • Maybe wal is not being generated due to this one table, but it is generated due to something else. Are you saying nothing else is going on either? Commented Oct 21, 2024 at 16:28
  • So practically does not matter if inside publication I have some tables, the metioned query will start increasing even there are happening things on other table than publication tables? Commented Oct 25, 2024 at 10:20

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.