Re: Why does [auto-]vacuum delay not report a wait event?

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: Why does [auto-]vacuum delay not report a wait event?
Дата
Msg-id CAH2-Wzkk9bcx2gV3UjCgDszDBiNZ-9YFN01GG28KtYAFaX8k-g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Why does [auto-]vacuum delay not report a wait event?  (Andres Freund <andres@anarazel.de>)
Ответы Re: Why does [auto-]vacuum delay not report a wait event?  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On Sat, Mar 21, 2020 at 5:25 PM Andres Freund <andres@anarazel.de> wrote:
> > diff --git a/src/backend/access/gin/ginfast.c b/src/backend/access/gin/ginfast.c
> > index 11d7ec067a..c99dc4a8be 100644
> > --- a/src/backend/access/gin/ginfast.c
> > +++ b/src/backend/access/gin/ginfast.c
> > @@ -892,7 +892,7 @@ ginInsertCleanup(GinState *ginstate, bool full_clean,
> >                */
> >               processPendingPage(&accum, &datums, page, FirstOffsetNumber);
> >
> > -             vacuum_delay_point();
> > +             stats->delay_msec += vacuum_delay_point();
> >
> >               /*
> >                * Is it time to flush memory to disk?  Flush if we are at the end of
> > @@ -929,7 +929,7 @@ ginInsertCleanup(GinState *ginstate, bool full_clean,
> >                       {
> >                               ginEntryInsert(ginstate, attnum, key, category,
> >                                                          list, nlist, NULL);
> > -                             vacuum_delay_point();
> > +                             stats->delay_msec += vacuum_delay_point();
> >                       }
> >
> >                       /*
> > @@ -1002,7 +1002,7 @@ ginInsertCleanup(GinState *ginstate, bool full_clean,
> >               /*
> >                * Read next page in pending list
> >                */
> > -             vacuum_delay_point();
> > +             stats->delay_msec += vacuum_delay_point();
> >               buffer = ReadBuffer(index, blkno);
> >               LockBuffer(buffer, GIN_SHARE);
> >               page = BufferGetPage(buffer);
>
> On a green field I'd really like to pass a 'vacuum state' struct to
> vacuum_delay_point().

In a green field situation, there'd be no ginInsertCleanup() at all.
It is a Lovecraftian horror show. The entire thing should be scrapped
now, in fact.

--
Peter Geoghegan



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Re: Additional size of hash table is alway zero for hash aggregates
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Why does [auto-]vacuum delay not report a wait event?