Re: Odd corruption issue reported on dba.stackexchange.com, need advice

Поиск
Список
Период
Сортировка
От Marcin Mańk
Тема Re: Odd corruption issue reported on dba.stackexchange.com, need advice
Дата
Msg-id CAK61fk4UR1JtPsS+6SgL6kn+u3VNNqVVumYfqYKx4_kAUZJdDw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Odd corruption issue reported on dba.stackexchange.com, need advice  (Craig Ringer <ringerc@ringerc.id.au>)
Ответы Re: Odd corruption issue reported on dba.stackexchange.com, need advice  (Craig Ringer <ringerc@ringerc.id.au>)
Re: Odd corruption issue reported on dba.stackexchange.com, need advice  (Marcin Mańk <marcin.mank@gmail.com>)
Список pgsql-general
On Tue, Jul 24, 2012 at 3:16 AM, Craig Ringer <ringerc@ringerc.id.au> wrote:
It shouldn't matter - only PostgreSQL was restarted, not the whole machine - and cleanly at that. Very strange.

 look at pg_ctlcluster, (which does the restart):

        if (!fork()) {
            close STDOUT;
            exec $pg_ctl, '-D', $info{'pgdata'}, '-s', '-w', '-m', 'fast', @pg_ctl_opts_from_cli, 'stop';
        } else {
            wait;
            $result = $? >> 8;
        }

        # try harder if "fast" mode does not work
        if (-f $info{'pgdata'}.'/postmaster.pid') {
            print "(does not shutdown gracefully, now stopping immediately)\n";
            $result = system $pg_ctl, '-D', $info{'pgdata'}, '-s', '-w', '-m', 'immediate', @pg_ctl_opts_from_cli, 'stop';
        }

        # if that still not helps, use the big hammer
        if (-f $info{'pgdata'}.'/postmaster.pid') {
            print "(does not shutdown, killing the process)";
            $pid = get_running_pid $info{'pgdata'}.'/postmaster.pid';
            kill (9, $pid) if $pid;
            unlink $info{'pgdata'}.'/postmaster.pid';
            $result = 0;
        }

Could the "big hammer mode" be what's killed the database?

Greetings
Marcin

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

Предыдущее
От: Jasen Betts
Дата:
Сообщение: Re: Can't figure out how to use now() in default for tsrange column (PG 9.2)
Следующее
От: Maximilian Tyrtania
Дата:
Сообщение: can't compile twitter_fdw