Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gJqkO-0002aw-MU for pgsql-general@arkaria.postgresql.org; Tue, 06 Nov 2018 02:05:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gJqkK-00047h-7i for pgsql-general@arkaria.postgresql.org; Tue, 06 Nov 2018 02:05:36 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gJqkJ-000433-QW for pgsql-general@lists.postgresql.org; Tue, 06 Nov 2018 02:05:36 +0000 Received: from mail-ot1-x32e.google.com ([2607:f8b0:4864:20::32e]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gJqkC-0003J5-9m for pgsql-general@postgresql.org; Tue, 06 Nov 2018 02:05:34 +0000 Received: by mail-ot1-x32e.google.com with SMTP id m15so10044184otl.7 for ; Mon, 05 Nov 2018 18:05:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:subject:message-id:date:user-agent:mime-version :content-language; bh=zHiKDVpO2hU5ysTU8axGYzK6T/FQytm3UdqEaTC4x+s=; b=VjeDFkVliGiwU/P3qHLAEOVVilABJHjCmvNVw3TQYI0RHbW63cRh89PnCmRBvweJkj svrI7gcqxgmQ1qE5yaNbDBmqaBD6GW/Cd3p2M7C3V0tKdThB/Aw6XXRjC84UmL8K+hr7 JP5NYA+2nN6sB6X5azbEwSvMnRhuIqit9QEzgueJFiYB2sJwnjZYzBaEKIT0HgGmjp7F DBP2WhVQa1dbCmi2/VO4UjjWpdOZgixzlDLGShBYq04+08eYOlSfTDu1iU+buweEOT8a tfnNpQIcTvVTvQ3L3RFwPTSJTvem25AmzblOGnU962CYBkbaNo82Zr5GL8m4wFecNV9m cOUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-language; bh=zHiKDVpO2hU5ysTU8axGYzK6T/FQytm3UdqEaTC4x+s=; b=dT3vnseYlg16yTYWqhrIzE00u3PgRzt968zVv4xjQNJMKBw+zRpF90fgEQveBhcH4o s1zTxKSRJ8zk2+Xb4Mxwi6B5NE84m3eSIZ12OZCWJD/B399dhfExy0Z9i0xq7XOnoSG4 V+N0Wg3qVrZHPonz7UsWN7iSrTluix1tq8iOqFe5Alrlanxv+iFexVyxPlPVOxSSBVS0 px3GhspD3Gg5hrvWvDHZdycljJeKHW9VAa5p1X17EYuh58Nzaozapb7EsJ5O6s7eToXk yzOOzLx470qit1yzgoQJ/KM5ujErTkStXx9U8LC3FCCuh8CNOUMyseY4te4QNQTsFexv fU0A== X-Gm-Message-State: AGRZ1gIzOl77z1KMCvQ2XTJ/kXoGpULvxGUYdSmXlC16/07Ce/JHT9y1 8vcTcFy6UmVORag6zfst3d749RGV X-Google-Smtp-Source: AJdET5efjzglfFpK2GC1D/qvYopJvKS/7wJpehLCYLJDfR4PTtvN+xwWxxESqEdcCrqdKEli+KKbRA== X-Received: by 2002:a9d:4335:: with SMTP id s50mr11860770ote.224.1541469926476; Mon, 05 Nov 2018 18:05:26 -0800 (PST) Received: from [192.168.1.10] (ip70-171-116-89.no.no.cox.net. [70.171.116.89]) by smtp.googlemail.com with ESMTPSA id l6-v6sm8475306oia.46.2018.11.05.18.05.25 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Nov 2018 18:05:25 -0800 (PST) To: pgsql-general From: Ron Subject: CREATE OR REPLACE FUNCTION statement just sitting there Message-ID: <924318ab-f639-8116-e3a4-af4890dd5e5d@gmail.com> Date: Mon, 5 Nov 2018 20:05:24 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="------------7C1C2C15C6BDD810C5E82548" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------7C1C2C15C6BDD810C5E82548 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit 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. --------------7C1C2C15C6BDD810C5E82548 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit 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.
--------------7C1C2C15C6BDD810C5E82548--