pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #16215: Restore failes if number of workers in postgresql.conf is lower than on source system
5+ messages / 3 participants
[nested] [flat]
* BUG #16215: Restore failes if number of workers in postgresql.conf is lower than on source system
@ 2020-01-17 07:22 PG Bug reporting form <noreply@postgresql.org>
2020-01-17 07:58 ` Re: BUG #16215: Restore failes if number of workers in postgresql.conf is lower than on source system Sergei Kornilov <sk@zsrv.org>
0 siblings, 1 reply; 5+ messages in thread
From: PG Bug reporting form @ 2020-01-17 07:22 UTC (permalink / raw)
To: pgsql-bugs@lists.postgresql.org; +Cc: stefan.sonnenberg.carstens@gmail.com
The following bug has been logged on the website:
Bug reference: 16215
Logged by: Stefan Sonnenberg-Carstens
Email address: stefan.sonnenberg.carstens@gmail.com
PostgreSQL version: 10.11
Operating system: Linux
Description:
I tried to restore a binary backup (basebackup + WAL archives) onto a
smaller machine.
During restore the following log message was issued:
2020-01-17 07:14:20.524 UTC [19274] FATAL: hot standby is not possible
because max_worker_processes = 2 is a lower setting than on the master
server (its value was 8)
2020-01-17 07:14:20.526 UTC [19273] LOG: startup process (PID 19274) exited
with exit code 1
2020-01-17 07:14:20.526 UTC [19273] LOG: aborting startup due to startup
process failure
2020-01-17 07:14:20.541 UTC [19273] LOG: database system is shut down
pg_ctl: could not start server
Examine the log output.
The workaround was to raise the number of max_worker_process for the
recovery process to work and lowering it afterwords.
This seems to be a bug to me, as I don't see a technical connection between
these settings for the restore to be successful.
Cheers
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: BUG #16215: Restore failes if number of workers in postgresql.conf is lower than on source system
2020-01-17 07:22 BUG #16215: Restore failes if number of workers in postgresql.conf is lower than on source system PG Bug reporting form <noreply@postgresql.org>
@ 2020-01-17 07:58 ` Sergei Kornilov <sk@zsrv.org>
2020-01-17 09:33 ` Re: BUG #16215: Restore failes if number of workers in postgresql.conf is lower than on source system Stefan Sonnenberg-Carstens <stefan.sonnenberg.carstens@gmail.com>
0 siblings, 1 reply; 5+ messages in thread
From: Sergei Kornilov @ 2020-01-17 07:58 UTC (permalink / raw)
To: stefan.sonnenberg.carstens@gmail.com <stefan.sonnenberg.carstens@gmail.com>; pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
Hello
No, this is intended and documented behavior: https://www.postgresql.org/docs/10/hot-standby.html#HOT-STANDBY-ADMIN
max_worker_processes must be at least the same as on primary. It is because exactly of our technical connection between recovery and the number of backends.
regards, Sergei
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: BUG #16215: Restore failes if number of workers in postgresql.conf is lower than on source system
2020-01-17 07:22 BUG #16215: Restore failes if number of workers in postgresql.conf is lower than on source system PG Bug reporting form <noreply@postgresql.org>
2020-01-17 07:58 ` Re: BUG #16215: Restore failes if number of workers in postgresql.conf is lower than on source system Sergei Kornilov <sk@zsrv.org>
@ 2020-01-17 09:33 ` Stefan Sonnenberg-Carstens <stefan.sonnenberg.carstens@gmail.com>
2020-01-17 09:45 ` Re: BUG #16215: Restore failes if number of workers in postgresql.conf is lower than on source system Sergei Kornilov <sk@zsrv.org>
0 siblings, 1 reply; 5+ messages in thread
From: Stefan Sonnenberg-Carstens @ 2020-01-17 09:33 UTC (permalink / raw)
To: Sergei Kornilov <sk@zsrv.org>; +Cc: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
Hi Sergei,
as far as I understand these restrictions apply when hot_standby is set to
on AND a recovery.conf is missing.
I can confirm that hot_standby is commented out - is this setting on by
default?
grep hot_standby /etc/postgresql/10/main/postgresql.conf
#hot_standby = on # "off" disallows queries during
recovery
#hot_standby_feedback = off # send info from standby to prevent
Cheers
Am Fr., 17. Jan. 2020 um 08:58 Uhr schrieb Sergei Kornilov <sk@zsrv.org>:
> Hello
>
> No, this is intended and documented behavior:
> https://www.postgresql.org/docs/10/hot-standby.html#HOT-STANDBY-ADMIN
> max_worker_processes must be at least the same as on primary. It is
> because exactly of our technical connection between recovery and the number
> of backends.
>
> regards, Sergei
>
--
Stefan Sonnenberg-Carstens
IT Ingenieur
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: BUG #16215: Restore failes if number of workers in postgresql.conf is lower than on source system
2020-01-17 07:22 BUG #16215: Restore failes if number of workers in postgresql.conf is lower than on source system PG Bug reporting form <noreply@postgresql.org>
2020-01-17 07:58 ` Re: BUG #16215: Restore failes if number of workers in postgresql.conf is lower than on source system Sergei Kornilov <sk@zsrv.org>
2020-01-17 09:33 ` Re: BUG #16215: Restore failes if number of workers in postgresql.conf is lower than on source system Stefan Sonnenberg-Carstens <stefan.sonnenberg.carstens@gmail.com>
@ 2020-01-17 09:45 ` Sergei Kornilov <sk@zsrv.org>
2020-01-17 10:42 ` Re: BUG #16215: Restore failes if number of workers in postgresql.conf is lower than on source system Stefan Sonnenberg-Carstens <stefan.sonnenberg.carstens@gmail.com>
0 siblings, 1 reply; 5+ messages in thread
From: Sergei Kornilov @ 2020-01-17 09:45 UTC (permalink / raw)
To: Stefan Sonnenberg-Carstens <stefan.sonnenberg.carstens@gmail.com>; +Cc: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
Hello
> as far as I understand these restrictions apply when hot_standby is set to on AND a recovery.conf is missing.
When hot_standby is set to on AND a recovery.conf is PRESENT
Here is: https://github.com/postgres/postgres/blob/REL_10_STABLE/src/backend/access/transam/xlog.c#L6185
ArchiveRecoveryRequested is set if we found recovery.conf (see readRecoveryCommandFile)
> I can confirm that hot_standby is commented out - is this setting on by default?
Yes, in postgresql 10 and newer.
regards, Sergei
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: BUG #16215: Restore failes if number of workers in postgresql.conf is lower than on source system
2020-01-17 07:22 BUG #16215: Restore failes if number of workers in postgresql.conf is lower than on source system PG Bug reporting form <noreply@postgresql.org>
2020-01-17 07:58 ` Re: BUG #16215: Restore failes if number of workers in postgresql.conf is lower than on source system Sergei Kornilov <sk@zsrv.org>
2020-01-17 09:33 ` Re: BUG #16215: Restore failes if number of workers in postgresql.conf is lower than on source system Stefan Sonnenberg-Carstens <stefan.sonnenberg.carstens@gmail.com>
2020-01-17 09:45 ` Re: BUG #16215: Restore failes if number of workers in postgresql.conf is lower than on source system Sergei Kornilov <sk@zsrv.org>
@ 2020-01-17 10:42 ` Stefan Sonnenberg-Carstens <stefan.sonnenberg.carstens@gmail.com>
0 siblings, 0 replies; 5+ messages in thread
From: Stefan Sonnenberg-Carstens @ 2020-01-17 10:42 UTC (permalink / raw)
To: Sergei Kornilov <sk@zsrv.org>; +Cc: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
Sure, during restore the recovery.conf is present (as I create it to be
able to do the restore).
After setting the parameter hot_standby explicitly to off, I can confirm
that it is no longer required to have higher values as on the source system.
Ok, It would be great to have this default as a comment in the
postgresql.conf that is created during cluster init as for many other
parameters.
Then, indeed, this is not a bug.
Thank you for this explanation and your help!
Cheers
Am Fr., 17. Jan. 2020 um 10:45 Uhr schrieb Sergei Kornilov <sk@zsrv.org>:
> Hello
>
> > as far as I understand these restrictions apply when hot_standby is set
> to on AND a recovery.conf is missing.
>
> When hot_standby is set to on AND a recovery.conf is PRESENT
> Here is:
> https://github.com/postgres/postgres/blob/REL_10_STABLE/src/backend/access/transam/xlog.c#L6185
> ArchiveRecoveryRequested is set if we found recovery.conf (see
> readRecoveryCommandFile)
>
> > I can confirm that hot_standby is commented out - is this setting on by
> default?
>
> Yes, in postgresql 10 and newer.
>
> regards, Sergei
>
--
Stefan Sonnenberg-Carstens
IT Ingenieur
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2020-01-17 10:42 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-01-17 07:22 BUG #16215: Restore failes if number of workers in postgresql.conf is lower than on source system PG Bug reporting form <noreply@postgresql.org>
2020-01-17 07:58 ` Sergei Kornilov <sk@zsrv.org>
2020-01-17 09:33 ` Stefan Sonnenberg-Carstens <stefan.sonnenberg.carstens@gmail.com>
2020-01-17 09:45 ` Sergei Kornilov <sk@zsrv.org>
2020-01-17 10:42 ` Stefan Sonnenberg-Carstens <stefan.sonnenberg.carstens@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox