Re: One-off failure in "cluster" test

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: One-off failure in "cluster" test
Date: 2020-08-17 02:51:56
Message-ID: CA+hUKGJpCfzdOxwbsfT2fMJqFSQ7rQRtWaMHKav5oJg-J5j_AQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Aug 17, 2020 at 1:27 PM Thomas Munro <thomas(dot)munro(at)gmail(dot)com> wrote:
>
> On Mon, Aug 17, 2020 at 1:20 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> > Thomas Munro <thomas(dot)munro(at)gmail(dot)com> writes:
> > > I wonder what caused this[1] one-off failure to see tuples in clustered order:
> > > ...
> > > I guess a synchronised scan could cause that, but I wouldn't expect one here.
> >
> > Looking at its configuration, chipmunk uses
> >
> > 'extra_config' => {
> > ...
> > 'shared_buffers = 10MB',

Ahh, I see what's happening. You don't need a concurrent process
scanning *your* table for scan order to be nondeterministic. The
preceding CLUSTER command can leave the start block anywhere if its
call to ss_report_location() fails to acquire SyncScanLock
conditionally. So I think we just need to disable that for this test,
like in the attached.

Attachment Content-Type Size
0001-Fix-rare-failure-in-cluster-test.patch text/x-patch 2.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2020-08-17 04:12:42 Re: OpenSSL 3.0.0 compatibility
Previous Message Michael Paquier 2020-08-17 01:32:37 Re: Fix an old description in high-availability.sgml