Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Zjpeo-0004TW-BS for pgsql-bugs@arkaria.postgresql.org; Wed, 07 Oct 2015 14:25:26 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1Zjpen-0003Wg-3J for pgsql-bugs@arkaria.postgresql.org; Wed, 07 Oct 2015 14:25:25 +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 1Zjpe9-0002lr-Bq for pgsql-bugs@postgresql.org; Wed, 07 Oct 2015 14:24:45 +0000 Received: from nm16.bullet.mail.gq1.yahoo.com ([98.137.176.58]) by magus.postgresql.org with esmtps (TLS1.0:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1Zjpe0-0003Ac-D6 for pgsql-bugs@postgresql.org; Wed, 07 Oct 2015 14:24:44 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ymail.com; s=s2048; t=1444227873; bh=QjHtR/pJVBCNamd3XsAqZfYAwHN6tjuPluM6iWA+S0c=; h=Date:From:Reply-To:To:Cc:In-Reply-To:References:Subject:From:Subject; b=E+EE5LyNWTeIDVArp5/5Yjuqv8WyJsXOXW9A+QVq8YOxP5vETVB1FXm4YouQ+T7fi8NUqnjFcy/6cYD7dnQUkjhOO5s7Ee00hf4KyLmtuODJAC4jDNELOVmgZjLt38neJVlf8AqAAYuWfrbsHvKaRnsMEfwgWznopD2k5HocoaUjdmPCaGNPZJAqonwrzKyJVlESEpWvGoVff+8OPvSPtJLTujb9YkHmTnAJNW41g6uhAucby+UzGMfFX7shDvxqSUQufgnPin2xqSEUUhlsMcWwVnGeLmc0eP4mi7o7zW5AtPMcUbIk6MRAyE4vRFG3Pd8ZB9phY1lMCaM1D8jBGw== Received: from [216.39.60.180] by nm16.bullet.mail.gq1.yahoo.com with NNFMP; 07 Oct 2015 14:24:33 -0000 Received: from [98.137.12.207] by tm16.bullet.mail.gq1.yahoo.com with NNFMP; 07 Oct 2015 14:24:33 -0000 Received: from [127.0.0.1] by omp1015.mail.gq1.yahoo.com with NNFMP; 07 Oct 2015 14:24:33 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 35694.19299.bm@omp1015.mail.gq1.yahoo.com X-YMail-OSG: HJnVTlcVM1n_XwcD1EDang6yh21wfYAMK6Sz3nr8PJV_zr_ZHKYGsgbqIlOQsfe O.RHfk7l_hO5GyYqpw9GNp7GRRHn5vBxUo3QmFNiuxXh1SdW6BpSVW7rigY9gs2xnXKuxrLtfEJa 4D_yPCfAkHd4Uo8N3O2x0GAgsjWuFu4U6WWCdTiGRCzwC.0EM7lF7AxaALxP7d7tTDrnY4Uznuyh d4722vO.DBALw8634SwUbiyEp8eH.ivFYzDia0mR1HVq9nUjTzTZpzRIHTVP0IRz5vMMb1B3zRwo JPmDsPjtDkdW0rXCDWcRv1R9W1vqQ4ssdaA3_pjVdYYvKmELwim3pC.2hD7qDO6DE3gIuBVzM331 TE6xpMnw6pp23RQ1j0gJ.88zsrBYvpgRduP8bTWhTbQVNThReQK.XI1LRCxhS8UP63UzMAmH53_1 aWAre2n.EjjK5.xTqzFcqMnspNP9ounB3x2vzRBNrplJ4s87BIqYiTUxHFM6Nj6i3YWQ8j7gfSlz N1ZCIdhkYAQjVRSXyxEuVouWJ Received: by 98.137.12.253; Wed, 07 Oct 2015 14:24:32 +0000 Date: Wed, 7 Oct 2015 14:24:31 +0000 (UTC) From: Kevin Grittner Reply-To: Kevin Grittner To: Tom Lane Cc: Chris Pacejo , "pgsql-bugs@postgresql.org" Message-ID: <1266496986.153956.1444227871967.JavaMail.yahoo@mail.yahoo.com> In-Reply-To: <23855.1444226920@sss.pgh.pa.us> References: <23855.1444226920@sss.pgh.pa.us> Subject: Re: BUG #13660: serializable snapshotting hangs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Length: 1951 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 Wednesday, October 7, 2015 9:08 AM, Tom Lane wrote: > Kevin Grittner writes: >> The Serializable Snapshot Isolation techniques only work on top of >> MVCC snapshot isolation. At the time of the SSI patch, catalogs >> were not accessed according to those rules, so we excluded them >> from SSI handling -- it just could not have worked in a meaningful >> way. (So catalog access is currently identical under REPEATABLE >> READ and SERIALIZABLE transaction isolation levels.) > > Really? "SELECT * FROM pg_database" will ignore SSI? Yes. If that is run in a SERIALIZABLE transaction, the effect will be the same as if it were run in a REPEATABLE READ transaction -- it will use the transaction snapshot but will not create SIReadLocks or examine the MVCC state of the rows read to look for read-write conflicts. > I agree that the system's own catalog accesses don't pay attention > to SSI, and probably can't because of concerns about needing to see > fully up-to-date data. But that's not my question. My point is > that userland snapshots can be used to examine shared catalogs, > and even update them if you're a superuser. In such situations a SERIALIZABLE transaction provides no additional protections against serialization anomalies involving the catalogs than a REPEATABLE READ transaction. If we decided to support the distinction you suggest, I'm not sure how we would distinguish changes made by DDL commands from changes made by superuser DML to catalog tables when examining the row's MVCC data during a scan. I am also skeptical that the addition of predicate locks (done from inside heap and index AMs) would have a sensible way to distinguish between the two cases. Finally, it's not immediately obvious what the benefit would be of distinguishing between the two forms of catalog modification. -- 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