From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ron <ronljohnsonjr@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: psql is hanging
Date: Fri, 30 Nov 2018 11:38:37 -0500
Message-ID: <28459.1543595917@sss.pgh.pa.us> (raw)
In-Reply-To: <58390119-ac5f-1f93-4c6c-9ac01902c863@gmail.com>
References: <CAK6G+57yG5W+ZSShNjHMKjKPpYB-enTaWKcwC5k5wa4Oew5zXA@mail.gmail.com>
<58390119-ac5f-1f93-4c6c-9ac01902c863@gmail.com>
Ron <ronljohnsonjr@gmail.com> writes:
> We have a seemingly identical problem in v9.6 on our big prod databases. It
> worked perfectly in 8.4 *and works perfectly in 9.6 our small staging servers*.
> A giant sql script that drops the oldest child tables from a large set of
> partitioned tables (by dropping all relevant triggers, indexes, functions
> etc, dropping the oldest children, adding the new children then recreating
> all the relevant triggers, indexes, functions etc).
A script like that is going to be taking exclusive locks on a whole lot
of tables. My guess is that you are running up against lock conflicts
against other activity in the DB, and that the "hang" is just waiting
for other transactions to release their table locks. Looking into
the pg_locks view could be informative.
regards, tom lane
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: tgl@sss.pgh.pa.us, ronljohnsonjr@gmail.com
Subject: Re: psql is hanging
In-Reply-To: <28459.1543595917@sss.pgh.pa.us>
References: <CAK6G+57yG5W+ZSShNjHMKjKPpYB-enTaWKcwC5k5wa4Oew5zXA@mail.gmail.com> <58390119-ac5f-1f93-4c6c-9ac01902c863@gmail.com> <28459.1543595917@sss.pgh.pa.us>
* 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