Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZHdTJ-0007tq-Vv for pgsql-hackers@arkaria.postgresql.org; Tue, 21 Jul 2015 19:45:02 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZHdTJ-0005vS-HB for pgsql-hackers@arkaria.postgresql.org; Tue, 21 Jul 2015 19:45:01 +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 1ZHdS1-0004SJ-3t for pgsql-hackers@postgresql.org; Tue, 21 Jul 2015 19:43:41 +0000 Received: from nm20-vm3.bullet.mail.ne1.yahoo.com ([98.138.91.150]) by magus.postgresql.org with esmtps (TLS1.0:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1ZHdRw-0001g7-Cq for pgsql-hackers@postgresql.org; Tue, 21 Jul 2015 19:43:40 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ymail.com; s=s2048; t=1437507811; bh=zVQnWsWFFyJXOVEsUXJHQOIzQe1PqgJJ+NDhdXmFkcg=; h=Date:From:Reply-To:To:Subject:From:Subject; b=QGB7D6smtqA9hARCRiccPa7jIUUKl44LLW2ckSyr1NcrbzDSyNjCKOVbwtgUxBaDv0FgKQ5/tCDvFOYnO3c9H7XAc/YVuE+DyGCYAIuPUhymKCRvlNKNK5am/Rurbsq7Tjf6rnJkHgJq9L7pjM08sSOMtVLMe3PAb3kCAIvpc+OWCWm5awLE8/NhYRLxEn4+JxEyXoUrRpDvlBkPJu9DXA44PlcqbwZf0c6AURaQuhM7K6Pot+cV31fYFUzAHyFMDr4AJ9b9xL/eKZ0Q0brpESe/F5xpT4GYkWh3hCuhy5wW8cZGwQl5C+Eo4HcTVTxojhW17s9oqHdisgwNs2mS7w== Received: from [98.138.226.176] by nm20.bullet.mail.ne1.yahoo.com with NNFMP; 21 Jul 2015 19:43:31 -0000 Received: from [98.138.88.239] by tm11.bullet.mail.ne1.yahoo.com with NNFMP; 21 Jul 2015 19:43:31 -0000 Received: from [127.0.0.1] by omp1039.mail.ne1.yahoo.com with NNFMP; 21 Jul 2015 19:43:31 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 629357.85276.bm@omp1039.mail.ne1.yahoo.com X-YMail-OSG: Q2Vs8okVM1lccHDWIF82XDauNv8z8UYm3bzSk84KU2viypx4yK7vCdV3ok7DlF2 _p9pnqAvcbY9GKrSObaH1phD7o1MSI4Azm6DS_MosIe3wdlXXlmSPekJOEHouThUIDOP5K_VFG8e JX5KCvFEx1mGTvBR0UeFk5Crz8f5OdnHkBEbDot06WSjn5EPMerF1KzzAJB5YJQYJqoHIkaylY2_ Ua.c4HCcN_c0.oRqztB8sYK.9EiVEOCjZWJpnUsC3TWqlOD5KJGrLfbiWxTBvpWUtCKQsiWTDhIL raa.XPXHPdooySqVCN6a8IOFMnM21ovgcboUISmr8KPjhvKLpKC5A6Wj6XyezCwJfTnGuofp4cm1 ry3YzY_9goeus.gfvooDGmPt.mKCGwVyOGkgTMFLGvIcV1PcOcN9NRyTI0ODjvFLo07haeJQfv2a Jn_vxFyTb7ND97Qy4uirGREW4yywAh3.vWuAEkQEJCMSzWwLKM33UYGMx98.BiI4o16_3UZRR9xV 7rhxlVIqcw6.bsh0slWWlXs6x Received: by 98.138.105.193; Tue, 21 Jul 2015 19:43:31 +0000 Date: Tue, 21 Jul 2015 19:42:38 +0000 (UTC) From: Kevin Grittner Reply-To: Kevin Grittner To: PostgreSQL-development Message-ID: <185774103.1833212.1437507758024.JavaMail.yahoo@mail.yahoo.com> Subject: brin index vacuum versus transaction snapshots MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Length: 3972 X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org If you run `make installcheck` against a cluster with default_transaction_isolation = 'repeatable read' you get one failure: *** /home/kgrittn/pg/master/src/test/regress/expected/brin.out 2015-07-21 10:21:58.798619111 -0500 --- /home/kgrittn/pg/master/src/test/regress/results/brin.out 2015-07-21 14:00:25.169320059 -0500 *************** *** 405,409 **** --- 405,410 ---- box(point(odd, even), point(thousand, twothousand)) FROM tenk1 ORDER BY unique2 LIMIT 5 OFFSET 5; VACUUM brintest; -- force a summarization cycle in brinidx + ERROR: brin_summarize_new_values() cannot run in a transaction that has already obtained a snapshot UPDATE brintest SET int8col = int8col * int4col; UPDATE brintest SET textcol = '' WHERE textcol IS NOT NULL; The stacktrace is: #0 brinsummarize (index=0x7f1fe0eca6b8, heapRel=0x7f1fe0ed64f8, numSummarized=0x30e1da8, numExisting=0x30e1da8) at brin.c:1080 #1 0x00000000004683d3 in brinvacuumcleanup (fcinfo=0x7ffd41b95c98) at brin.c:731 #2 0x0000000000a69b28 in FunctionCall2Coll (flinfo=0x7ffd41b96078, collation=0, arg1=140725706121624, arg2=0) at fmgr.c:1323 #3 0x00000000004f7b60 in index_vacuum_cleanup (info=0x7ffd41b96198, stats=0x0) at indexam.c:717 #4 0x00000000006e1004 in lazy_cleanup_index (indrel=0x7f1fe0eca6b8, stats=0x0, vacrelstats=0x30e0bb0) at vacuumlazy.c:1397 #5 0x00000000006df637 in lazy_scan_heap (onerel=0x7f1fe0ed64f8, vacrelstats=0x30e0bb0, Irel=0x30e0ca8, nindexes=1, scan_all=0 '\000') at vacuumlazy.c:1108 #6 0x00000000006dda3b in lazy_vacuum_rel (onerel=0x7f1fe0ed64f8, options=1, params=0x7ffd41b96798, bstrategy=0x30d9a38) at vacuumlazy.c:244 #7 0x00000000006dc18d in vacuum_rel (relid=30220, relation=0x2f8d1a8, options=1, params=0x7ffd41b96798) at vacuum.c:1372 #8 0x00000000006db711 in vacuum (options=1, relation=0x2f8d1a8, relid=0, params=0x7ffd41b96798, va_cols=0x0, bstrategy=0x30d9a38, isTopLevel=1 '\001') at vacuum.c:293 #9 0x00000000006db31d in ExecVacuum (vacstmt=0x2f8d200, isTopLevel=1 '\001') at vacuum.c:121 #10 0x00000000008bef36 in standard_ProcessUtility (parsetree=0x2f8d200, queryString=0x2f8c788 "VACUUM brintest;", context=PROCESS_UTILITY_TOPLEVEL, params=0x0, dest=0x2f8d588, completionTag=0x7ffd41b96d50 "") at utility.c:654 #11 0x00000000008be69e in ProcessUtility (parsetree=0x2f8d200, queryString=0x2f8c788 "VACUUM brintest;", context=PROCESS_UTILITY_TOPLEVEL, params=0x0, dest=0x2f8d588, completionTag=0x7ffd41b96d50 "") at utility.c:335 #12 0x00000000008be1a7 in PortalRunUtility (portal=0x2f36b18, utilityStmt=0x2f8d200, isTopLevel=1 '\001', dest=0x2f8d588, completionTag=0x7ffd41b96d50 "") at pquery.c:1187 #13 0x00000000008bd1bd in PortalRunMulti (portal=0x2f36b18, isTopLevel=1 '\001', dest=0x2f8d588, altdest=0x2f8d588, completionTag=0x7ffd41b96d50 "") at pquery.c:1318 #14 0x00000000008bc80d in PortalRun (portal=0x2f36b18, count=9223372036854775807, isTopLevel=1 '\001', dest=0x2f8d588, altdest=0x2f8d588, completionTag=0x7ffd41b96d50 "") at pquery.c:816 #15 0x00000000008b7edf in exec_simple_query (query_string=0x2f8c788 "VACUUM brintest;") at postgres.c:1104 #16 0x00000000008b720c in PostgresMain (argc=1, argv=0x2f1d450, dbname=0x2f1d2b0 "regression", username=0x2f1d290 "kgrittn") at postgres.c:4025 #17 0x000000000081ab99 in BackendRun (port=0x2f3d610) at postmaster.c:4183 #18 0x000000000081a17a in BackendStartup (port=0x2f3d610) at postmaster.c:3859 #19 0x0000000000816753 in ServerLoop () at postmaster.c:1618 #20 0x0000000000813d4a in PostmasterMain (argc=3, argv=0x2f1c460) at postmaster.c:1263 #21 0x000000000074ec36 in main (argc=3, argv=0x2f1c460) at main.c:223 Note that the function mentioned in the error message is not anywhere in the stack trace, and that there was not any explicit transaction started -- just a VACUUM command for the table, without any BEGIN/COMMIT. This is using source at commit 9faa6ae14f6098e4b55f0131f7ec2694a381fb87. -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers