pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
archive_timeout behavior (8.4.6)
2+ messages / 2 participants
[nested] [flat]

* archive_timeout behavior (8.4.6)
@ 2011-04-23 00:23  Brian Fehrle <brianf@consistentstate.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Brian Fehrle @ 2011-04-23 00:23 UTC (permalink / raw)
  To: pgsql-admin; +Cc: Kevin Kempter <kevink@consistentstate.com>

Hi all,
     We thought we were having issues with our warm standby (postgres 
8.4.6), but think we figured it out, however I'd like someone to confirm 
what we think is true.

If a cluster has zero activity whatsoever, but we have archive_timeout 
set (say to 60 seconds), will it create a WAL file anyways, or knowing 
there was zero activity does it skip it? We turned it on (temporarily) 
to force WAL files to go to a newly set up warm standby so we could 
verify that we have the whole end-to-end process correct, but we didn't 
have any WAL files transfer to the warm standby. After some trouble 
shooting, we notice that we do get a WAL file shortly after we insert a 
single row into a table.

The confusion is probably because I remember this same scenario on older 
versions of 8.4, and watching it generate wal files even with no activity.

So long story short, if a cluster has zero activity, and archive_timeout 
is not set to 0, when it reaches that timeout should it generate a file, 
or just skip because it would be 100% empty?


Thanks in advance,
     Brian F



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: archive_timeout behavior (8.4.6)
@ 2011-05-02 04:09  Greg Smith <greg@2ndQuadrant.com>
  parent: Brian Fehrle <brianf@consistentstate.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Greg Smith @ 2011-05-02 04:09 UTC (permalink / raw)
  To: pgsql-admin

On 04/22/2011 08:23 PM, Brian Fehrle wrote:
> So long story short, if a cluster has zero activity, and 
> archive_timeout is not set to 0, when it reaches that timeout should 
> it generate a file, or just skip because it would be 100% empty?

You're right about what you've seen here, there is some logic in the 
WAL/checkpoint code that can avoid doing anything when the timeout hits, 
if there hasn't been any new WAL written since the last one.  That 
hasn't changed for a while now though (since I've been watching that 
part of the source code at least) so I'm not sure what differences 
between 8.4.6 and earlier 8.4 versions you think you've observed.

-- 
Greg Smith   2ndQuadrant US    greg@2ndQuadrant.com   Baltimore, MD
PostgreSQL Training, Services, and 24x7 Support  www.2ndQuadrant.us
"PostgreSQL 9.0 High Performance": http://www.2ndQuadrant.com/books




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2011-05-02 04:09 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-04-23 00:23 archive_timeout behavior (8.4.6) Brian Fehrle <brianf@consistentstate.com>
2011-05-02 04:09 ` Greg Smith <greg@2ndQuadrant.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox