Re: BUG #15577: Query returns different results when executed multiple times

From: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
To: Bartosz Polnik <bartoszpolnik(at)gmail(dot)com>
Cc: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #15577: Query returns different results when executed multiple times
Date: 2019-01-09 01:52:45
Message-ID: CAEepm=0eviDVN2n=Dr7FegnJ69w3Z+EaB=CBV5Y9HXLN_HwXKQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, Jan 8, 2019 at 10:45 PM Bartosz Polnik <bartoszpolnik(at)gmail(dot)com> wrote:
> SET force_parallel_mode = off;
> SET parallel_leader_participation = off;
>
> alter table_c set (parallel_workers=2);
> ...
>
> 31 rows - correct result.

Huh. So now we have:

1. Leader only (max_parallel_workers = 0): OK
2. Worker only (parallel_leader_participation = off, parallel_workers = 2): OK
3. Leader + worker: broken, short results
4. Worker only with slightly different plan (force_parallel_mode = on): OK

Ahh, I just reproduced this. Take mockup_bug15577.sql (Bartosz's
version) and then do this:

insert into table_c select * from table_c;

insert into table_b
select generate_series(1000000, 1000010), 100112, 'A', 99888,
'2018-09-01', true,
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa';

Now the number of results from the query in the script is not stable,
varying between 235 or 246 results for me. Not sure what's going on
yet.

--
Thomas Munro
http://www.enterprisedb.com

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2019-01-09 02:12:54 BUG #15581: CREATE TABLE IF NOT EXISTS error
Previous Message Andrew Dunstan 2019-01-09 00:41:55 Re: BUG #15446: Crash on ALTER TABLE