Pause/Resume feature for Hot Standby - Mailing list pgsql-hackers

From Simon Riggs
Subject Pause/Resume feature for Hot Standby
Date
Msg-id 1272960129.4535.275.camel@ebony
Whole thread Raw
Responses Re: Pause/Resume feature for Hot Standby
Re: Pause/Resume feature for Hot Standby
Re: Pause/Resume feature for Hot Standby
List pgsql-hackers
In the original patch I had Pause/Resume feature for controlling
recovery during Hot Standby. It was removed for lack of time.

With all the discussion around the HS UI, it would be something that
could be back very easily.

I would like to do it as a recovery control plugin. The plugin would be
passed 3 pieces of information and be called before each WAL record was
applied:

* current WAL pointer
* xid - 0 if not a commit/abort
* timestamp - if available
* boolean flag indicating whether it's a record type that conflicts

**No user data would be passed to the plugin**, so no need to revisit
the discussions around WAL plugins etc.. The plugin has the benefit of
providing a whole range of possible control options, as well as being
minimal performance overhead.

This would allow initially allow
* Pause
* Resume
and would go into 9.0 as a contrib module, included with the plugin
patch.

Later we would be able to add on such things as
* Pause for a delay
* Seek to a particular xid commit record
* Seek to a particular WAL pointer and stop

This would be particularly helpful in designing an automated test suite,
since we can recheck the snapshot after each commit to verify it matches
the primary.

-- Simon Riggs           www.2ndQuadrant.com



pgsql-hackers by date:

Previous
From: Srinivas Naik
Date:
Subject: Reg: SQL Query for Postgres 8.4.3
Next
From: Simon Riggs
Date:
Subject: Re: max_standby_delay considered harmful