Re: WIP: parallel GiST index builds

From: Andreas Karlsson <andreas(at)proxel(dot)se>
To: "Andrey M(dot) Borodin" <x4mmm(at)yandex-team(dot)ru>, Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: WIP: parallel GiST index builds
Date: 2024-08-03 09:25:34
Message-ID: 148b4b9f-4aaa-4f0d-b171-5bdbaae76475@proxel.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 7/30/24 1:31 PM, Andrey M. Borodin wrote:>> On 30 Jul 2024, at 14:57,
Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com> wrote:
>>
>>>
>>> How do we synchronize Shared Fake LSN with global XLogCtl->unloggedLSN? Just bump XLogCtl->unloggedLSN if necessary?
>>> Perhaps, consider using GetFakeLSNForUnloggedRel() instead of shared counter? As long as we do not care about FakeLSN>RealLSN.
>>>
>>
>> I'm confused. How is this related to unloggedLSN at all?
>
> Parallel build should work for both logged and unlogged indexes.
> If we use fake LSN in shared memory, we have to make sure that FakeLSN < XLogCtl->unloggedLSN after build.
> Either way we can just use XLogCtl->unloggedLSN instead of FakeLSN in shared memory.
>
> In other words I propose to use GetFakeLSNForUnloggedRel() instead of "pg_atomic_uint64 *fakelsn;”.

Yeah,

Great point, given the ugliness of passing around the fakelsn we might
as well just use GetFakeLSNForUnloggedRel().

Andreas

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2024-08-03 11:04:04 Fix inappropriate uses of atol()
Previous Message Umar Hayat 2024-08-03 05:43:47 Re: strange context message in spi.c?