Re: pg_stop_backup(wait_for_archive := true) on standby server

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_stop_backup(wait_for_archive := true) on standby server
Date: 2017-06-22 13:36:19
Message-ID: CABUevEzJZpykR46WYAtzj_mPF14U7W=y6vtS1vvgVm8Z55vO9Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jun 22, 2017 at 10:12 AM, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
wrote:

> Hi,
>
> Since an optional second argument wait_for_archive of pg_stop_backup
> has been introduced in PostgreSQL 10 we can choose whether wait for
> archiving. But my colleagues found that we can do pg_stop_backup with
> wait_for_archive = true on the standby server but it actually doesn't
> wait for WAL archiving. Because this behavior is not documented and we
> cannot find out it without reading source code it will confuse the
> user.
>
> I think we can raise an error when pg_stop_backup with
> wait_for_archive = true is executed on the standby. Attached patch
> change it so that.
>

Wouldn't it be better to make it *work*? If you have archive_mode=always,
it makes sense to want to wait on the standby as well, does it not?

--
Magnus Hagander
Me: https://www.hagander.net/ <http://www.hagander.net/>
Work: https://www.redpill-linpro.com/ <http://www.redpill-linpro.com/>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2017-06-22 13:38:01 Re: Fix a typo in partition.c
Previous Message Peter Eisentraut 2017-06-22 13:13:56 Re: TRUE and true