From: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
---|---|
To: | Dilip Kumar <dilipbalaut(at)gmail(dot)com> |
Cc: | Andres Freund <andres(at)anarazel(dot)de>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Subject: | Re: pgsql: pgstat: Bring up pgstat in BaseInit() to fix uninitialized use o |
Date: | 2021-08-17 08:56:37 |
Message-ID: | CAA4eK1LjyC6nk3p4PSnLSjiFs5Jhxy6VUtRu2vSSsMWXb=5pGA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
On Tue, Aug 17, 2021 at 1:30 PM Dilip Kumar <dilipbalaut(at)gmail(dot)com> wrote:
>
> On Tue, Aug 17, 2021 at 10:54 AM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> >
>
> > 5. How can we provide a strict mechanism to not allow to use dsm APIs
> > for non-dsm FileSet? One idea could be that we can have a variable
> > (probably bool) in SharedFileSet structure which will be initialized
> > in SharedFileSetInit based on whether the caller has provided dsm
> > segment. Then in other DSM-based APIs, we can check if it is used for
> > the wrong type.
>
> Yeah, we can do something like that, can't we just use an existing
> variable instead of adding new, e.g. refcnt is required only when
> multiple processes are attached, so maybe if dsm segment is not passed
> then we can keep refcnt as 0 and based on we can give an error. For
> example, if we try to call SharedFileSetAttach for the SharedFileSet
> which has refcnt as 0 then we error out?
>
But as of now, we treat refcnt as 0 for SharedFileSet that is already
destroyed. See SharedFileSetAttach.
--
With Regards,
Amit Kapila.
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2021-08-17 11:04:27 | Re: pgsql: pgstat: Bring up pgstat in BaseInit() to fix uninitialized use o |
Previous Message | Heikki Linnakangas | 2021-08-17 08:27:30 | pgsql: doc: \123 and \x12 escapes in COPY are in database encoding. |
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2021-08-17 09:07:19 | Re: [PATCH] Allow multiple recursive self-references |
Previous Message | Laurenz Albe | 2021-08-17 08:44:51 | Re: pgstat_send_connstats() introduces unnecessary timestamp and UDP overhead |