[proposal] recovery_target "latest"

From: Grigory Smolkin <g(dot)smolkin(at)postgrespro(dot)ru>
To: Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: [proposal] recovery_target "latest"
Date: 2019-11-04 13:03:38
Message-ID: a3f650f1-fb0f-c913-a000-a4671f12a013@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hello, hackers!

I`d like to propose a new argument for recovery_target parameter, which
will stand to recovering until all available WAL segments are applied.

Current PostgreSQL recovery default behavior(when no recovery target is
provided) does exactly that, but there are several shortcomings:
  - without explicit recovery target standing for default behavior,
recovery_target_action is not coming to action at the end of recovery
  - with PG12 changes, the life of all backup tools became very hard,
because now recovery parameters can be set outside of single config
file(recovery.conf), so it is impossible to ensure, that default
recovery behavior, desired in some cases, will not be silently
overwritten by some recovery parameter forgotten by user.

Proposed path is very simple and solves the aforementioned problems by
introducing new argument "latest" for recovery_target parameter.

Old recovery behavior is still available if no recovery target is
provided. I`m not sure, whether it should it be left as it is now, or not.

Another open question is what to do with recovery_target_inclusive if
recovery_target = "latest" is used.

Grigory Smolkin
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

Attachment Content-Type Size
0001-recovery_target_latest.patch text/x-patch 5.1 KB


Browse pgsql-hackers by date

  From Date Subject
Next Message Asif Rehman 2019-11-04 13:08:55 Re: WIP/PoC for parallel backup
Previous Message Amit Kapila 2019-11-04 11:51:57 Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions