Re: [GENERAL] Minimizing Recovery Time (wal replication)

2009-04-14 Thread Koichi Suzuki
If you're using "full page write = off", prefetching data page from WAL speeds up the recovery too. I've proposed this patch but was carried over to 8.5. I'm planning to release this as an external tool, which will not work well with Hot Standby but will work in usual recovery. I'm not sure ho

Re: [GENERAL] Minimizing Recovery Time (wal replication)

2009-04-13 Thread Bryan Murphy
On Sun, Apr 12, 2009 at 5:52 AM, Simon Riggs wrote: > The database is performing too frequent restartpoints. > > This has been optimised in PostgreSQL 8.4 by the addition of the > bgwriter running during recovery. This will mean that your hot spare > will not pause while waiting for restartpoint t

Re: [GENERAL] Minimizing Recovery Time (wal replication)

2009-04-12 Thread Simon Riggs
On Thu, 2009-04-09 at 14:27 -0500, Bryan Murphy wrote: > I have two hot-spare databases that use wal archiving and continuous > recovery mode. I want to minimize recovery time when we have to fail > over to one of our hot spares. Right now, I'm seeing the following > behavior which makes a quick

Re: [GENERAL] Minimizing Recovery Time (wal replication)

2009-04-09 Thread Bryan Murphy
On Thu, Apr 9, 2009 at 7:33 PM, Greg Smith wrote: >>> 1) Decrease the maximum possible segment backlog so you can never get >>> this >>>   far behind >> >> I understand conceptually what you are saying, but I don't know how to >> practically realize this. :)  Do you mean lower checkpoint_segments?

Re: [GENERAL] Minimizing Recovery Time (wal replication)

2009-04-09 Thread Greg Smith
On Thu, 9 Apr 2009, Bryan Murphy wrote: 1) Decrease the maximum possible segment backlog so you can never get this   far behind I understand conceptually what you are saying, but I don't know how to practically realize this. :) Do you mean lower checkpoint_segments? Theoretically, every tim

Re: [GENERAL] Minimizing Recovery Time (wal replication)

2009-04-09 Thread Bryan Murphy
On Thu, Apr 9, 2009 at 6:38 PM, Greg Smith wrote: > What does vmstat say about the bi/bo during this time period?  It sounds > like the volume of random I/O produced by recovery is just backing up as > expected.  Some quick math: I'll have to capture this, unfortunately I won't be able to do that

Re: [GENERAL] Minimizing Recovery Time (wal replication)

2009-04-09 Thread Greg Smith
On Thu, 9 Apr 2009, Bryan Murphy wrote: (1) hot spare applies 70 to 75 wal files (~1.1g) in 2 to 3 min period Yeah, if you ever let this many files queue up you're facing a long recovery time. You really need to get into a position where you're applying WAL files regularly enough that you d