Re: post-freeze damage control

Поиск
Список
Период
Сортировка
От Stefan Fercot
Тема Re: post-freeze damage control
Дата
Msg-id lwXoqQdOT9Nw1tJIx_h7WuqMKrB1YMePQY99RFTZ87H7V52mgUJaSlw2WRbcOgKNUurF1yJqX3nqtZi4hJhtd3e_XlmLsLvnEtGXY-fZPoA=@protonmail.com
обсуждение исходный текст
Ответ на Re: post-freeze damage control  (Tomas Vondra <tomas.vondra@enterprisedb.com>)
Список pgsql-hackers
Hi,

On Saturday, April 13th, 2024 at 12:18 PM, Tomas Vondra wrote:
> On 4/13/24 01:03, David Steele wrote:
> > On 4/12/24 22:12, Tomas Vondra wrote:
> > > On 4/11/24 23:48, David Steele wrote:
> > > > On 4/11/24 20:26, Tomas Vondra wrote:
> > > >
> > > > > FWIW that discussion also mentions stuff that I think the feature
> > > > > should
> > > > > not do. In particular, I don't think the ambition was (or should be) to
> > > > > make pg_basebackup into a stand-alone tool. I always saw pg_basebackup
> > > > > more as an interface to "backup steps" correctly rather than a complete
> > > > > backup solution that'd manage backup registry, retention, etc.
> > > >
> > > > Right -- this is exactly my issue. pg_basebackup was never easy to use
> > > > as a backup solution and this feature makes it significantly more
> > > > complicated. Complicated enough that it would be extremely difficult for
> > > > most users to utilize in a meaningful way.

pg_basebackup has its own use-cases IMHO. It is very handy to simply take a copy of the running cluster, thanks to its
abilityto carry on the needed WAL segs without the user even needing to think about archive_command/pg_receivewal. And
forthis kind of tasks, the new incremental thing will not really be interesting and won't make things more complicated. 

I totally agree that we don't have any complete backup solution in core though. And adding more tools to the picture
(pg_basebackup,pg_combinebackup, pg_receivewal, pg_verifybackup,...) will increase the need of on-top orchestration.
Butthat's not new. And for people already having such orchestration, having the incremental feature will help. 

> > > Perhaps, I agree we could/should try to do better job to do backups, no
> > > argument there. But I still don't quite see why introducing such
> > > infrastructure to "manage backups" should be up to the patch adding
> > > incremental backups. I see it as something to build on top of
> > > pg_basebackup/pg_combinebackup, not into those tools.
> >
> > I'm not saying that managing backups needs to be part of pg_basebackup,
> > but I am saying without that it is not a complete backup solution.
> > Therefore introducing advanced features that the user then has to figure
> > out how to manage puts a large burden on them. Implementing
> > pg_combinebackup inefficiently out of the gate just makes their life
> > harder.
>
> I agree with this in general, but I fail to see how it'd be the fault of
> this patch. It merely extends what pg_basebackup did before, so if it's
> not a complete solution now, it wasn't a complete solution before.

+1. We can see it as a step to having a better backup solution in core for the future, but we definitely shouldn't rule
outthe fact that lots of people already developed such orchestration (home-made or relying to pgbarman, pgbackrest,
wal-g,...).IMHO, if we're trying to extend the in core features, we should also aim at giving more lights and features
forthose tools (like adding more fields to the backup functions,...). 

> > > Sure, I'm not against making it clearer pg_combinebackup is not a
> > > complete backup solution, and documenting the existing restrictions.
> >
> > Let's do that then. I think it would make sense to add caveats to the
> > pg_combinebackup docs including space requirements, being explicit about
> > the format required (e.g. plain), and also possible mitigation with COW
> > filesystems.
>
> OK. I'll add this as an open item, for me and Robert.

Thanks for this! It's probably not up to core docs to state all the steps that would be needed to develop a complete
backupsolution but documenting the links between the tools and mostly all the caveats (the "don't use INCREMENTAL.*
filenames",...)will help users not be caught off guard. And as I mentioned in [1], IMO the earlier we can catch a
potentialissue (wrong filename, missing file,...), the better for the user. 

Thank you all for working on this.
Kind Regards,
--
Stefan FERCOT
Data Egret (https://dataegret.com)

[1]
https://www.postgresql.org/message-id/vJnnuiaye5rNnCPN8h3xN1Y3lyUDESIgEQnR-Urat9_ld_fozShSJbEk8JDM_3K6BVt5HXT-CatWpSfEZkYVeymlrxKO2_kfKmVZNWyCuJc%3D%40protonmail.com



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

Предыдущее
От: shveta malik
Дата:
Сообщение: Re: promotion related handling in pg_sync_replication_slots()
Следующее
От: Stefan Fercot
Дата:
Сообщение: Re: Add recovery to pg_control and remove backup_label