pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrei Lepikhov <a.lepikhov@postgrespro.ru>
To: Alexander Korotkov <aekorotkov@gmail.com>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: David Rowley <dgrowleyml@gmail.com>
Cc: Alexander Korotkov <akorotkov@postgresql.org>
Cc: PostgreSQL Bug List <pgsql-bugs@lists.postgresql.org>
Subject: Re: v17 Possible Union All Bug
Date: Thu, 1 Feb 2024 11:06:45 +0700
Message-ID: <41499cc3-31a1-4c9e-85d6-45e6d901ea6a@postgrespro.ru> (raw)
In-Reply-To: <CAPpHfds_6Bk2H2FE_AxPTQ7A4cTWXCFVyXaX2TA4t5BUb-q46A@mail.gmail.com>
References: <CAKFQuwY3Ek=cLThgd8FdaSc5JRDVt0FaV00gMcWra+TAR4gGUw@mail.gmail.com>
	<CAKFQuwZKMbccEbjfLmpaBmD+heXRa-Cmf+XOKRe=mOxc9HYpqQ@mail.gmail.com>
	<CAApHDvoJ21egQX=Mf015PBVY_9AoPhrdw-3Xpxr+Re_UjvnFTQ@mail.gmail.com>
	<CAApHDvqGS=y2EgzLLJLBqPu0Cms9kecVs7H3ZG2pz9ofL9r3zg@mail.gmail.com>
	<CAKFQuwaahSXUgT1Vpzm_L8YY3g=j8Hc0u0UTeXkNHHyff77Bcw@mail.gmail.com>
	<CAKFQuwbp8cFu_w88cD8M9s6YppnBL1KkJOC9ht8E7MLscUTqvQ@mail.gmail.com>
	<CAPpHfds_6Bk2H2FE_AxPTQ7A4cTWXCFVyXaX2TA4t5BUb-q46A@mail.gmail.com>

On 30/1/2024 04:45, Alexander Korotkov wrote:
> On Mon, Jan 29, 2024 at 11:32 PM David G. Johnston
> <david.g.johnston@gmail.com> wrote:
>>
>> On Mon, Jan 29, 2024 at 9:19 AM David G. Johnston <david.g.johnston@gmail.com> wrote:
>>>
>>> On Fri, Jan 26, 2024 at 5:36 PM David Rowley <dgrowleyml@gmail.com> wrote:
>>>>
>>>> On Sat, 27 Jan 2024 at 13:19, David Rowley <dgrowleyml@gmail.com> wrote:
>>>>> Are the results correct if you SET enable_presorted_aggregate=0;?
>>>>
>>>
>>> Apparently I didn't reply-all...
>>>
>>> Yes, the problem goes away when I disabled presorted_aggregate
>>>
>>> I'll see if that knowledge can help build a better reproducer.
>>>
>>
>> I've deferred doing a better reproducer for the moment, I reliably got:
>> initdb
>> psql --file ~/unionall-repro.sql
>> psql -c 'select * from rolegraph.role_graph_broken;'
>>
>>    oid  | role_type |      rolname       | rolsuper |                administration
>> -------+-----------+--------------------+----------+-----------------------------------------------
>>   16390 | User      | u6_green_leader_su | f        | mog of g6a_fixedops_manager_su from superuser+
>>         |           |                    |          | mog of g6c_service_manager_su from superuser +
>>         |           |                    |          | mog of g6d_service_advisor_su from superuser +
>>         |           |                    |          | mog of g6e_service_tech_su from superuser    +
>>         |           |                    |          | mog of g6c_service_manager_su from cr_admin
>> (1 row)
>>
>> to be produced for the bad bisect result and the correct nested result for *manager* to produce on the good result.
> 
> 
> Thank you for noticing.  I'm investigating this.
Very curious bug. I simplified the test a bit (see in attachment), but 
still can't replace system tables, like pg_authid, with a plain table. 
Will try further.

-- 
regards,
Andrei Lepikhov
Postgres Professional

Attachments:

  unionall-repro-c.sql (application/sql, 10.1K) download

view thread (13+ messages)  latest in thread

Message-ID: <41499cc3-31a1-4c9e-85d6-45e6d901ea6a@postgrespro.ru>
Permalink:  ../41499cc3-31a1-4c9e-85d6-45e6d901ea6a@postgrespro.ru/
Also on:    postgresql.org/message-id/41499cc3-31a1-4c9e-85d6-45e6d901ea6a@postgrespro.ru

 · 

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-bugs@postgresql.org
  Cc: a.lepikhov@postgrespro.ru, aekorotkov@gmail.com, david.g.johnston@gmail.com, dgrowleyml@gmail.com, akorotkov@postgresql.org, pgsql-bugs@lists.postgresql.org
  Subject: Re: v17 Possible Union All Bug
  In-Reply-To: <41499cc3-31a1-4c9e-85d6-45e6d901ea6a@postgrespro.ru>

* 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