Re: Order of operations in SubPostmasterMain()

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: Order of operations in SubPostmasterMain()
Дата
Msg-id CAM-w4HPEK01i6HFN5reT=azFJYsfLLUsTZa-783_Q6EKCfAmjg@mail.gmail.com
обсуждение исходный текст
Ответ на Order of operations in SubPostmasterMain()  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Order of operations in SubPostmasterMain()  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Thu, Sep 29, 2016 at 8:46 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> We could probably refactor things enough so that we do pq_init()
> before PGSharedMemoryReAttach().  It would be a little bit ugly,
> and it would fractionally increase the chance of a reattach failure
> because pq_init() palloc's a few KB worth of buffers.  I'm not quite
> sure if it's worth it; thoughts?  In any case the mentioned comments
> are obsolete and need to be moved/rewritten.


Just speaking off the cuff without reviewing the code in detail...

Alternately we could call pq_init in the error path if it hasn't been
called yet. I'm sure there are problems with doing that in general but
for the specific errors that can happen before pq_init it might be
feasible since they obviously can't have very much shared state yet to
have corrupted.

-- 
greg



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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: pageinspect: Hash index support
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: pg_basebackup, pg_receivexlog and data durability