pg_basebackup vs WAL fetching

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема pg_basebackup vs WAL fetching
Дата
Msg-id CABUevEy6bHc96npyOVRdR=zHhYU-4sFtCdayAu74XBY2BrJN1Q@mail.gmail.com
обсуждение исходный текст
Ответы Re: pg_basebackup vs WAL fetching  (Craig Ringer <craig@2ndquadrant.com>)
Список pgsql-hackers
Right now, pg_basebackup can only use replication slots with WAL streaming. It's intended, I believe, to be used when you use pg_basebackup to set up a new replica, to close the gap before starting a replica (ref http://www.postgresql.org/message-id/flat/555DD2B2.7020000@gmx.net).

A bit down that thread there is a discussion about pg_basebackup being able to use this for standalone backups, specifically -X mode, to make sure things are not rotated away.

AFAICT this was never done, with the thread ending on a subject of "this is for a different thread". I couldn't find such a different thread.

I think it would still be a very useful feature. In fact, I think it would be useful enough that it should be enabled by default (but of course possible to turn off), in the interest of making the default more difficult to break.

On the backend side, I think that would just mean adding a parameter to CREATE_REPLICATION_SLOT to create the slot ephemeral. And register an exit handler that will remove it when the backup session disconnects as well (ephemeral slots go away on crash, but AIUI not on regular shutdown).

With this, it should be useful for both -X fetch and -X stream, as long as pg_basebackup doesn't connect from the master until it has seen all it's WAL.

Did I miss a thread somewhere saying this is not a good idea?

--  

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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Patch: fix lock contention for HASHHDR.mutex
Следующее
От: Tom Lane
Дата:
Сообщение: Re: GinPageIs* don't actually return a boolean