| From: | Andres Freund <andres(at)anarazel(dot)de> |
|---|---|
| To: | spam_from_pgsql_lists(at)chezphil(dot)org, pgsql-bugs(at)lists(dot)postgresql(dot)org |
| Subject: | Re: BUG #15323: wal_keep_segments must be >= 1 for WAL archiving + streaming to work |
| Date: | 2018-08-13 14:45:34 |
| Message-ID: | 20180813144534.piruesukkjw6zl4b@alap3.anarazel.de |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
Hi,
On 2018-08-13 14:37:00 +0000, PG Bug reporting form wrote:
> The following bug has been logged on the website:
>
> Bug reference: 15323
> Logged by: Phil Endecott
> Email address: spam_from_pgsql_lists(at)chezphil(dot)org
> PostgreSQL version: 9.6.10
> Operating system: Debian Stretch
> Description:
>
> I have set up a replication system that uses a combination of WAL segment
> archiving and streaming.
> If the slave goes down for a period, when it restarts it will initially
> fetch WAL segment files from the archive using restore_command. After
> fetching the last of these it will start streaming directly from the
> master.
> It seems that the WAL segment files may have a small empty space at the end
> due presumably to the size of the records. In my case, the last archived
> WAL segment ended at offset 0xFFF088. The slave therefore tried to start
> streaming at that position. But the master had already archived that
> segment and recycled it, because I had not set wal_keep_segments and it
> defaults to 0. Streaming therefore failed to start.
But it'll retry after failing back to archiving, no?
> It seems to me that wal_keep_segments must always be >= 1 for the
> combination of WAL archiving and streaming to work.
You can also use replication slots, which is usually the better alternative:
https://www.postgresql.org/docs/current/static/warm-standby.html#STREAMING-REPLICATION-SLOTS
Greetings,
Andres Freund
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Phil Endecott | 2018-08-13 14:59:32 | Re: BUG #15323: wal_keep_segments must be >= 1 for WAL archiving + streaming to work |
| Previous Message | PG Bug reporting form | 2018-08-13 14:37:00 | BUG #15323: wal_keep_segments must be >= 1 for WAL archiving + streaming to work |