| From: | solai v <solai(dot)cdac(at)gmail(dot)com> |
|---|---|
| To: | Alexander Pyhalov <a(dot)pyhalov(at)postgrespro(dot)ru> |
| Cc: | Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com>, Alexander Korotkov <aekorotkov(at)gmail(dot)com>, Matheus Alcantara <matheusssilv97(at)gmail(dot)com>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Asynchronous MergeAppend |
| Date: | 2026-10-09 04:28:48 |
| Message-ID: | CAF0whucXp2bs9X-kgN6f0BPxKD1ZZQaVEE95R75rB9sLe755hA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi,
I reviewed and tested the latest v22 patch series for Asynchronous MergeAppend.
I was able to reproduce the reported behavior using two postgres_fdw
servers with async_capable = on.
Before applying the patch, I ran the following query
EXPLAIN (VERBOSE, COSTS OFF)
SELECT *
FROM players_remote1
UNION ALL
SELECT *
FROM players_remote2
ORDER BY score, id;
The plan showed
Merge Append
-> Foreign Scan on public.players_remote1
-> Foreign Scan on public.players_remote2
So even though both foreign servers were configured with async_capable
= on, the MergeAppend plan was still using regular Foreign Scan nodes.
I then applied the v22 patch series, rebuilt PostgreSQL and ran the
same test again.
After applying the patch, the plan changed to
Merge Append
-> Async Foreign Scan on public.players_remote1
-> Async Foreign Scan on public.players_remote2
This looks correct to me and shows that MergeAppend is now able to
make use of the asynchronous foreign scan capability.
I also checked the query result after the patch.
The two remote tables contained 5,000 rows each and the query
returned all 10,000 rows as expected.
I did not run a performance comparison, so I have not evaluated the
actual performance improvement.
Overall, the patch worked as expected in my testing.
Regards,
solai
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Paul A Jungwirth | 2026-10-09 04:30:24 | Fix WITHOUT OVERLAPS PKs used for functional grouping |
| Previous Message | Paul A Jungwirth | 2026-10-09 04:20:12 | Fix WITHOUT OVERLAPS multirange with location replication |