agora inbox for pgsql-hackers@postgresql.org
help / color / mirror / Atom feedFrom: Alexander Pyhalov <a.pyhalov@postgrespro.ru>
To: Alexander Korotkov <aekorotkov@gmail.com>
Cc: Matheus Alcantara <matheusssilv97@gmail.com>
Cc: Pgsql Hackers <pgsql-hackers@postgresql.org>
Subject: Re: Asynchronous MergeAppend
Date: Mon, 03 Aug 2026 12:31:48 +0300
Message-ID: <96da674ecf493e8ab591b4ce5444ce5d@postgrespro.ru> (raw)
In-Reply-To: <CAPpHfdv4XZ_RrnicOzVGwkcz150jjizA9xuiHGmAgzMfmo9kBg@mail.gmail.com>
References: <59be194c5a409fb9fc9f2031581b8a44@postgrespro.ru>
<2fb1d9923b6995492e7b163e6cb95402@postgrespro.ru>
<DE662JHGRO2O.3KJBBG2R3IT17@gmail.com>
<efbfbcf00b6b790e8f80c13a83417a23@postgrespro.ru>
<CAFY6G8d3Yvxa_kRQA24BsJhwqfmSCv1ujiv_7b6g5isf-ZTs_Q@mail.gmail.com>
<b546d8bd5e2218f4f917fda4c93ead21@postgrespro.ru>
<DED05POJZS2W.2EZ60AOBMDDAE@gmail.com>
<bcdefce7e3db9566d0619ad2eed2a299@postgrespro.ru>
<DF0RCOYB19RC.35BW2FHPO4N4S@gmail.com>
<a16423ca928cde3650bbc219982a5ffc@postgrespro.ru>
<DF28LV8UTUOO.71JUZDH1N8F9@gmail.com>
<d5c0bfca6ee15d62df1ba72e540b4ddf@postgrespro.ru>
<DFAQTF8P9AU0.2ZELZFXOCD0XL@gmail.com>
<c264abe661f72d6627f987fc9aa4e456@postgrespro.ru>
<DFBN6K9K9IUG.23WZ7OBL8DRAQ@gmail.com>
<c0d55d3f68bfd5650fe3143d3a31c84c@postgrespro.ru>
<782a968c8e01ec6db3b2da2120adf73b@postgrespro.ru>
<554a73f7ffea8b22b3f81a4804b5fc34@postgrespro.ru>
<e13717179328abed3e189f4ca1e63087@postgrespro.ru>
<CAPpHfdu+3Eud0CBpdFT+osWiT=e=zOQUtBsx8Z5okKrqhgVAJg@mail.gmail.com>
<42a9a941-e768-4fd8-8067-12958c5a1d70@gmail.com>
<CAPpHfdsO8zYpDW==D6T5N0cJ+AzK7a_OyXJoYU1kFi=xZFTLuQ@mail.gmail.com>
<DHMH23M7UOFS.12W6PUDI1I3NH@gmail.com>
<CAPpHfdssDymMVohXw5XwdPoJ9UvSv1iN2zRcmsEhhfXXks01Zg@mail.gmail.com>
<10c97af0ce34ebdb81708b1c49ed6038@postgrespro.ru>
<fa7ae004ec282fde84c29f36e0c85979@postgrespro.ru>
<CAPpHfdtNOvgKfUFLY84dLtT=m17d=976duxUvvhYGHkLhN8GAw@mail.gmail.com>
<af6f5a17e291169f5929744acc8ddd3d@postgrespro.ru>
<CAPpHfdsAL9oXrSP25c1XYS-ew0doUST=FU3LWj6aEG0iDw2rSA@mail.gmail.com>
<e8d502937d94eb6bd18e38ff1f240a05@postgrespro.ru>
<CAPpHfdv4XZ_RrnicOzVGwkcz150jjizA9xuiHGmAgzMfmo9kBg@mail.gmail.com>
Alexander Korotkov писал(а) 2026-08-03 11:32:
> On Mon, Aug 3, 2026 at 8:41 AM Alexander Pyhalov
> <a.pyhalov@postgrespro.ru> wrote:
>> Alexander Korotkov писал(а) 2026-08-01 00:03:
>> > On Mon, Jul 6, 2026 at 4:42 PM Alexander Pyhalov
>> >> ExecMergeAppendGetNextSlot() - I'd sligtly prefer to check if mplan is
>> >> member of as_asyncplans and assert that it's a member of
>> >> node->as.valid_asyncplans
>> >> in this case, but I think it doesn't matter much.
>> >
>> > OK, I changed to this way.
>>
>> It seems you've missed the attachment.
>
> Sorry, here it is.
>
> ------
> Regards,
> Alexander Korotkov
> Supabase
Hi.
We call ExecAppendBaseAsyncProcessPending() in ExecReScanAppend(), but
timeout depends on node->as_syncdone. Later we still process all async
requests, which have callback_pending set (as we loop until there's no
requests with callback_pending == false). Should we just set timeout to
-1 both for Append and MergeAppend to avoid busy loop in
ExecAppendBaseAsyncProcessPending()? Also it seems strange that timeout
depends on old (pre-rescan) node->as_syncdone state.
>> ExecMergeAppendGetNextSlot() - I'd sligtly prefer to check if mplan is
>> member of as_asyncplans and assert that it's a member of
>> node->as.valid_asyncplans
>> in this case, but I think it doesn't matter much.
> OK, I changed to this way.
Fine, let's preserve it this way.
--
Best regards,
Alexander Pyhalov,
Postgres Professional
view thread (46+ messages) latest in thread
Message-ID: <96da674ecf493e8ab591b4ce5444ce5d@postgrespro.ru>
Permalink: ../96da674ecf493e8ab591b4ce5444ce5d@postgrespro.ru/
Also on: postgresql.org/message-id/96da674ecf493e8ab591b4ce5444ce5d@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-hackers@postgresql.org
Cc: a.pyhalov@postgrespro.ru, aekorotkov@gmail.com, matheusssilv97@gmail.com
Subject: Re: Asynchronous MergeAppend
In-Reply-To: <96da674ecf493e8ab591b4ce5444ce5d@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 agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox