pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jim Nasby <Jim.Nasby@BlueTreble.com>
To: Jason Jho <jasonjho@gmail.com>
To: pgsql-performance@postgresql.org
Subject: Re: Hanging query on a fresh restart
Date: Fri, 13 Nov 2015 15:40:42 -0600
Message-ID: <564658DA.2000804@BlueTreble.com> (raw)
In-Reply-To: <CACLReKuBuHU85p38fYoF_h_jMKeeFewOXvS7zSGV+fHWz4ENrQ@mail.gmail.com>
References: <CACLReKuBuHU85p38fYoF_h_jMKeeFewOXvS7zSGV+fHWz4ENrQ@mail.gmail.com>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>

On 11/10/15 3:42 PM, Jason Jho wrote:
> On one particular day, this query hung for many hours and even while we
> killed pids for running queries and any locks granted, the query would
> never return.  Also no hints of blocking processes.  After some digging
> through some I/O metrics, we didn't see any memory issues or unusual
> spikes that would lead us to believe that we're running low on resources.

Did IO stats indicate IO was happening? Did you see a pegged CPU running 
the query?

> There is 1 caveat, however:  there was a different schema that contained
> a day-old copy of data that isn't normally present when the hang started
> to occur.  However, since these are completely different schema
> namespaces with no crossovers in the queries themselves, I don't see how
> this is relevant.

If search_path wasn't what you thought it was you could have easily been 
running against the wrong set of tables.

> We thought this might be possibly due to some internal vacuuming, but
> this is unlikely since there are no real concurrent reads or updates
> happening.  Auto-vacuum is also on with default settings.

There are other reasons why autovacuum could kick in, notably to prevent 
transaction ID wraparound.

> What is the most confusing part in all of this is why a DROP SCHEMA
> CASCADE and a fresh pg_restore would somehow fix the problem.  Even a
> fresh reboot didn't fix it.

Without more info we're stuck guessing. You might try submitting a 
ticket with amazon, especially if you can reproduce this.
-- 
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com


-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance



view thread (3+ messages)  latest in thread

Message-ID: <564658DA.2000804@BlueTreble.com>
Permalink:  ../564658DA.2000804@BlueTreble.com/
Also on:    postgresql.org/message-id/564658DA.2000804@BlueTreble.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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: Jim.Nasby@BlueTreble.com, jasonjho@gmail.com
  Subject: Re: Hanging query on a fresh restart
  In-Reply-To: <564658DA.2000804@BlueTreble.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