From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-general <pgsql-general@postgresql.org>
Subject: CREATE OR REPLACE FUNCTION statement just sitting there
Date: Mon, 5 Nov 2018 20:05:24 -0600
Message-ID: <924318ab-f639-8116-e3a4-af4890dd5e5d@gmail.com> (raw)
I've got a very puzzling problem on 9.6.6 systems we just migrated from
8.4. (The same problem happened on 9.6.9, but rolled it back so as to make
prod have the same version as our Staging systems.)
We've got a giant script full of DROP TRIGGER IF EXISTS and CREATE TABLE and
DROP TABLE and CREATE OR REPLACE FUNCTION statements.
It's purpose is to drop old parts of partitioned tables and add new tables.
It *ALWAYS worked* just fine on our big, ancient, production 8.4 databases
(otherwise I'd have heard the screams of user rage), and on our 9.6.6
staging environment. However, one or more of our big (and schema-identical)
prod databases (which are each on a different server) it is finicky and
tends to just "sit" at a random one of the CREATE OR REPLACE FUNCTION
statements.
The "list all blocking queries" I run doesn't show that anything is blocking
it (though it blocks everything else), and neither top(1) nor iotop(1) show
any activity.
If it matters, this script is fed to the databases via the JDBC driver, and
it works fine when I run it via psql. (I'd gladly run the scripts manually,
but these are child databases, and a parent db must be updated at the same
time by a canned application.)
Where in Postgres can I look to see why it's just sitting there?
Thanks
--
Angular momentum makes the world go 'round.
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: ronljohnsonjr@gmail.com
Subject: Re: CREATE OR REPLACE FUNCTION statement just sitting there
In-Reply-To: <924318ab-f639-8116-e3a4-af4890dd5e5d@gmail.com>
References: <924318ab-f639-8116-e3a4-af4890dd5e5d@gmail.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