Search Postgresql Archives

Re: [pgsql-GENERAL] AUTOVACUUM and Streaming Replication in v9.5

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On Fri, 16 Dec 2016, 12:10 a.m. Sameer Kumar, <sameer.kumar@xxxxxxxxxx> 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 select

select 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.



Regards
Sameer
--

-- 

Best Regards,

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


www.ashnik.com

--

-- 

Best Regards,

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


www.ashnik.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux