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

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
Cc: Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-committers <pgsql-committers(at)lists(dot)postgresql(dot)org>
Subject: Re: pgsql: pgstat: Bring up pgstat in BaseInit() to fix uninitialized use o
Date: 2021-08-12 08:18:23
Message-ID: CAA4eK1+wpLL2Q7Nqd1A1ykLmB+04QX4m4gqVm6X9w0sQYX9PcQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Thu, Aug 12, 2021 at 1:13 PM Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
>
> On Thu, Aug 12, 2021 at 3:16 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> >
> >
> > I have also tested and fix works for me. The fix works because
> > pgstat_initialize() is called before we register clean up in
> > SharedFileSetInit(). I am not sure if we need an Assert to ensure that
> > and if so how we can do that? Any suggestions?
>
> I think that the assertion added by ee3f8d3d3ae ensures that
> pgstat_initialize() is callbed before the callback for fileset cleanup
> is registered, no?
>

I think I am missing something here, can you please explain?

--
With Regards,
Amit Kapila.

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2021-08-12 08:22:37 Re: pgsql: pgstat: Bring up pgstat in BaseInit() to fix uninitialized use o
Previous Message Dilip Kumar 2021-08-12 08:12:24 Re: pgsql: pgstat: Bring up pgstat in BaseInit() to fix uninitialized use o

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2021-08-12 08:22:37 Re: pgsql: pgstat: Bring up pgstat in BaseInit() to fix uninitialized use o
Previous Message Dilip Kumar 2021-08-12 08:12:24 Re: pgsql: pgstat: Bring up pgstat in BaseInit() to fix uninitialized use o