Re: Path to unreverting "Allow planner to use Merge Append to efficiently implement UNION"

2024-05-21 Thread David Rowley
(Thanks for your review. I'm sorry I didn't have time and energy to respond properly until now) On Tue, 21 May 2024 at 23:48, Heikki Linnakangas wrote: > BTW, could the same machinery be used for INTERSECT as well? There was a > brief mention of that in the original thread, but I didn't understan

Re: Path to unreverting "Allow planner to use Merge Append to efficiently implement UNION"

2024-05-21 Thread David Rowley
On Wed, 22 May 2024 at 05:36, Robert Haas wrote: > The consensus on pgsql-release was to unrevert this patch and commit > the fix now, rather than waiting for the next beta. However, the > consensus was also to push the un-revert as a separate commit from the > bug fix, rather than together as sug

Re: Path to unreverting "Allow planner to use Merge Append to efficiently implement UNION"

2024-05-21 Thread Robert Haas
On Tue, May 21, 2024 at 8:44 AM David Rowley wrote: > Thanks for having a look. I was planning to have the commit message > as per attached. I'd only split the patch for ease of review per > request of Tom. I should have mentioned that here. > > I would adjust the exact wording in the final parag

Re: Path to unreverting "Allow planner to use Merge Append to efficiently implement UNION"

2024-05-21 Thread David Rowley
On Wed, 22 May 2024 at 00:35, Alvaro Herrera wrote: > > On 2024-May-21, David Rowley wrote: > > > I've attached 2 patches. > > > > 0001 is a simple revert of Tom's revert (7204f3591). > > 0002 fixes the issue reported by Hubert. > > I would like to request that you don't keep 0001's message as you

Re: Path to unreverting "Allow planner to use Merge Append to efficiently implement UNION"

2024-05-21 Thread Alvaro Herrera
On 2024-May-21, David Rowley wrote: > I've attached 2 patches. > > 0001 is a simple revert of Tom's revert (7204f3591). > 0002 fixes the issue reported by Hubert. I would like to request that you don't keep 0001's message as you have it here. It'd be more readable to take 66c0185a3d14's whole c

Re: Path to unreverting "Allow planner to use Merge Append to efficiently implement UNION"

2024-05-21 Thread Heikki Linnakangas
On 21/05/2024 05:58, David Rowley wrote: Let this thread be for at least the coding portion of this or be my thread for this patch for the v18 cycle if the RMT rules in favour of keeping that code reverted for v17. I've attached 2 patches. 0001 is a simple revert of Tom's revert (7204f3591). 00

Path to unreverting "Allow planner to use Merge Append to efficiently implement UNION"

2024-05-20 Thread David Rowley
Earlier today in [1], a bug was reported regarding a problem with the code added in 66c0185a3 where I'd failed to handle the case correctly where the UNION's targetlist has columns which are not sortable. For pg_class, that's relfrozenxid, relminmxid and relacl. The most minimal reproducer prior