Hi I am using seed_feedback in my python example to read logic replication data. There is problem after the seed_feedback was called. select * from pg_replication_slots; only show that confirmed_flush_lsn was changed. While the restart_lsn don't change. This may cause my postgres disk usage growing.
I find a debug error in log:
2018-07-23 17:19:35.869 CST [2255] DEBUG: failed to increase restart lsn: proposed 2F/56934F30, after 2F/56934F30, current candidate 2F/56934E50, current after 2F/56934E50, flushed up to 2F/56913378
and the slot stat is
postgres=# select * from pg_replication_slots;
LOG: duration: 0.660 ms statement: select * from pg_replication_slots;
slot_name | plugin | slot_type | datoid | database | temporary | active | active_pid | xmin |
catalog_xmin | restart_lsn | confirmed_flush_lsn
-----------+----------+-----------+--------+----------+-----------+--------+------------+------+--------------+-------------+---------------------
wal2json | wal2json | logical | 12558 | postgres | f | t | 2255 | | 953428 | 2F/563483E0 | 2F/56913378
My code pkt = self.cur.read_message() always got no pkt (There is no message anymore)
And the last pkt.data_start is 203315819384 using
So the problem seems to be I can't got data_start lsn.
And If there is no data change, the wal file is keep going to exist.
I am using https://github.com/eulerto/wal2json.
Hi I am using
seed_feedback
in my python example to read logic replication data. There is problem after theseed_feedback
was called.select * from pg_replication_slots;
only show thatconfirmed_flush_lsn
was changed. While therestart_lsn
don't change. This may cause my postgres disk usage growing.I find a debug error in log:
2018-07-23 17:19:35.869 CST [2255] DEBUG: failed to increase restart lsn: proposed 2F/56934F30, after 2F/56934F30, current candidate 2F/56934E50, current after 2F/56934E50, flushed up to 2F/56913378
and the slot stat is
My code
pkt = self.cur.read_message()
always got no pkt (There is no message anymore) And the lastpkt.data_start
is203315819384
usingis
'2F/56913378'
So the problem seems to be I can't got data_start lsn.
And If there is no data change, the wal file is keep going to exist. I am using https://github.com/eulerto/wal2json.