Re: Resetting PGPROC atomics in ProcessInit()

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: Resetting PGPROC atomics in ProcessInit()
Дата
Msg-id CAA4eK1L36RJ4m3q4wL6VHjdSxOnK8BjHnQu30NvNghCJVkLd0A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Resetting PGPROC atomics in ProcessInit()  (Amit Kapila <amit.kapila16@gmail.com>)
Ответы Re: Resetting PGPROC atomics in ProcessInit()  (Amit Kapila <amit.kapila16@gmail.com>)
Список pgsql-hackers
On Thu, Nov 8, 2018 at 4:38 PM Amit Kapila <amit.kapila16@gmail.com> wrote:
> On Sun, Nov 4, 2018 at 6:30 AM Robert Haas <robertmhaas@gmail.com> wrote:
> > On Sat, Oct 27, 2018 at 6:41 AM Andres Freund <andres@anarazel.de> wrote:
> > > I just noticed, while working on a patch adding things to PGPROC, that
> > > the group clearning patches for the proc array and clog reset atomics in
> > > InitProcess().
> > >
> > > I'm not a big fan of that, because it means that it's not safe to look
> > > at the atomics of backends that aren't currently in use.  Is there any
> > > reason to not instead initialize them in InitProcGlobal() and just
> > > assert in InitProcess() that they're 0?  If they're not, we'd be in deep
> > > trouble anyway, no?
> >
> > I think you are correct.  I think it would be better in general for
> > InitProcess() to Assert() rather than reinitializing.
> >
>
> Okay, changed the code as per Andres's and your suggestion.  Do you
> think the attached change makes sense? I think we should backpatch
> this.
>

For 10 and 9.6, we need a slightly different patch as the change of
group clog update went in 11.  Attached are the patches for the same,
note that there is a slight change in the commit message for the patch
written for 10 and 9.6.  I will wait for a few days (till Tuesday@8:00
AM IST) to see if somebody has any comments or want to review before I
push.

-- 
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

Вложения

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

Предыдущее
От: Amit Langote
Дата:
Сообщение: Re: BUG #15212: Default values in partition tables don't work asexpected and allow NOT NULL violation
Следующее
От: Amit Langote
Дата:
Сообщение: Re: BUG #15212: Default values in partition tables don't work asexpected and allow NOT NULL violation