Re: pgsql: Fix "base" snapshot handling in logical decoding

From: Arseny Sher <a(dot)sher(at)postgrespro(dot)ru>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org, 2q-andrew(at)alvin(dot)alvh(dot)no-ip(dot)org
Subject: Re: pgsql: Fix "base" snapshot handling in logical decoding
Date: 2018-06-30 15:00:21
Message-ID: 87h8lkuxoa.fsf@ars-thinkpad
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers


Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:

> Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> 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

Attachment Content-Type Size
less_agressive_vacuum_in_oldest_xmin_test.patch text/x-diff 1.3 KB

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Andrew Dunstan 2018-06-30 16:49:37 pgsql: Update typedefs list
Previous Message Tom Lane 2018-06-30 05:19:49 Re: pgsql: Fix crash when ALTER TABLE recreates indexes on partitions

Browse pgsql-hackers by date

  From Date Subject
Next Message Brad DeJong 2018-06-30 16:42:44 Re: PostgreSQL vs SQL Standard
Previous Message Amit Kapila 2018-06-30 13:50:15 Re: Concurrency bug in UPDATE of partition-key