From: Michael Paquier <michael@paquier.xyz>
To: Julien Rouhaud <rjuju123@gmail.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: Thomas Munro <thomas.munro@gmail.com>
Cc: Daniel Verite <daniel@manitou-mail.org>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Kevin Grittner <kgrittn@gmail.com>
Subject: Re: Add parallelism and glibc dependent only options to reindexdb
Date: Fri, 12 Jul 2019 10:20:07 +0900
Message-ID: <20190712012007.GA2149@paquier.xyz> (raw)
In-Reply-To: <CAOBaU_YAtAApSHA-tfVA=sKu7WyU6_0w+vn+S_FE4H=9uxD+wQ@mail.gmail.com>
References: <CAOBaU_abD08HAxwnx3jGPuBV4POUMmvC_GdMn2qM_+PXsq6f+A@mail.gmail.com>
<20190710141531.GA27615@alvherre.pgsql>
<CAOBaU_Y3Pk-R6M6GSCGBeQtPH_V+h5-ueGaFV+rFOU0oHaGkNg@mail.gmail.com>
<20190711040433.GG4500@paquier.xyz>
<CAOBaU_bVFgyt17J4+BFXeAxJfHZQShixruEs_gdJ4A=XRvjxJQ@mail.gmail.com>
<20190711133417.GK4500@paquier.xyz>
<CAOBaU_YAtAApSHA-tfVA=sKu7WyU6_0w+vn+S_FE4H=9uxD+wQ@mail.gmail.com>
On Thu, Jul 11, 2019 at 06:22:25PM +0200, Julien Rouhaud wrote:
> I think t hat it makes the code quite cleaner to have the selection
> outside ConsumeIdleSlot.
Actually, you have an issue with ConsumeIdleSlot() if there is only
one parallel slot, no? In this case the current patch returns
immediately the slot available without waiting. I think that we
should wait until the slot becomes free in that case as well, and
switch isFree to false. If you want to keep things splitted, that's
fine by me, I would still use "Get" within the name for the routine,
and rename the other to get_idle_slot_internal() or
get_idle_slot_guts() to point out that it has an internal role.
> You're talking about getQuerySuccess right? That was actually the
> original comment of a function I renamed. +1 to improve it, but this
> function is in common.c and doesn't deal with parallel slot at all, so
> I'll just drop the slang parts.
If we can design a clean interface with better comments, we can use
this occasion to browse the whole thing and make it better.
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
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: michael@paquier.xyz, rjuju123@gmail.com, alvherre@2ndquadrant.com, peter.eisentraut@2ndquadrant.com, thomas.munro@gmail.com, daniel@manitou-mail.org, tgl@sss.pgh.pa.us, pgsql-hackers@lists.postgresql.org, kgrittn@gmail.com
Subject: Re: Add parallelism and glibc dependent only options to reindexdb
In-Reply-To: <20190712012007.GA2149@paquier.xyz>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox