Re: archive_command during database shutdown

Поиск
Список
Период
Сортировка
От Jeff Janes
Тема Re: archive_command during database shutdown
Дата
Msg-id CAMkU=1yDe_rciwxmpP31rzbDn1_nSGMnifaEoG23Aj-uxHn=rA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: archive_command during database shutdown  (Sameer Kumar <sameer.kumar@ashnik.com>)
Ответы Re: archive_command during database shutdown  (Raymond O'Donnell <rod@iol.ie>)
Список pgsql-general
On Wed, May 25, 2016 at 10:31 AM, Sameer Kumar <sameer.kumar@ashnik.com> wrote:
>
>
> On Thu, 26 May 2016, 1:25 a.m. Jeff Janes, <jeff.janes@gmail.com> wrote:
>>
>> I've recently wanted to run a different archive_command during
>> database shutdown than during normal operations.  In particular, if
>> the normal archive process fails during normal operations, I want it
>> to be retried later (as it currently does).  But if it fails during
>> shutdown, I want it to run a fallback archive_command.
>
>
> What version of PostgreSQL are you using?

9.2, 9.4, 9.5, 9.6beta.

>
>>
>> The only way I can see to accomplish this is to have the
>> archive_command try to connect back to the database and see if it gets
>> an error.  That seems pretty ugly.  Is there a better way?
>
>
> What's your goal here?

I want my database to shut down cleanly when I tell it to.

>
> During a shutdown, if you don't so much care about checkpoint and fsync of
> buffers to disk, you can do an immediate shutdown.

But I do care about the checkpoint.  Otherwise you lose all your
unlogged tables.  And probably other unfortunate things happen, as
well.

Cheers,

Jeff


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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: pglogical
Следующее
От: Raymond O'Donnell
Дата:
Сообщение: Re: archive_command during database shutdown