Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Apr 2021 17:31:10 -0400
From:      Gunther Schadow <raj@gusw.net>
To:        freebsd-performance@freebsd.org
Subject:   PosgtgreSQL hot standby reading WAL from muli-attached volume?
Message-ID:  <a1612d52-7a29-4058-b3a9-255634b1fe95@gusw.net>

next in thread | raw e-mail | index | archive | help
Hi,

I wonder can we set up a hot standby in such a way that we don't need 
any log streaming nor shipping, where instead every hot standby just 
mounts the same disk in read-only mode which the master uses to write 
his WAL files?

Even without a clustered file system, e.g., a UFS on FreeBSD, one can 
have the master mount in read-write mode while all the hot standbys 
would mount the volume read-only. Given that WAL logs are written out at 
a certain rate, one can at regular intervals issue

mount -u /pg_wal

and it should refresh the metadata, I assume. I am re-reading about 
hot-standby, and it strikes me that this method is essentially the "log 
shipping" method only that there is no actual "shipping" involved, the 
new log files simply appear all of a sudden on the disk.

I suppose there is a question how we know when a new WAL file is 
finished appearing? And as I read the log-shipping method may not be 
suitable for hot standby use?

Is this something that has been written about already?

regards,
-Gunther





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a1612d52-7a29-4058-b3a9-255634b1fe95>