On Sun, Apr 13, 2014 at 5:59 PM, Christian Ullrich <ch...@chrullrich.net> wrote: > There are some possible solutions: > > - pg_ctl could set an environment variable (unless it has to be compatible > with postmasters from different versions, and it does not, does it?).
Do you mean to say use some existing environment variable? Introducing an environment variable to solve this issue or infact using some existing environ variable doesn't seem to be the best way to pass such information. > pg_ctl creates a named job object, and the postmaster has all the > information it needs to reconstruct the name, so it can check if it is > running inside that pg_ctl-created job. We are already creating one job object, so may be that itself can be used, but not sure if Job Objects are supported on all platforms on which postgres works. If you have to pass such information, then why don't pass some special flag in command to CreateProcess()? There is always a chance that we ignore the CTRL+C for some app which we don't intend if we solve the problem by passing some info, as some other app could also do so, but I think it should not be a big problem. > I would appreciate some advice on this. > >> One another way could be to use CREATE_NEW_CONSOLE instead of >> CREATE_NEW_PROCESS_GROUP in you previous fix, but I am not sure if it's >> acceptable to users to have a new console window for server. > > It might. That would also isolate stderr logging from whatever else the > user is doing in the window, and it would work correctly in the pg_ctl > (and by extension the direct-postmaster) case. It would not do anything > for events generated by keystrokes in the new console window, though. > > There would also have to be a command line option to pg_ctl to either > enable or disable it, not sure which. The problem can be solved this way, but the only question here is whether it is acceptable for users to have a new console window for server. Can others also please share their opinion if this fix (start server in new console) seems acceptable or shall we try by passing some information from pg_ctl and then ignore CTRL+C && CTRL+BREAK for it? With Regards, Amit Kapila. EnterpriseDB: http://www.enterprisedb.com -- Sent via pgsql-hackers mailing list (email@example.com) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers