Re: Slow shutdowns sometimes on RDS Postgres

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Jeremy Schneider <schnjere(at)amazon(dot)com>, Chris Williams <cswilliams(at)gmail(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Slow shutdowns sometimes on RDS Postgres
Date: 2018-09-14 16:27:08
Message-ID: 761be04a-6c0b-2f26-648c-6d918489c481@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 9/14/18 8:43 AM, Jeremy Schneider wrote:
> Hi Chris - this is an interesting one that we do see from time to time;
> seems worth responding here as actually our best understanding right now
> is that this is something in community code, not AWS-specific.
>
>

> On 9/13/18 16:10, Adrian Klaver wrote:
>> The thing is, what you are doing ("(e.g. reboot, changing instance
>> size, etc.)") are instance operations not database operations. That
>> comes under AWS's purview.
>
> Correct, managing reboots and hardware reconfigurations would be the
> responsibility of AWS. However Chris' issue here is just that PostgreSQL
> itself took a long time to shut down. I'm not aware of anything
> RDS-specific with this.

The thing is I do not remember any posts to this list mentioning the
same problem on a platform outside RDS. A quick search seems to confirm
that.

Would it be possible to see the RDS shutdown script?

>
> I don't know about this specific incident, but I do know that the RDS
> team has seen cases where a backend gets into a state (like a system
> call) where it's not checking signals and thus doesn't receive or
> process the postmaster's request to quit. We've seen these processes
> delay shutdowns and also block recovery on streaming replicas.

The particulars of that state?

> FYI, yes there is a timeout on the RDS side. The basic workflow is to
> try to shutdown postgres the normal way, and if it hasn't cleanly shut
> down after a period of time then forcefully kill it.
>
>

>
> Hope this helps,
> Jeremy
>
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Yuriy Rusinov 2018-09-14 16:53:59 Re: C++ classes as result of selection in postgresql database
Previous Message David G. Johnston 2018-09-14 16:23:50 Re: Code of Conduct plan