Thread: Re: [GENERAL] [pgsql-GENERAL] AUTOVACUUM and Streaming Replication in v9.5
On Fri, 16 Dec 2016, 12:10 a.m. Sameer Kumar, <sameer.kumar@ashnik.com> wrote:
Hi,I was wondering if there is some change in the way max_standby_streaming_delay and hot_standby_feedback work in v9.5.Below is a scenario which I had built to test out something but the behavior confused me. I would like to check if there is something/some parameter which I am missing or if my understanding is wrong.I have a Standby Server with hot_standby_feedback set to off.My max_standby_streaming_delay is set to 30s.I started a transaction on standby with repeatable read isolation level. I fired a selectselect count(*) from table_a;This gave me result 60000;I deleted a huge chunk of rows on Primary for table_a.I can see that autovaccum lauched an autovacuum and autoanalyze (going by the timestamp in pg_stat_user_tables for table_a) after these deletes. For a short period of time I also saw that pg_class.reltuples was reduced to a smaller number (I think because of deletions).But when I checked again, pg_stat_user_tables on master revealed that autovacuum has triggered a few times since the deletion for table_a. I also noted that on master pg_class.reltuples are back to roughly 60000 (which was the case before deletion).I thought if my hot_standby_feedback is off, I might face an issue with rows being removed by vacuum. But that did not happen. Can someone help me to understand how MVCC, autovacuum work with Streaming replication.
I am running Postgresql 9.5.1 on CentOS 7.2 64bit.
Pls let me know if I have missed any relevant imp detail.
RegardsSameer--Sameer Kumar | DB Solution Architect
ASHNIK PTE. LTD.
101 Cecil Street, #11-11 Tong Eng Building, Singapore 069533
T: +65 6438 3504 | www.ashnik.com
Skype: sameer.ashnik | T: +65 8110 0350
--
Sameer Kumar | DB Solution Architect
ASHNIK PTE. LTD.
101 Cecil Street, #11-11 Tong Eng Building, Singapore 069533
T: +65 6438 3504 | www.ashnik.com
Skype: sameer.ashnik | T: +65 8110 0350