| From: | Daniil Davydov <3danissimo(at)gmail(dot)com> |
|---|---|
| To: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> |
| Cc: | Alexander Korotkov <aekorotkov(at)gmail(dot)com>, SATYANARAYANA NARLAPURAM <satyanarlapuram(at)gmail(dot)com>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, Sami Imseih <samimseih(at)gmail(dot)com>, Matheus Alcantara <matheusssilv97(at)gmail(dot)com>, Maxim Orlov <orlovmg(at)gmail(dot)com>, Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: POC: Parallel processing of indexes in autovacuum |
| Date: | 2026-04-03 13:45:39 |
| Message-ID: | CAJDiXgjG9-LR194LF+h6qwVPUkDWTmQuhTPx7JjzB2DQfQ6k6Q@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi,
On Fri, Apr 3, 2026 at 6:00 AM Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
>
> On Thu, Apr 2, 2026 at 8:10 AM Daniil Davydov <3danissimo(at)gmail(dot)com> wrote:
> >
> > I think we should add some cleanup for autovacuum near the ParallelContext
> > cleanup, since they are interconnected. I also want to return our tests that
> > are triggering ERROR/PANIC in the leader worker in order to check whether all
> > resources are released. I hope I will be able to get to that by tomorrow
> > evening.
>
> I think that the beginning of vacuum loop (in PG_TRY() block in
> vacuum()) seems better place as we're resetting vacuum delay
> parameters:
>
> in_vacuum = true;
> VacuumFailsafeActive = false;
> VacuumUpdateCosts();
> VacuumCostBalance = 0;
> VacuumCostBalanceLocal = 0;
> VacuumSharedCostBalance = NULL;
> VacuumActiveNWorkers = NULL;
>
I am still thinking that this pointer is related to the ParallelContext, and it
is a bit confusing that we can manipulate it outside all "parallel" logic.
Since this variable points to the DSM it looks very natural for me if its
lifetime will be similar to the DSM. Please, see attached patch, that resets
this pointer during dsm detaching.
--
Best regards,
Daniil Davydov
| Attachment | Content-Type | Size |
|---|---|---|
| 0001-Reset-pointer-into-the-going-away-DSM.patch | text/x-patch | 1.7 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | KAZAR Ayoub | 2026-04-03 13:53:47 | Re: Add pg_stat_vfdcache view for VFD cache statistics |
| Previous Message | Andrew Dunstan | 2026-04-03 13:36:31 | Re: PATCH: jsonpath string methods: lower, upper, initcap, l/r/btrim, replace, split_part |