Re: Hot standby and xlog on a ramdisk - Mailing list pgsql-general

From David Steele
Subject Re: Hot standby and xlog on a ramdisk
Date
Msg-id 56B36979.8080605@pgmasters.net
Whole thread Raw
In response to Re: Hot standby and xlog on a ramdisk  (Tore Halvorsen <tore.halvorsen@gmail.com>)
List pgsql-general
On 2/4/16 9:46 AM, Tore Halvorsen wrote:
> On Thu, Feb 4, 2016 at 3:30 PM, Scott R Mead <scottm@openscg.com
> <mailto:scottm@openscg.com>> wrote:
>
>>         > Can a hot standby run correctly with the xlog-files on a
>>         ramdisk?
>>         >
>>
>>         Yes, but, if you lose any, you'll need to rebuild the standby.
>>
>>
>>     Even if the master and archive contain all the wal files?
>>
>     If you have the file somewhere, you're okay, whether it's on the
>     master, standby or an archive host.  If you're using log-shipping,
>     you'll need all the WALs.
>
>
> So, just to verify my understanding. Using a ramdisk for pg_xlog on a
> hot standby slave should be ok in all cases as long as the archive and
> master retains all wal files that are not applied?

Yes.  If the pg_xlog ramdisk is lost on the standby then Postgres will
start throwing errors but there will be no corruption of the heap.  It's
possible that Postgres will terminate at this point, but after
remounting the ramdisk you can restart Postgres on the standby and
everything will be fine.

If something goes really horribly wrong you can always rebuild the standby.

--
-David
david@pgmasters.net


Attachment

pgsql-general by date:

Previous
From: Tore Halvorsen
Date:
Subject: Re: Hot standby and xlog on a ramdisk
Next
From: Tom Lane
Date:
Subject: Re: [SQL] Q: documentation bug ?