From: | Sameer Kumar <sameer(dot)kumar(at)ashnik(dot)com> |
---|---|
To: | PostgreSQL General Discussion Forum <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: [pgsql-GENERAL] AUTOVACUUM and Streaming Replication in v9.5 |
Date: | 2016-12-15 16:13:58 |
Message-ID: | CADp-Sm5cq=dKr=mr+ShP76ju+QJO3D8FLpwrC8uxfucYfb0FXw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Fri, 16 Dec 2016, 12:10 a.m. Sameer Kumar, <sameer(dot)kumar(at)ashnik(dot)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 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
>
>
> [image: www.ashnik.com] <http://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
[image: www.ashnik.com] <http://www.ashnik.com/>
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Kellerer | 2016-12-15 16:15:44 | Re: pg_dump and quoted identifiers |
Previous Message | Adrian Klaver | 2016-12-15 16:11:45 | Re: tuple data size and compression |