Hello, thank you for the discussion. At Tue, 1 Apr 2014 11:41:20 -0400, Robert Haas wrote >> I don't find that very radical at all. The backup_label file is >> *supposed* to be removed on the master if it crashes during the >> backup; and it should never be removed from the backup itself. At >> least that's how I understand it. Unfortunately, people too often
The code indeed seems to assume that, and I couldn't think of any measure to avoid that dead-end once recovery sequence reads backup label accidentially left behind. I thought up to remove backup label during immediate shutdown on prvious versions, like 9.4 does. CancelBackup does only stat-unlink-rename sequence so I think this doesn't obstruct immediate shutdown sequence. And this doesn't change any seeming behavior or interfaces just except for this case. What do you think about this? Isn't this also applicable for older versions? postmaster.c@9.3.3:2339 pmdie(SIGNAL_ARGS) { ... switch (postgres_signal_arg) { ... case SIGQUIT: ... SignalUnconnectedWorkers(SIGQUIT); + + /* + * Terminate exclusive backup mode. This is done in + * PostmasterStateMachine() for other shutdown modes. + */ + if (ReachedNormalRunning) + CancelBackup(); ExitPostmaster(0); break; Aside from this, I'll post the new option for pg_resetxlog for the next CF. regards, -- Kyotaro Horiguchi NTT Open Source Software Center -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers