Re: Standby reads fail when autovacuum take AEL during truncation - Mailing list pgsql-hackers

From Alexander Korotkov
Subject Re: Standby reads fail when autovacuum take AEL during truncation
Date
Msg-id CAPpHfduV2c6bj3ejkucnypU0dq7T944513FajNFLx5s6Weq76w@mail.gmail.com
Whole thread Raw
In response to Standby reads fail when autovacuum take AEL during truncation  (Adrien NAYRAT <adrien.nayrat@anayrat.info>)
Responses Re: Standby reads fail when autovacuum take AEL during truncation
List pgsql-hackers
Hi!

On Fri, Sep 7, 2018 at 3:17 PM Adrien NAYRAT <adrien.nayrat@anayrat.info> wrote:
> I was faced on $SUBJECT  on an heavily updated table and the same table
> heavily accessed on standby server.
>
> I notice autovacuum try to take an AEL in lazy_truncate_heap(). On
> primary we try during VACUUM_TRUNCATE_LOCK_WAIT_INTERVAL (50ms) and we
> failed after several attempts.
>
> But we do not have this mechanism on a standby, AEL could lock simple
> SELECT during the RelationTruncate().
>
> Please note, this can occurs even with hot_standby_feedback = on
>
> I wonder how we can improve this? Maybe by introducing an option to
> disable truncation for autovacuum on specific table?

Please, take a look at following threads:
1. https://www.postgresql.org/message-id/c9374921e50a5e8fb1ecf04eb8c6ebc3%40postgrespro.ru
2. https://www.postgresql.org/message-id/CAHGQGwE5UqFqSq1%3DkV3QtTUtXphTdyHA-8rAj4A%3DY%2Be4kyp3BQ%40mail.gmail.com

------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company


pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: [PATCH] Fix for infinite signal loop in parallel scan
Next
From: Michael Paquier
Date:
Subject: Re: Incorrect error handling for two-phase state files resulting indata loss