Re: [HACKERS] Error while creating subscription when server isrunning in single user mode

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: [HACKERS] Error while creating subscription when server isrunning in single user mode
Дата
Msg-id 20170606195321.sjmenrfgl2nu6j63@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: [HACKERS] Error while creating subscription when server isrunning in single user mode  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: [HACKERS] Error while creating subscription when server isrunning in single user mode  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On 2017-06-06 15:48:42 -0400, Robert Haas wrote:
> On Fri, Jun 2, 2017 at 3:24 PM, Andres Freund <andres@anarazel.de> wrote:
> > Latches work in single user mode, it's just that the new code for some
> > reason uses uninitialized memory as the latch.  As I pointed out above,
> > the new code really should just use MyLatch instead of
> > MyProc->procLatch.

FWIW, I'd misremembered some code here, and we actually reach the
function initializing the shared latch, even in single user mode.


> We seem to have accumulated quite a few instance of that.
> 
> [rhaas pgsql]$ git grep MyLatch | wc -l
>      116
> [rhaas pgsql]$ git grep 'MyProc->procLatch' | wc -l
>       33
> 
> Most of the offenders are in src/backend/replication, but there are
> some that are related to parallelism as well (bgworker.c, pqmq.c,
> parallel.c, condition_variable.c).  Maybe we (you?) should just go and
> change them all.  I don't think using MyLatch instead of
> MyProc->procLatch has become automatic for everyone yet.

Nevertheless this should be changed.  Will do.


- Andres



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: [HACKERS] Error while creating subscription when server isrunning in single user mode
Следующее
От: Robert Haas
Дата:
Сообщение: Re: [HACKERS] Why does logical replication launcher set application_name?