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 20170602192448.p44a5u2dsrs6pfi4@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: [HACKERS] Error while creating subscription when server isrunning in single user mode  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Ответы Re: [HACKERS] Error while creating subscription when server isrunning in single user mode  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Re: [HACKERS] Error while creating subscription when server isrunning in single user mode  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On 2017-06-02 15:00:21 -0400, Peter Eisentraut wrote:
> On 6/1/17 21:55, Andres Freund wrote:
> > On 2017-06-01 21:42:41 -0400, Peter Eisentraut wrote:
> >> We should look at what the underlying problem is before we prohibit
> >> anything at a high level.
> > 
> > I'm not sure there's any underlying issue here, except being in single
> > user mode.
> 
> My point is that we shouldn't be putting checks into DDL commands about
> single-user mode if the actual cause of the issue is in a lower-level
> system.

But it's not really.


> Not all uses of a particular DDL command necessary use a latch,
> for example.  Also, there could be other things that hit a latch that
> are reachable in single-user mode that we haven't found yet.

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.


> So I think the check should either go somewhere in the latch code, or
> possibly in the libpqwalreceiver code.  Or we make the latch code work
> so that the check-for-postmaster-death code becomes a noop in
> single-user mode.  Suggestions?

I don't think the postmaster death code is really the issue here.  Nor
is libpqwalreceiver really the issue.  We can put ERRORs in a bunch of
unrelated subsystems, sure, but that doesn't really solve the issue that
logical rep pretty essentially requires multiple processes.  We've
prevented parallelism from being used in general (cf. standard_planner),
we've not put checks in all the subsystems it uses.

Greetings,

Andres Freund



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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: [HACKERS] Why does logical replication launcher setapplication_name?
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: [HACKERS] Create subscription with `create_slot=false` andincorrect slot name