Re: [HACKERS] Recovery control functions

2011-01-16 Thread Magnus Hagander
On Mon, Jan 17, 2011 at 02:53, Fujii Masao wrote: > On Sun, Jan 16, 2011 at 11:52 PM, Magnus Hagander wrote: >> So I'm back to my original question which is, how much work would this >> be? I don't know my way around that part so I can't estimate, and >> what's there so far is certainly a lot bet

Re: [HACKERS] Recovery control functions

2011-01-16 Thread Fujii Masao
On Sun, Jan 16, 2011 at 11:52 PM, Magnus Hagander wrote: > So I'm back to my original question which is, how much work would this > be? I don't know my way around that part so I can't estimate, and > what's there so far is certainly a lot better than nothing, but if > it's not a huge amount of wor

Re: [HACKERS] Recovery control functions

2011-01-16 Thread Magnus Hagander
On Sat, Jan 15, 2011 at 12:17, Simon Riggs wrote: > On Sat, 2011-01-15 at 20:11 +0900, Fujii Masao wrote: >> On Fri, Jan 14, 2011 at 9:00 PM, Simon Riggs wrote: >> >> How hard would it be to have a pg_xlog_replay_until(> >> timestamp>), to have it resume recovery up to that point and then >> >> p

Re: [HACKERS] Recovery control functions

2011-01-15 Thread Simon Riggs
On Sat, 2011-01-15 at 20:00 +0900, Fujii Masao wrote: > On Fri, Jan 14, 2011 at 8:15 PM, Simon Riggs wrote: > > On Fri, 2011-01-14 at 11:09 +, Simon Riggs wrote: > >> Functions to control recovery, to aid PITR and Hot Standby. > >> pg_is_xlog_replay_paused() > >> pg_xlog_replay_pause() > >> pg

Re: [HACKERS] Recovery control functions

2011-01-15 Thread Simon Riggs
On Sat, 2011-01-15 at 20:11 +0900, Fujii Masao wrote: > On Fri, Jan 14, 2011 at 9:00 PM, Simon Riggs wrote: > >> How hard would it be to have a pg_xlog_replay_until( >> timestamp>), to have it resume recovery up to that point and then > >> pause again? > > > > You can already do that for timestamp

Re: [HACKERS] Recovery control functions

2011-01-15 Thread Fujii Masao
On Fri, Jan 14, 2011 at 9:00 PM, Simon Riggs wrote: >> How hard would it be to have a pg_xlog_replay_until(> timestamp>), to have it resume recovery up to that point and then >> pause again? > > You can already do that for timestamps. You mean using recovery_target_time and pause_at_recovery_targ

Re: [HACKERS] Recovery control functions

2011-01-15 Thread Fujii Masao
On Fri, Jan 14, 2011 at 8:15 PM, Simon Riggs wrote: > On Fri, 2011-01-14 at 11:09 +, Simon Riggs wrote: >> Functions to control recovery, to aid PITR and Hot Standby. >> pg_is_xlog_replay_paused() >> pg_xlog_replay_pause() >> pg_xlog_replay_resume() >> >> recovery.conf parameter: pause_at_reco

Re: [HACKERS] Recovery control functions

2011-01-14 Thread Simon Riggs
On Fri, 2011-01-14 at 14:27 +0200, Heikki Linnakangas wrote: > > Trouble is, if you wait on Latch X and other processes send wakeup > > assuming you were waiting on Latch Y, then this will erroneously wake > > you up. > > The signal will wake up the process, but WaitLatch will quickly go back >

Re: [HACKERS] Recovery control functions

2011-01-14 Thread Heikki Linnakangas
On 14.01.2011 14:18, Simon Riggs wrote: On Fri, 2011-01-14 at 14:08 +0200, Heikki Linnakangas wrote: On 14.01.2011 14:01, Simon Riggs wrote: On Fri, 2011-01-14 at 13:47 +0200, Heikki Linnakangas wrote: On 14.01.2011 13:15, Simon Riggs wrote: /* + * Recheck shared recoveryPause by polling.

Re: [HACKERS] Recovery control functions

2011-01-14 Thread Simon Riggs
On Fri, 2011-01-14 at 14:08 +0200, Heikki Linnakangas wrote: > On 14.01.2011 14:01, Simon Riggs wrote: > > On Fri, 2011-01-14 at 13:47 +0200, Heikki Linnakangas wrote: > >> On 14.01.2011 13:15, Simon Riggs wrote: > >>> /* > >>> + * Recheck shared recoveryPause by polling. > >>> + * > >>> + * XXX

Re: [HACKERS] Recovery control functions

2011-01-14 Thread Heikki Linnakangas
On 14.01.2011 14:01, Simon Riggs wrote: On Fri, 2011-01-14 at 13:47 +0200, Heikki Linnakangas wrote: On 14.01.2011 13:15, Simon Riggs wrote: /* + * Recheck shared recoveryPause by polling. + * + * XXX It might seem we should do this via a shared Latch, but + * currently we only support one sh

Re: [HACKERS] Recovery control functions

2011-01-14 Thread Simon Riggs
On Fri, 2011-01-14 at 13:47 +0200, Heikki Linnakangas wrote: > On 14.01.2011 13:15, Simon Riggs wrote: > > /* > > + * Recheck shared recoveryPause by polling. > > + * > > + * XXX It might seem we should do this via a shared Latch, but > > + * currently we only support one shared latch per process

Re: [HACKERS] Recovery control functions

2011-01-14 Thread Simon Riggs
On Fri, 2011-01-14 at 12:41 +0100, Magnus Hagander wrote: > On Fri, Jan 14, 2011 at 12:15, Simon Riggs wrote: > > On Fri, 2011-01-14 at 11:09 +, Simon Riggs wrote: > >> Functions to control recovery, to aid PITR and Hot Standby. > >> pg_is_xlog_replay_paused() > >> pg_xlog_replay_pause() > >>

Re: [HACKERS] Recovery control functions

2011-01-14 Thread Heikki Linnakangas
On 14.01.2011 13:15, Simon Riggs wrote: /* + * Recheck shared recoveryPause by polling. + * + * XXX It might seem we should do this via a shared Latch, but + * currently we only support one shared latch per process and + * that is already taken for Startup process. Polling is used + * in other p

Re: [HACKERS] Recovery control functions

2011-01-14 Thread Magnus Hagander
On Fri, Jan 14, 2011 at 12:15, Simon Riggs wrote: > On Fri, 2011-01-14 at 11:09 +, Simon Riggs wrote: >> Functions to control recovery, to aid PITR and Hot Standby. >> pg_is_xlog_replay_paused() >> pg_xlog_replay_pause() >> pg_xlog_replay_resume() >> >> recovery.conf parameter: pause_at_recove

Re: [HACKERS] Recovery control functions

2011-01-14 Thread Simon Riggs
On Fri, 2011-01-14 at 11:09 +, Simon Riggs wrote: > Functions to control recovery, to aid PITR and Hot Standby. > pg_is_xlog_replay_paused() > pg_xlog_replay_pause() > pg_xlog_replay_resume() > > recovery.conf parameter: pause_at_recovery_target (bool) And now with the correct patch. -- Si

[HACKERS] Recovery control functions

2011-01-14 Thread Simon Riggs
Functions to control recovery, to aid PITR and Hot Standby. pg_is_xlog_replay_paused() pg_xlog_replay_pause() pg_xlog_replay_resume() recovery.conf parameter: pause_at_recovery_target (bool) -- Simon Riggs http://www.2ndQuadrant.com/books/ PostgreSQL Development, 24x7 Support, Train