archive_command during database shutdown

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: archive_command during database shutdown
Date: 2016-05-25 17:24:15
Message-ID: CAMkU=1x+ShvBGXGfSJBe6Jg9FViF7++JbwnDDOp9NSyT_4J4_w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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.

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?

Cheers,

Jeff

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Igor Neyman 2016-05-25 17:26:26 pglogical
Previous Message Arnaud Inovia Team 2016-05-25 15:07:58 Re: Timestamp with timezone output