Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.databases.postgresql > #798

Re: PostgreSQL replica db crashes with => FATAL: could not restore file from archive: child process exited with exit code 255

From Dimitri Fontaine <dim@tapoueh.org>
Newsgroups comp.databases.postgresql
Subject Re: PostgreSQL replica db crashes with => FATAL: could not restore file from archive: child process exited with exit code 255
Date 2017-10-31 16:21 +0100
Organization A noiseless patient Spider
Message-ID <m2y3nrpcky.fsf@dimitris-macbook-air-3.home> (permalink)
References <92bb56fd-80ea-4314-99cd-00196fe4bc64@googlegroups.com>

Show all headers | View raw


Alf Normann Klausen <alf@svada.com> writes:

> My PostgreSQL configuration is Streaming Replication cluster with a
> MASTER server and a SLAVE server, both with postgresql 9.6

No, it isn't. We decided in the PostgreSQL community to avoid any
references to slavery in our documentation and terminology. Also, have
you ever heard of a slave elected to replace its master when it fails?

The PostgreSQL project uses primary and standby, or replica.

My preferred terminology here uses Queen, Princess and Workers to make
it obvious who might be elected to replace the Queen when needs be, and
which servers are doing Load Balancing rather than High Availability.

Anyway.

> Usually this works fine, but in this specific cases (happened 2 times to me)
> when the network between SLAVE and BARMAN server are broken, the SLAVE
> postgresql database crashed. This is how it looks in the logs:

[ ... ]

> PS: my restore_command in 9.6/data/recovery.conf file is: 
> restore_command = 'ssh barman@192.168.4.52 barman get-wal datavarehus %f > %p'

Read the docs!

  https://www.postgresql.org/docs/current/static/archive-recovery-settings.html

  An exception is that if the command was terminated by a signal (other
  than SIGTERM, which is used as part of a database server shutdown) or
  an error by the shell (such as command not found), then recovery will
  abort and the server will not start up.

Make it so that your restore_command doesn't signal to PostgreSQL when
the ssh connection is impossible to establish, I guess.

-- 
Dimitri Fontaine

Read my book!  http://masteringpostgresql.com

Back to comp.databases.postgresql | Previous | NextPrevious in thread | Find similar


Thread

PostgreSQL replica db crashes with => FATAL:  could not restore file from archive: child process exited with exit code 255 Alf Normann Klausen <alf@svada.com> - 2017-10-31 05:58 -0700
  Re: PostgreSQL replica db crashes with => FATAL:  could not restore file from archive: child process exited with exit code 255 Dimitri Fontaine <dim@tapoueh.org> - 2017-10-31 16:21 +0100

csiph-web