Re: archive_command during database shutdown

From: Sameer Kumar <sameer(dot)kumar(at)ashnik(dot)com>
To: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: archive_command during database shutdown
Date: 2016-05-25 17:31:55
Message-ID: CADp-Sm5fmCjAJK9Jv19Gs9G+MVg4Lz276Q4DB6gK0MUKeJjQoQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 26 May 2016, 1:25 a.m. Jeff Janes, <jeff(dot)janes(at)gmail(dot)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?

> 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?

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

> Cheers,
>
> Jeff
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>
--
--
Best Regards
Sameer Kumar | DB Solution Architect
*ASHNIK PTE. LTD.*

101 Cecil Street, #11-11 Tong Eng Building, Singapore 069 533

T: +65 6438 3504 | M: +65 8110 0350 | www.ashnik.com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2016-05-25 17:36:38 Re: pglogical
Previous Message Igor Neyman 2016-05-25 17:26:26 pglogical