pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Thomas Munro <thomas.munro@gmail.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Daniel Gustafsson <daniel@yesql.se>
Cc: Jonathan S. Katz <jkatz@postgresql.org>
Cc: Alexander Korotkov <a.korotkov@postgrespro.ru>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Cc: Peter Geoghegan <pg@bowt.ie>
Cc: Bruce Momjian <bruce@momjian.us>
Cc: David Rowley <dgrowleyml@gmail.com>
Subject: Re: Improving connection scalability: GetSnapshotData()
Date: Sun, 16 Aug 2020 16:17:23 -0400
Message-ID: <1013484.1597609043@sss.pgh.pa.us> (raw)
In-Reply-To: <1006917.1597602624@sss.pgh.pa.us>
References: <20200716012532.lfzpvg3w55d5rqrw@alap3.anarazel.de>
	<20200716013306.GA13861@alvherre.pgsql>
	<20200724011143.jccsyvsvymuiqfxu@alap3.anarazel.de>
	<CA+hUKG+Jpj7iMin_URBcyUoWxvkVjvQAd+LbUQ4NR4aZALUhjg@mail.gmail.com>
	<CA+hUKGK_4Sa0zHcfc+7HguHhQZ0dQn4P6yzMA1MsjHawmOq0ug@mail.gmail.com>
	<20200812001938.ixenvxdpg4ielbue@alap3.anarazel.de>
	<CA+hUKGKdey77=asfyBd+-Hnmz6Y_R+TZ+wtogaTppEdVTCH+rw@mail.gmail.com>
	<20200812173855.s4co5jz67z7tlnl7@alap3.anarazel.de>
	<872191.1597504251@sss.pgh.pa.us>
	<20200815164200.drok4tt5ju7ijivf@alap3.anarazel.de>
	<20200816181604.l54m6kss5ntd6xow@alap3.anarazel.de>
	<1006917.1597602624@sss.pgh.pa.us>

I wrote:
> It seems entirely likely that there's a timing component in this, for
> instance autovacuum coming along at just the right time.

D'oh.  The attached seems to make it 100% reproducible.

			regards, tom lane

Attachments:

  [text/x-diff] add-delay-before-vacuum.patch (1.1K, ../1013484.1597609043@sss.pgh.pa.us/2-add-delay-before-vacuum.patch)
  download | inline diff:
diff --git a/src/test/isolation/specs/freeze-the-dead.spec b/src/test/isolation/specs/freeze-the-dead.spec
index 915bf15b92..4100d9fc6f 100644
--- a/src/test/isolation/specs/freeze-the-dead.spec
+++ b/src/test/isolation/specs/freeze-the-dead.spec
@@ -32,6 +32,7 @@ session "s2"
 step "s2_begin"		{ BEGIN; }
 step "s2_key_share"	{ SELECT id FROM tab_freeze WHERE id = 3 FOR KEY SHARE; }
 step "s2_commit"	{ COMMIT; }
+step "s2_wait"		{ select pg_sleep(60); }
 step "s2_vacuum"	{ VACUUM FREEZE tab_freeze; }
 
 session "s3"
@@ -49,6 +50,7 @@ permutation "s1_begin" "s2_begin" "s3_begin" # start transactions
    "s1_update" "s2_key_share" "s3_key_share" # have xmax be a multi with an updater, updater being oldest xid
    "s1_update" # create additional row version that has multis
    "s1_commit" "s2_commit" # commit both updater and share locker
+   "s2_wait"
    "s2_vacuum" # due to bug in freezing logic, we used to *not* prune updated row, and then froze it
    "s1_selectone" # if hot chain is broken, the row can't be found via index scan
    "s3_commit" # commit remaining open xact

view thread (102+ messages)  latest in thread

Message-ID: <1013484.1597609043@sss.pgh.pa.us>
Permalink:  ../1013484.1597609043@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1013484.1597609043@sss.pgh.pa.us

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, andres@anarazel.de, robertmhaas@gmail.com, thomas.munro@gmail.com, alvherre@2ndquadrant.com, daniel@yesql.se, jkatz@postgresql.org, a.korotkov@postgrespro.ru, pg@bowt.ie, bruce@momjian.us, dgrowleyml@gmail.com
  Subject: Re: Improving connection scalability: GetSnapshotData()
  In-Reply-To: <1013484.1597609043@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox