Resetting PGPROC atomics in ProcessInit()

From: Andres Freund <andres(at)anarazel(dot)de>
To: Robert Haas <robertmhaas(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Resetting PGPROC atomics in ProcessInit()
Date: 2018-10-27 10:41:38
Message-ID: 20181027104138.qmbbelopvy7cw2qv@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

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?

Greetings,

Andres Freund

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2018-10-27 10:57:00 Re: Remove obsolete pg_attrdef.adsrc column
Previous Message Dmitry Molotkov 2018-10-27 10:14:35 Re: BUG #15446: Crash on ALTER TABLE