pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Another WAL question
6+ messages / 3 participants
[nested] [flat]

* Another WAL question
@ 2001-09-12 14:40  Nick Fankhauser <nickf@ontko.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Nick Fankhauser @ 2001-09-12 14:40 UTC (permalink / raw)
  To: pgsql-admin

Robert F. mentioned that there is a config parameter controlling the number
of WAL files in postgresql.conf.

I just looked at the Doc on this & I found WAL_FILES, which appears to
specify the number of files to create in advance, but it is no clear to me
that this limits the total number of WAL files created. Can this number be
exceeded as needed by the postmaster? If so, is there another parameter that
I'm missing to set a limit?

Are old WAL files deleted or re-used automatically when all of their
contents have been flushed to the DB, or should we be watching these &
either archiving or deleting old ones?

TIA,

-Nick

---------------------------------------------------------------------
Nick Fankhauser

Business:
nickf@doxpop.com  Phone 1.765.965.7363  Fax 1.765.962.9788
doxpop  - Court records at your fingertips - http://www.doxpop.com/

Personal:
nick@fankhausers.com   http://www.fankhausers.com




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

* Re: Another WAL question
@ 2001-09-12 17:32  Bruce Momjian <pgman@candle.pha.pa.us>
  parent: Nick Fankhauser <nickf@ontko.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Bruce Momjian @ 2001-09-12 17:32 UTC (permalink / raw)
  To: nickf@ontko.com; +Cc: pgsql-admin


In 7.1.3 and 7.2, there are only 2-3 WAL files kept because there is no
need to keep them after a checkpoint.  Is there any need to have these
WAL config paramaters anymore?

We currently have in postgresql.conf:

#wal_buffers = 8            # min 4
#wal_files = 0 # range 0-64
#wal_sync_method = fsync   # fsync or fdatasync or open_sync or
open_datasync
# Note: default wal_sync_method varies across platforms
#wal_debug = 0             # range 0-16
#commit_delay = 0          # range 0-100000
#commit_siblings = 5       # range 1-1000
#checkpoint_segments = 3   # in logfile segments (16MB each), min 1
#checkpoint_timeout = 300  # in seconds, range 30-3600


> Robert F. mentioned that there is a config parameter controlling the number
> of WAL files in postgresql.conf.
> 
> I just looked at the Doc on this & I found WAL_FILES, which appears to
> specify the number of files to create in advance, but it is no clear to me
> that this limits the total number of WAL files created. Can this number be
> exceeded as needed by the postmaster? If so, is there another parameter that
> I'm missing to set a limit?
> 
> Are old WAL files deleted or re-used automatically when all of their
> contents have been flushed to the DB, or should we be watching these &
> either archiving or deleting old ones?
> 
> TIA,
> 
> -Nick
> 
> ---------------------------------------------------------------------
> Nick Fankhauser
> 
> Business:
> nickf@doxpop.com  Phone 1.765.965.7363  Fax 1.765.962.9788
> doxpop  - Court records at your fingertips - http://www.doxpop.com/
> 
> Personal:
> nick@fankhausers.com   http://www.fankhausers.com
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
> 

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026



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

* Re: Another WAL question
@ 2001-09-12 17:53  Nick Fankhauser <nickf@ontko.com>
  parent: Bruce Momjian <pgman@candle.pha.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Nick Fankhauser @ 2001-09-12 17:53 UTC (permalink / raw)
  To: Bruce Momjian <pgman@candle.pha.pa.us>; +Cc: pgsql-admin


> In 7.1.3 and 7.2, there are only 2-3 WAL files kept because there is no
> need to keep them after a checkpoint.

This answers my original question- it sounds like after 3, they get recycled
or deleted, so if I reserve 48Mb (3*16) for these, I should be OK. ...Right?


> Is there any need to have these
> WAL config paramaters anymore?

I'd say all of the parameters you list below still make sense, as they all
control *how* the 2-3 WAL files are used. WAL_FILES might as well be 0-3
instead of 0-64, but I can still see an advantage to creating these in
advance to allocate the space.


> We currently have in postgresql.conf:
>
> #wal_buffers = 8            # min 4
> #wal_files = 0 # range 0-64
> #wal_sync_method = fsync   # fsync or fdatasync or open_sync or
> open_datasync
> # Note: default wal_sync_method varies across platforms
> #wal_debug = 0             # range 0-16
> #commit_delay = 0          # range 0-100000
> #commit_siblings = 5       # range 1-1000
> #checkpoint_segments = 3   # in logfile segments (16MB each), min 1
> #checkpoint_timeout = 300  # in seconds, range 30-3600


Thanks for the good answers on this!

-Nick




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

* Re: Another WAL question
@ 2001-09-12 19:09  Mikheev, Vadim <vmikheev@SECTORBASE.COM>
  0 siblings, 1 reply; 6+ messages in thread

From: Mikheev, Vadim @ 2001-09-12 19:09 UTC (permalink / raw)
  To: 'Bruce Momjian' <pgman@candle.pha.pa.us>; nickf@ontko.com; +Cc: pgsql-admin

> In 7.1.3 and 7.2, there are only 2-3 WAL files kept because
> there is no need to keep them after a checkpoint. Is there
> any need to have these WAL config paramaters anymore?

I missed what's you propose to remove.

Vadim



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

* Re: Another WAL question
@ 2001-09-12 20:03  Bruce Momjian <pgman@candle.pha.pa.us>
  parent: Mikheev, Vadim <vmikheev@SECTORBASE.COM>
  0 siblings, 0 replies; 6+ messages in thread

From: Bruce Momjian @ 2001-09-12 20:03 UTC (permalink / raw)
  To: Mikheev, Vadim <vmikheev@SECTORBASE.COM>; +Cc: pgsql-admin

> > In 7.1.3 and 7.2, there are only 2-3 WAL files kept because
> > there is no need to keep them after a checkpoint. Is there
> > any need to have these WAL config paramaters anymore?
> 
> I missed what's you propose to remove.

I am not proposing to remove anything.  I just want to make sure they
are all still valid now that we recycle the WAL segments.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026



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

* Re: Another WAL question
@ 2001-09-12 20:11  Mikheev, Vadim <vmikheev@SECTORBASE.COM>
  0 siblings, 0 replies; 6+ messages in thread

From: Mikheev, Vadim @ 2001-09-12 20:11 UTC (permalink / raw)
  To: 'Bruce Momjian' <pgman@candle.pha.pa.us>; +Cc: pgsql-admin

> > > In 7.1.3 and 7.2, there are only 2-3 WAL files kept because
> > > there is no need to keep them after a checkpoint. Is there
> > > any need to have these WAL config paramaters anymore?
> > 
> > I missed what's you propose to remove.
> 
> I am not proposing to remove anything.  I just want to make sure
> they are all still valid now that we recycle the WAL segments.

I think they are valid.

Vadim



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


end of thread, other threads:[~2001-09-12 20:11 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-09-12 14:40 Another WAL question Nick Fankhauser <nickf@ontko.com>
2001-09-12 17:32 ` Bruce Momjian <pgman@candle.pha.pa.us>
2001-09-12 17:53   ` Nick Fankhauser <nickf@ontko.com>
2001-09-12 19:09 Re: Another WAL question Mikheev, Vadim <vmikheev@SECTORBASE.COM>
2001-09-12 20:03 ` Bruce Momjian <pgman@candle.pha.pa.us>
2001-09-12 20:11 Re: Another WAL question Mikheev, Vadim <vmikheev@SECTORBASE.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