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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers