From: | Peter Geoghegan <pg(at)bowt(dot)ie> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de> |
Cc: | Justin Pryzby <pryzby(at)telsasoft(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Why does [auto-]vacuum delay not report a wait event? |
Date: | 2020-03-22 00:51:19 |
Message-ID: | CAH2-Wzkk9bcx2gV3UjCgDszDBiNZ-9YFN01GG28KtYAFaX8k-g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sat, Mar 21, 2020 at 5:25 PM Andres Freund <andres(at)anarazel(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2020-03-22 00:53:45 | Re: Why does [auto-]vacuum delay not report a wait event? |
Previous Message | Jeff Davis | 2020-03-22 00:45:31 | Re: Additional size of hash table is alway zero for hash aggregates |