Re: Constant WAL replay - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Constant WAL replay
Date
Msg-id 25855.1114324096@sss.pgh.pa.us
Whole thread Raw
In response to Constant WAL replay  (Hans-Jürgen Schönig <postgres@cybertec.at>)
Responses Re: Constant WAL replay  (Klaus Naumann <lists@distinctmind.de>)
List pgsql-hackers
Hans-Jürgen Schönig <postgres@cybertec.at> writes:
> We have toyed around with PostgreSQL's WAL structure and we are 
> wondering whether it is (theoretically) possible to replay WAL records 
> coming from a remote host while a system is working in read only mode.

There's been some idle speculation about that, and offhand I don't know
of any showstopper reasons why it couldn't be done ... but no one's
actually looked into making it happen.  Feel free ;-)

> Which kind of modifications are necessary to 
> replay and answer at the same time? (assuming that locks and 
> transactional information are available on the slave).

I think you should definitely assume that locks are *not* available, and
probably not any live transaction info.  The discussions before included
the idea of being able to do queries against a known-broken,
non-recoverable database without making it any worse than it was before.
In the current code there is no such thing as a hard read-only behavior
--- for example we will try to update commit-status hint bits no matter
what.  Allowing that to be turned off would be interesting for a number
of purposes, such as burning a database onto CD.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Hans-Jürgen Schönig
Date:
Subject: Constant WAL replay
Next
From: Neil Conway
Date:
Subject: Re: Constant WAL replay