pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Jeremy Schneider <schnjere@amazon.com>
To: Chris Williams <cswilliams@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Slow shutdowns sometimes on RDS Postgres
Date: Fri, 14 Sep 2018 09:27:08 -0700
Message-ID: <761be04a-6c0b-2f26-648c-6d918489c481@aklaver.com> (raw)
In-Reply-To: <aefb4da4-1e0b-986d-ce4b-0f7303b977ad@amazon.com>
References: <CAGj2PiRL_N8B4RzfUt0DQmhs6pugY17FnjekV_8v5FB7X5ZZFg@mail.gmail.com>
	<2029f1ad-23e5-5e81-4409-a76386f71382@commandprompt.com>
	<aefb4da4-1e0b-986d-ce4b-0f7303b977ad@amazon.com>

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.klaver@aklaver.com




view thread (12+ messages)  latest in thread

Message-ID: <761be04a-6c0b-2f26-648c-6d918489c481@aklaver.com>
Permalink:  ../761be04a-6c0b-2f26-648c-6d918489c481@aklaver.com/
Also on:    postgresql.org/message-id/761be04a-6c0b-2f26-648c-6d918489c481@aklaver.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, schnjere@amazon.com, cswilliams@gmail.com
  Subject: Re: Slow shutdowns sometimes on RDS Postgres
  In-Reply-To: <761be04a-6c0b-2f26-648c-6d918489c481@aklaver.com>
  References: <CAGj2PiRL_N8B4RzfUt0DQmhs6pugY17FnjekV_8v5FB7X5ZZFg@mail.gmail.com> <2029f1ad-23e5-5e81-4409-a76386f71382@commandprompt.com> <aefb4da4-1e0b-986d-ce4b-0f7303b977ad@amazon.com> <761be04a-6c0b-2f26-648c-6d918489c481@aklaver.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox