Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Zjo2r-0006uZ-Aw for pgsql-bugs@arkaria.postgresql.org; Wed, 07 Oct 2015 12:42:09 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1Zjo2q-0002nE-AO for pgsql-bugs@arkaria.postgresql.org; Wed, 07 Oct 2015 12:42:08 +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 1Zjo2D-00024e-FO for pgsql-bugs@postgresql.org; Wed, 07 Oct 2015 12:41:29 +0000 Received: from nm3-vm8.bullet.mail.gq1.yahoo.com ([98.136.218.151]) by magus.postgresql.org with esmtps (TLS1.0:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1Zjo29-00012C-3p for pgsql-bugs@postgresql.org; Wed, 07 Oct 2015 12:41:28 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ymail.com; s=s2048; t=1444221681; bh=8L/tYBYHPrN/Ip9Tqz0VGDjuMNaWna59gRrjHBvqfyw=; h=Date:From:Reply-To:To:Cc:In-Reply-To:References:Subject:From:Subject; b=ud5P7ikHi8rxcFmrT68sMOb/AGJ8SCVrqrlTP8sIzhzK6fbr9JKc2OfqFwB+jHBKvPkyYpCwhYyKPwHXw7NKTlywhqQ51duB3XRlmbKnSkBtAhMd0pgSsZB4QdhzSByC+r+mCwg1QvitFM1y3JBdMsWiQISNb90ok/jskgcCLtvpV0ovHhTTNy5H9xdQmzPtSakaONS7jvxFfhcKgNumh3J+wzAXpSpaf5sqBzCWQlw8xlt620p9VgTWRIclvshLYR63Rnjhca9OtbvgxH9qIcu+yFZgiF+DzBKmwRd5nzOD8z3b48+1TfHveYZVn5g26RXiLSyQE9IY354D3TFPOg== Received: from [98.137.12.55] by nm3.bullet.mail.gq1.yahoo.com with NNFMP; 07 Oct 2015 12:41:21 -0000 Received: from [98.137.12.210] by tm15.bullet.mail.gq1.yahoo.com with NNFMP; 07 Oct 2015 12:41:21 -0000 Received: from [127.0.0.1] by omp1018.mail.gq1.yahoo.com with NNFMP; 07 Oct 2015 12:41:21 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 879720.26807.bm@omp1018.mail.gq1.yahoo.com X-YMail-OSG: m7Z8s.QVM1mPX7MvMY3N4qfBXtcWhk1gNmeq0bN6uosq5cIF0w9Z4g6OESFgvyg .AakbC.x5Gjtoj40l0vJZ6sS2QDVtRMdsJNYy7O7QwLQPfAmh0aStw2vlJ_eYPVA1VyDsoCes50T V6eM3xRoEHPc4Mh0kwuge0nCQz.2UEJXWhqGGITtElSuBEfi_botATZLZ.mqeLepc_qjqgQEnkDR XR_Z6kafnHdwReucHnQKkbevBJ8x3nDZdOIawMHm5SdIGwdaF6GmnKp4bhr0OwpIEH.qvvm7C9Xr STI7YttTPIwq9cjgXJDWiNTom54rpeYUKvC_wxJSxZ7UWx.pEW27kaVfngFIYok9os6ue8sYA03B bXZVd6xRIidgJLx1u9jqcTN4CdBQoLHkMySrq1Yb.UggHsIyEba58i3NvGN5FCJPugElzvcTMY0N Bof1YjJ.SJlBoMx95KxgMRf.eN6dE1JGIJW0KifFGTCXzVKG_jdNYRyEZvaQbaH4FuBn.F8X4FBc LlwSZg7OufEv.h_86zrh4hZjTmEOgc_0- Received: by 216.39.60.195; Wed, 07 Oct 2015 12:41:21 +0000 Date: Wed, 7 Oct 2015 12:41:17 +0000 (UTC) From: Kevin Grittner Reply-To: Kevin Grittner To: Chris Pacejo Cc: "pgsql-bugs@postgresql.org" Message-ID: <1362876295.104559.1444221677453.JavaMail.yahoo@mail.yahoo.com> In-Reply-To: References: <20151001185144.335.99956@wrigleys.postgresql.org> <1379192640.1267648.1444167495623.JavaMail.yahoo@mail.yahoo.com> Subject: Re: BUG #13660: serializable snapshotting hangs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Length: 2120 X-Pg-Spam-Score: -2.7 (--) 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 On Tuesday, October 6, 2015 4:47 PM, Chris Pacejo wrote: > but I had no other open connections to that database. There were > many connections to *other* databases on that same *server*, but > that shouldn't affect taking a snapshot on an otherwise unused > database, correct? Incorrect. Like vacuum and other visibility-related operations, long-running transactions in other databases in the same "cluster" (in the sense of a group of backends running under a single postmaster) will be an issue. I seem to recall that it was non-trivial to limit things in general to a single database, but perhaps the DEFERRABLE feature could be enhanced to do that without too much pain. > Also note that once this happened to one database, it happened to > *all* databases on the same server simultaneously. Right; that is because the check for pending transactions is not database-sensitive. > It's as if the read-write transaction check is performed > server-wide, not database-wide as I would expect. Undoubtedly that would be nicer, but it is not how the current implementation works. Taking a quick look, since we currently have no way (that I know of) to get the database associated with a VirtualTransactionId, we would need to add the OID of the database to the SERIALIZABLEXACT structure and add testing it to the tests inside this loop: http://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/backend/storage/lmgr/predicate.c;h=bad5618341e3995e538edefd17561cf6db33721e;hb=master#l1766 A change like that would need to be considered an enhancement, not a bug fix, so it would not be something we could back-patch to stable branches (or even, at this point, version 9.5). Given that it is only a few straightforward lines of code, I'll see about getting a patch into the next CommitFest so it has a shot at getting into the release *after* 9.5. If you're comfortable doing your own builds from source, you might want to be an "early adopter" of this patch, once it is written and reviewed. -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs