Re: How to start slave after pg_basebackup. Why min_wal_size andwal_keep_segments are duplicated
От | Adrian Klaver |
---|---|
Тема | Re: How to start slave after pg_basebackup. Why min_wal_size andwal_keep_segments are duplicated |
Дата | |
Msg-id | 9a3e15d5-774e-a0fd-6dd5-f2405c7ec304@aklaver.com обсуждение исходный текст |
Ответ на | Re: How to start slave after pg_basebackup. Why min_wal_size and wal_keep_segments are duplicated ("Andrus" <kobruleht2@hot.ee>) |
Ответы |
Re: How to start slave after pg_basebackup. Why min_wal_size and wal_keep_segments are duplicated
|
Список | pgsql-general |
On 5/31/20 2:03 PM, Andrus wrote: > Hi! > >> I'm guessing are looking for: >> https://www.postgresql.org/docs/12/runtime-config-replication.html >> 26.2.6. Replication Slots >> Replication slots provide an automated way to ensure that the master >> does not remove WAL segments until they have been received by all >> standbys, and that the master does not remove rows which could cause a >> recovery conflict even when the standby is disconnected. > > Using replication slot can cause pg_wal directoy to occupy all free disk > space and after that server stop respondig. > >> This is spelled out here: >> https://www.postgresql.org/docs/12/warm-standby.html#STREAMING-REPLICATION >> >> "If you use streaming replication without file-based continuous >> archiving, the server might recycle old WAL segments before the >> standby has received them. If this occurs, the standby will need to be >> reinitialized from a new base backup. You can avoid this by setting >> wal_keep_segments to a value large enough to ensure that WAL segments >> are not recycled too early, or by configuring a replication slot for >> the standby. > > Will wal_keep_segments keep segments also if named replication slot is > lot used ? Well if you are using a replication slot there is no point in using wal_keep_segments. Slots where created in, part at least, so you did not have to guess at a wal_keep_segments number. To really answer this we will need to see the exact commands you are using and the sequence they are done in. > > Andrus. -- Adrian Klaver adrian.klaver@aklaver.com
В списке pgsql-general по дате отправления: