Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fZHMb-0007Xf-Tk for pgsql-hackers@arkaria.postgresql.org; Sat, 30 Jun 2018 15:00:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fZHMW-0000Mq-MA for pgsql-hackers@arkaria.postgresql.org; Sat, 30 Jun 2018 15:00:32 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fZHMW-0000Mi-6r for pgsql-hackers@lists.postgresql.org; Sat, 30 Jun 2018 15:00:32 +0000 Received: from mail.postgrespro.ru ([93.174.131.138]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fZHMQ-0004zM-Rv for pgsql-hackers@lists.postgresql.org; Sat, 30 Jun 2018 15:00:30 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.postgrespro.ru (Postfix) with ESMTP id F363021C2AF3; Sat, 30 Jun 2018 18:00:23 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at postgrespro.ru X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=x tagged_above=-99 required=4 WHITELISTED tests=[] autolearn=unavailable Received: from ars-thinkpad (nat03-43-2.netorn.net [188.35.130.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mail.postgrespro.ru (Postfix) with ESMTPSA id 7B4E421C2AED; Sat, 30 Jun 2018 18:00:22 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1530370822; bh=t83N2AYcP4XDonNjm/wKDy5m8rfA2r/ieWO19UjD6oc=; h=References:From:To:Cc:Subject:In-reply-to:Date; b=SO7Iy+sj7P447bY2hEn/+nYR1gIPCDXkWMJ+wHkRJSS2Ue9CUogVeEN6lrRiJe1nV /4F9aWe/X/vYB+2lRv8dbR6lD4HsHFpoNOd8fRFyXVKOYgKTXpVtV1l+h0D7ilpDcr DO1I7LTRFYwi0HiwFppBCPY0pIM4z8KtMyQgTpwA= References: <20180629225055.cy3e4ecayibwr5rd@alvherre.pgsql> <27276.1530313324@sss.pgh.pa.us> User-agent: mu4e 1.1.0; emacs 26.0.50 From: Arseny Sher To: Tom Lane Cc: Alvaro Herrera , pgsql-hackers@lists.postgresql.org, 2q-andrew@alvin.alvh.no-ip.org Subject: Re: pgsql: Fix "base" snapshot handling in logical decoding In-reply-to: <27276.1530313324@sss.pgh.pa.us> Date: Sat, 30 Jun 2018 18:00:21 +0300 Message-ID: <87h8lkuxoa.fsf@ars-thinkpad> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --=-=-= Content-Type: text/plain Tom Lane writes: > Alvaro Herrera writes: >>> On 2018-Jun-28, Tom Lane wrote: >>>> According to buildfarm member friarbird, and as confirmed here, >>>> the contrib/test_decoding/specs/oldest_xmin.spec test added by this >>>> commit fails under CLOBBER_CACHE_ALWAYS. > >> I suppose 60 seconds (isolationtester's default timeout) is just not >> enough time for those machines. We could increase it to 180 seconds and >> see if that's enough to make them pass ... > > What I want to know is why this test is doing a database-wide VACUUM FULL > in the first place. If that isn't profligate wastage of testing cycles, > why not? > > regards, tom lane Oh, that's my fault. I think just VACUUM pg_attribute is enough there -- it takes 42ms on my laptop with CLOBBER_CACHE_ALWAYS ('vacuum full' occupies 1 minute), patch is attached. The test is still steadily fails without the main patch. There is also one thing that puzzles me as I don't know much about vacuum internals. If I do plain VACUUM of pg_attribute in the test, it shouts "catalog is missing 1 attribute(s) for relid" error (which is quite expected), while with 'VACUUM FULL pg_attribute' the tuple is silently (and wrongly, with dropped column missing) decoded. Moreover, if I perform the test manually, and do 'VACUUM FULL;', sometimes test becomes useless -- that is, tuple is successfully decoded with all three columns, as though VACUUM was not actually executed. All this is without the main patch, of course. I think I will look into this soon. -- Arseny Sher Postgres Professional: http://www.postgrespro.com The Russian Postgres Company --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=less_agressive_vacuum_in_oldest_xmin_test.patch diff --git a/contrib/test_decoding/expected/oldest_xmin.out b/contrib/test_decoding/expected/oldest_xmin.out index d09342c4be..a5d7d3c2ca 100644 --- a/contrib/test_decoding/expected/oldest_xmin.out +++ b/contrib/test_decoding/expected/oldest_xmin.out @@ -15,7 +15,7 @@ step s0_get_changes: SELECT data FROM pg_logical_slot_get_changes('isolation_slo data step s1_commit: COMMIT; -step s0_vacuum: VACUUM FULL; +step s0_vacuum: VACUUM pg_attribute; step s0_get_changes: SELECT data FROM pg_logical_slot_get_changes('isolation_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1'); data diff --git a/contrib/test_decoding/specs/oldest_xmin.spec b/contrib/test_decoding/specs/oldest_xmin.spec index 4f8af70aa2..cd2b69cae2 100644 --- a/contrib/test_decoding/specs/oldest_xmin.spec +++ b/contrib/test_decoding/specs/oldest_xmin.spec @@ -22,7 +22,7 @@ step "s0_getxid" { SELECT txid_current() IS NULL; } step "s0_alter" { ALTER TYPE basket DROP ATTRIBUTE mangos; } step "s0_commit" { COMMIT; } step "s0_checkpoint" { CHECKPOINT; } -step "s0_vacuum" { VACUUM FULL; } +step "s0_vacuum" { VACUUM pg_attribute; } step "s0_get_changes" { SELECT data FROM pg_logical_slot_get_changes('isolation_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1'); } session "s1" --=-=-=--