Re: pgsql: pgstat: Bring up pgstat in BaseInit() to fix uninitialized use o

Поиск
Список
Период
Сортировка
От Dilip Kumar
Тема Re: pgsql: pgstat: Bring up pgstat in BaseInit() to fix uninitialized use o
Дата
Msg-id CAFiTN-v7kyWA3EZ_btNqLrwFoD0xwuX8eZ3CNaupN-JJircLaQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pgsql: pgstat: Bring up pgstat in BaseInit() to fix uninitialized use o  (Andres Freund <andres@anarazel.de>)
Ответы Re: pgsql: pgstat: Bring up pgstat in BaseInit() to fix uninitialized use o
Список pgsql-hackers
On Fri, Aug 13, 2021 at 9:29 PM Andres Freund <andres@anarazel.de> wrote:

> > I think we can extend this API but I guess it is better to then do it
> > for dsm-based as well so that these get tracked via resowner.
>
> DSM segments are resowner managed already, so it's not obvious that that'd buy
> us much? Although I guess there could be a few edge cases that'd look cleaner,
> because we could reliably trigger cleanup in the leader instead of relying on
> dsm detach hooks + refcounts to manage when a set is physically deleted?
>

In an off-list discussion with Thomas and Amit, we tried to discuss
how to clean up the shared files set in the current use case.  Thomas
suggested that instead of using individual shared fileset for storing
the data for each XID why don't we just create a single shared fileset
for complete worker lifetime and when the worker is exiting we can
just remove that shared fileset.  And for storing XID data, we can
just create the files under the same shared fileset and delete those
files when we longer need them.  I like this idea and it looks much
cleaner, after this, we can get rid of the special cleanup mechanism
using 'filesetlist'.  I have attached a patch for the same.

--
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com

Вложения

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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Some RELKIND macro refactoring
Следующее
От: Dmitry Dolgov
Дата:
Сообщение: Re: POC: Cleaning up orphaned files using undo logs