my main question - why pg_wal dir is extremely growing up?
I have two postgresql instances.
The first was set up as master:
wal_level: "logical"
max_wal_senders: 5
max_replication_slots: 10
Also, I was enable archiving for pg_wal:
archive_mode: on
archive_command: 'gzip < %p > /.../data/pg_wal_archive/%f'
After that, PUBLICATION
was created for some of my tables (not ALL TABLES
)
For replication
psql instance - I using default psql config, only created SUBSCRIPTION
to master.
And I have two questions:
I run some script on master, which pulling ~ 10 Gb data to one table, which was not included in the PUBLICATION. And, I see, that my
pg_wal
dir size is increasing anyway. Why?Why pg_wal dir does not cleaning? Is it normal? Looks like I have some data for restore table which is not using in replication, how to delete this data?
archive_mode:
should beoff
, and files inpg_wal
will be auto replaced... Will check it... – vintik Aug 12 '19 at 13:34