Re: [DOC] Document concurrent index builds waiting on each other - Mailing list pgsql-hackers

From James Coleman
Subject Re: [DOC] Document concurrent index builds waiting on each other
Date
Msg-id CAAaqYe8PfTmnK=BvQqn=3XaWe86nVQ66QRD=wPom7=bJxzaqRw@mail.gmail.com
Whole thread Raw
In response to Re: [DOC] Document concurrent index builds waiting on each other  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: [DOC] Document concurrent index builds waiting on each other
List pgsql-hackers
On Mon, Nov 30, 2020 at 4:53 PM Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:
>
> On 2020-Sep-30, Michael Paquier wrote:
>
> > +  <para>
> > +   <command>CREATE INDEX</command> (including the <literal>CONCURRENTLY</literal>
> > +   option) commands are included when <command>VACUUM</command> calculates what
> > +   dead tuples are safe to remove even on tables other than the one being indexed.
> > +  </para>
> > FWIW, this is true as well for REINDEX CONCURRENTLY because both use
> > the same code paths for index builds and validation, with basically
> > the same waiting phases.  But is CREATE INDEX the correct place for
> > that?  Wouldn't it be better to tell about such things on the VACUUM
> > doc?
>
> Yeah, I think it might be more sensible to document this in
> maintenance.sgml, as part of the paragraph that discusses removing
> tuples "to save space".  But making it inline with the rest of the flow,
> it seems to distract from higher-level considerations, so I suggest to
> make it a footnote instead.

I have mixed feelings about wholesale moving it; users aren't likely
to read the vacuum doc when considering how running CIC might impact
their system, though I do understand why it otherwise fits there. Even
if the primary details are in the vacuum, I tend to think a reference
note (or link to the vacuum docs) in the create index docs would be
useful. The principle here is that 1.) vacuum is automatic/part of the
background of the system, not just something people trigger manually,
and 2.) we ought to document things where the user action triggering
the behavior is documented.

> I'm not sure on the wording to use; what about this?

The wording seems fine to me.

This is a replacement for what was 0002 earlier? And 0001 from earlier
still seems to be a useful standalone patch?

James



pgsql-hackers by date:

Previous
From: Justin Pryzby
Date:
Subject: Re: error_severity of brin work item
Next
From: Ashwin Agrawal
Date:
Subject: Re: vac_update_datfrozenxid will raise "wrong tuple length" if pg_database tuple contains toast attribute.