Re: Segmentation fault occurs when the standby becomes primary, in SR - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Segmentation fault occurs when the standby becomes primary, in SR
Date
Msg-id 4B61E436.20709@enterprisedb.com
Whole thread Raw
In response to Segmentation fault occurs when the standby becomes primary, in SR  (Fujii Masao <masao.fujii@gmail.com>)
Responses Re: Re: Segmentation fault occurs when the standby becomes primary, in SR  (Robert Haas <robertmhaas@gmail.com>)
Re: Segmentation fault occurs when the standby becomes primary, in SR  (Fujii Masao <masao.fujii@gmail.com>)
List pgsql-hackers
Fujii Masao wrote:
> When I created the trigger file to activate the standby server,
> I got the segmentation fault:
> 
> ...
> The attached patch would fix the bug.

Thanks, committed. (I kept the old comment, though, I liked it better)

Now, whether we should even allow setting up a standby without
restore_command is another question. It's *possible*, but you need to
enable archiving in the master anyway to take an on-line backup, and you
need the archive to catch up if the standby ever falls behind too much.

Then again, if the database is small, maybe you don't mind taking a new
base backup if the standby falls behind. And you *can* take a base
backup with a dummy archive_command (ie. archive_command='/bin/true'),
if you trust that the WAL files stay in pg_xlog long enough for standby
to stream them from there.

Perhaps we should require a restore_command. If you know what you're
doing, you can always use '/bin/false' as restore_command to hack around it.

--  Heikki Linnakangas EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Streaming replication, and walsender during recovery
Next
From: Robert Haas
Date:
Subject: Re: Re: Segmentation fault occurs when the standby becomes primary, in SR