Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Zhpvl-00073D-UH for pgsql-bugs@arkaria.postgresql.org; Fri, 02 Oct 2015 02:18:42 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1Zhpvl-0007Mi-69 for pgsql-bugs@arkaria.postgresql.org; Fri, 02 Oct 2015 02:18:41 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1Zhixa-0000iP-P5 for pgsql-bugs@postgresql.org; Thu, 01 Oct 2015 18:52:06 +0000 Received: from wrigleys.postgresql.org ([204.145.124.246]) by magus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1ZhixX-0001RU-Nn for pgsql-bugs@postgresql.org; Thu, 01 Oct 2015 18:52:06 +0000 MIME-Version: 1.0 Subject: BUG #13660: serializable snapshotting hangs To: pgsql-bugs@postgresql.org From: cpacejo@clearskydata.com Date: Thu, 01 Oct 2015 18:51:44 +0000 Message-ID: <20151001185144.335.99956@wrigleys.postgresql.org> X-Pg-Spam-Score: -1.9 (-) Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org The following bug has been logged on the website: Bug reference: 13660 Logged by: Chris Pacejo Email address: cpacejo@clearskydata.com PostgreSQL version: 9.4.4 Operating system: CentOS 7 (kernel 3.10.0-123.el7.x86_64) Description: After running fine for weeks, we now find that serializable snapshots hang: our_db=> START TRANSACTION ISOLATION LEVEL SERIALIZABLE, READ ONLY, DEFERRABLE; START TRANSACTION our_db=> SELECT pg_export_snapshot(); (...hangs indefinitely...) This occurs on all databases in the cluster. pg_stat_activity reports for one database: -[ RECORD 1 ]----+------------------------------ datid | 16385 datname | our_db pid | 31347 usesysid | 99450 usename | our_user application_name | psql client_addr | X.X.X.X client_hostname | client_port | 55975 backend_start | 2015-10-01 14:24:12.942063-04 xact_start | 2015-10-01 14:26:54.437046-04 query_start | 2015-10-01 14:26:56.245404-04 state_change | 2015-10-01 14:26:56.245407-04 waiting | f state | active backend_xid | backend_xmin | 222030266 query | select pg_export_snapshot(); (i.e., this is the only active transaction on this database) gdb on this backend reports: (gdb) bt #0 0x00007f496a5e6bd7 in semop () from /lib64/libc.so.6 #1 0x000000000061ba47 in PGSemaphoreLock (sema=0x7f495f32f930, interruptOK=interruptOK@entry=1 '\001') at pg_sema.c:421 #2 0x000000000066e4c5 in ProcWaitForSignal () at proc.c:1641 #3 0x0000000000673b5d in GetSafeSnapshot (origSnapshot=) at predicate.c:1534 #4 GetSerializableTransactionSnapshot (snapshot=0xb73aa0 ) at predicate.c:1598 #5 0x0000000000782cad in GetTransactionSnapshot () at snapmgr.c:200 #6 0x000000000067df35 in exec_simple_query (query_string=0x24dc0b0 "select pg_export_snapshot();") at postgres.c:986 #7 PostgresMain (argc=, argv=argv@entry=0x244a5f8, dbname=0x244a4a8 "pod_10003_1", username=) at postgres.c:4074 #8 0x0000000000462922 in BackendRun (port=0x247b1d0) at postmaster.c:4164 #9 BackendStartup (port=0x247b1d0) at postmaster.c:3829 #10 ServerLoop () at postmaster.c:1597 #11 0x000000000062d33c in PostmasterMain (argc=argc@entry=3, argv=argv@entry=0x2449300) at postmaster.c:1244 #12 0x0000000000463569 in main (argc=3, argv=0x2449300) at main.c:228 Killing all backends (i.e. including those accessing other databases) unblocked serializable snapshotting. Is this expected behavior? -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs