Re: [HACKERS] [GENERAL] WAL archiving idle database

2007-10-29 Thread Jeff Davis
On Mon, 2007-10-29 at 14:20 -0400, Tom Lane wrote: > Jeff Davis <[EMAIL PROTECTED]> writes: > > One minor thing: I think it's still dependent on locale though, because > > the output of pg_controldata is locale-dependent, right? It would work > > fine for me, but it would be nice if there was somet

Re: [HACKERS] [GENERAL] WAL archiving idle database

2007-10-29 Thread Tom Lane
Jeff Davis <[EMAIL PROTECTED]> writes: > One minor thing: I think it's still dependent on locale though, because > the output of pg_controldata is locale-dependent, right? It would work > fine for me, but it would be nice if there was something that could be > released that anyone could use, includ

Re: [HACKERS] [GENERAL] WAL archiving idle database

2007-10-29 Thread Kevin Grittner
>>> On Mon, Oct 29, 2007 at 11:50 AM, in message <[EMAIL PROTECTED]>, Jeff Davis <[EMAIL PROTECTED]> wrote: > Also, did you publish your pg_clearxlogtail program anywhere? I think > that would be helpful to many people, but I don't see it on pgfoundry. So far I've just included with the email o

Re: [HACKERS] [GENERAL] WAL archiving idle database

2007-10-29 Thread Jeff Davis
On Mon, 2007-10-29 at 09:56 -0500, Kevin Grittner wrote: > Here's our script: Thanks, I think that is better than what I'm doing. One minor thing: I think it's still dependent on locale though, because the output of pg_controldata is locale-dependent, right? It would work fine for me, but it woul

Re: [HACKERS] [GENERAL] WAL archiving idle database

2007-10-29 Thread Kevin Grittner
>>> On Fri, Oct 26, 2007 at 6:28 PM, in message <[EMAIL PROTECTED]>, Jeff Davis <[EMAIL PROTECTED]> wrote: > [ of course, there's no guarantee that the archive_command succeeds in > that time ] Which is one of the things we would want to cause an alert. -Kevin -

Re: [HACKERS] [GENERAL] WAL archiving idle database

2007-10-29 Thread Kevin Grittner
>>> On Fri, Oct 26, 2007 at 6:39 PM, in message <[EMAIL PROTECTED]>, Jeff Davis <[EMAIL PROTECTED]> wrote: > On Fri, 2007-10-26 at 18:06 -0500, Kevin Grittner wrote: >> Hmmm... We would actually prefer to get the WAL file at the >> specified interval. We have software to ensure that the warm >>

Re: [HACKERS] [GENERAL] WAL archiving idle database

2007-10-26 Thread Tom Lane
Jeff Davis <[EMAIL PROTECTED]> writes: > I would think if the current location does not end in all zeros, you > should expect a new WAL segment to be archived soon. Although this > assumes that an idle database would not advance that location at all, > and I'm still trying to understand Tom's propo

Re: [HACKERS] [GENERAL] WAL archiving idle database

2007-10-26 Thread Jeff Davis
On Fri, 2007-10-26 at 18:06 -0500, Kevin Grittner wrote: > Hmmm... We would actually prefer to get the WAL file at the > specified interval. We have software to ensure that the warm > standby instances are not getting stale, and that's pretty simple > with the current behavior. We don't have a b

Re: [HACKERS] [GENERAL] WAL archiving idle database

2007-10-26 Thread Jeff Davis
On Fri, 2007-10-26 at 18:47 -0400, Tom Lane wrote: > Jeff Davis <[EMAIL PROTECTED]> writes: > > What's happening is that you have a checkpoint_timeout of 5 minutes, and > > that checkpoint must write a checkpoint record in the WAL, prompting the > > archiving. > > > If you want it to happen less f

Re: [HACKERS] [GENERAL] WAL archiving idle database

2007-10-26 Thread Tom Lane
Jeff Davis <[EMAIL PROTECTED]> writes: > Keep in mind that even in the current system, your configuration is > variable based on the checkpoint_timeout setting. Yeah, and he has to keep this less than archive_timeout in order for it to work the way he wants, which is probably not good for performa

Re: [HACKERS] [GENERAL] WAL archiving idle database

2007-10-26 Thread Jeff Davis
On Fri, 2007-10-26 at 18:06 -0500, Kevin Grittner wrote: > >>> On Fri, Oct 26, 2007 at 5:47 PM, in message <[EMAIL PROTECTED]>, > Tom Lane <[EMAIL PROTECTED]> wrote: > > > And after > > each archive_timeout, we test to see if we need to flush the current WAL > > segment out to the archive; whic

Re: [HACKERS] [GENERAL] WAL archiving idle database

2007-10-26 Thread Tom Lane
"Kevin Grittner" <[EMAIL PROTECTED]> writes: > On Fri, Oct 26, 2007 at 5:47 PM, in message <[EMAIL PROTECTED]>, > Tom Lane <[EMAIL PROTECTED]> wrote: >> And after >> each archive_timeout, we test to see if we need to flush the current WAL >> segment out to the archive; which is determined by whet

Re: [HACKERS] [GENERAL] WAL archiving idle database

2007-10-26 Thread Kevin Grittner
>>> On Fri, Oct 26, 2007 at 5:47 PM, in message <[EMAIL PROTECTED]>, Tom Lane <[EMAIL PROTECTED]> wrote: > And after > each archive_timeout, we test to see if we need to flush the current WAL > segment out to the archive; which is determined by whether the write > pointer is currently exactly a