Re: WIP: parallel GiST index builds

From: "Andrey M(dot) Borodin" <x4mmm(at)yandex-team(dot)ru>
To: Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>
Cc: Andreas Karlsson <andreas(at)proxel(dot)se>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: WIP: parallel GiST index builds
Date: 2024-07-30 11:31:03
Message-ID: CE65B581-2141-4478-95F6-CDE94B71352D@yandex-team.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> 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;”.

Best regards, Andrey Borodin.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2024-07-30 11:59:26 Re: jsonpath: Inconsistency of timestamp_tz() Output
Previous Message shveta malik 2024-07-30 11:26:21 Re: Conflict Detection and Resolution