pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedWAL and backup recovery
5+ messages / 3 participants
[nested] [flat]
* WAL and backup recovery
@ 2001-05-22 23:01 Dario Brignardello <dbrignar@sinectis.com>
0 siblings, 0 replies; 5+ messages in thread
From: Dario Brignardello @ 2001-05-22 23:01 UTC (permalink / raw)
To: pgsql-admin
Hi all:
I've a problem regarding WAL (I think :-)). When recovering
a backup in 7.1.1, the number of files in pg_xlog/ starts to grow,
and eventually exhaust the disk capacity (it ate my 6G partition). I've
the following settings in my postgresql.conf file:
wal_buffers = 4
wal_files = 16
wal_sync_method = fsync
checkpoint_segments = 1
checkpoint_timeout = 30
Right now I'm just testing the new engine, in fact I've installed it
yesterday (yes, I know, 7.1.2 is out today :->), so I don't care so much
about the performance of this settings. But, correct me if I
misunderstood the documentation, whit this config the backend will do a
checkpoint every 30 secs, or after the creation of a new segment
(whichever happens first), and if old segments are deleted why is the
file count growing?
Any help or tip would be greatly appreciated. Since now, thanks a lot.
Yours: Dario Brignardello
Attachments:
smime.p7s (application/x-pkcs7-signature, 1.8K) download
^ permalink raw reply [nested|flat] 5+ messages in thread
* WAL and backup recovery
@ 2001-05-23 12:26 Dario Brignardello <dbrignar@sinectis.com>
2001-05-23 16:08 ` Re: WAL and backup recovery Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 5+ messages in thread
From: Dario Brignardello @ 2001-05-23 12:26 UTC (permalink / raw)
To: pgsql-admin
Hi all:
I've a problem regarding WAL (I think :-)). When recovering
a backup in 7.1.1, the number of files in pg_xlog/ starts to grow,
and eventually exhaust the disk capacity (it ate my 6G partition). I've
the following settings in my postgresql.conf file:
wal_buffers = 4
wal_files = 16
wal_sync_method = fsync
checkpoint_segments = 1
checkpoint_timeout = 30
Right now I'm just testing the new engine, in fact I've installed it
yesterday (yes, I know, 7.1.2 is out today :->), so I don't care so much
about the performance of this settings. But, correct me if I
misunderstood the documentation, whit this config the backend will do a
checkpoint every 30 secs, or after the creation of a new segment
(whichever happens first), and if old segments are deleted why is the
file count growing?
Any help or tip would be greatly appreciated. Since now, thanks a lot.
Yours: Dario Brignardello
Attachments:
smime.p7s (application/x-pkcs7-signature, 1.8K) download
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: WAL and backup recovery
2001-05-23 12:26 WAL and backup recovery Dario Brignardello <dbrignar@sinectis.com>
@ 2001-05-23 16:08 ` Tom Lane <tgl@sss.pgh.pa.us>
2001-05-23 17:23 ` Re: WAL and backup recovery Thalis A. Kalfigopoulos <thalis@cs.pitt.edu>
2001-05-23 17:54 ` Re: WAL and backup recovery Dario Brignardello <dbrignar@sinectis.com>
0 siblings, 2 replies; 5+ messages in thread
From: Tom Lane @ 2001-05-23 16:08 UTC (permalink / raw)
To: Dario Brignardello <dbrignar@sinectis.com>; +Cc: pgsql-admin
Dario Brignardello <dbrignar@sinectis.com> writes:
> checkpoint_segments = 1
> checkpoint_timeout = 30
Reducing checkpoint_segments and checkpoint_timeout is actually
seriously counterproductive, if your problem is amount of disk space
chewed up by WAL logs during a long transaction (such as bulk load of
a big table). The WAL log cannot be truncated until the xact commits,
so the checkpoints that happen meanwhile just cause log bloat. Lots
of it, because each checkpoint causes fresh copying of modified pages
into the WAL log.
Try increasing those numbers, not decreasing them. Maybe 10/600 or so?
Also, if you are short on disk space for WAL, increasing wal_files isn't
such a great idea either.
regards, tom lane
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: WAL and backup recovery
2001-05-23 12:26 WAL and backup recovery Dario Brignardello <dbrignar@sinectis.com>
2001-05-23 16:08 ` Re: WAL and backup recovery Tom Lane <tgl@sss.pgh.pa.us>
@ 2001-05-23 17:23 ` Thalis A. Kalfigopoulos <thalis@cs.pitt.edu>
1 sibling, 0 replies; 5+ messages in thread
From: Thalis A. Kalfigopoulos @ 2001-05-23 17:23 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Dario Brignardello <dbrignar@sinectis.com>; pgsql-admin
On Wed, 23 May 2001, Tom Lane wrote:
> Dario Brignardello <dbrignar@sinectis.com> writes:
> > checkpoint_segments = 1
> > checkpoint_timeout = 30
>
> Reducing checkpoint_segments and checkpoint_timeout is actually
> seriously counterproductive, if your problem is amount of disk space
> chewed up by WAL logs during a long transaction (such as bulk load of
> a big table). The WAL log cannot be truncated until the xact commits,
> so the checkpoints that happen meanwhile just cause log bloat. Lots
> of it, because each checkpoint causes fresh copying of modified pages
> into the WAL log.
Hi Tom,
in the manual it mentions that the defaults are checkpoint_segments=3 and checkpoint_timeout=300 and a checkpoint occurs for whichever of the two comes up first. If I change in postgresql.conf checkpoint_segments=10, will the default checkpoint_timeout=300 be ignored or should I increase that as well. I mean, will checkpoint_timeout be still in effect, because if so, then the increasing only checkpoint_segments is useless.
thanks in advance,
thalis
>
> Try increasing those numbers, not decreasing them. Maybe 10/600 or so?
>
> Also, if you are short on disk space for WAL, increasing wal_files isn't
> such a great idea either.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: WAL and backup recovery
2001-05-23 12:26 WAL and backup recovery Dario Brignardello <dbrignar@sinectis.com>
2001-05-23 16:08 ` Re: WAL and backup recovery Tom Lane <tgl@sss.pgh.pa.us>
@ 2001-05-23 17:54 ` Dario Brignardello <dbrignar@sinectis.com>
1 sibling, 0 replies; 5+ messages in thread
From: Dario Brignardello @ 2001-05-23 17:54 UTC (permalink / raw)
To: ; +Cc: pgsql-admin
Thanks for your help, its working now :-).
Yours:
Dario Brignardello
Tom Lane wrote:
> Dario Brignardello <dbrignar@sinectis.com> writes:
> > checkpoint_segments = 1
> > checkpoint_timeout = 30
>
> Reducing checkpoint_segments and checkpoint_timeout is actually
> seriously counterproductive, if your problem is amount of disk space
> chewed up by WAL logs during a long transaction (such as bulk load of
> a big table). The WAL log cannot be truncated until the xact commits,
> so the checkpoints that happen meanwhile just cause log bloat. Lots
> of it, because each checkpoint causes fresh copying of modified pages
> into the WAL log.
>
> Try increasing those numbers, not decreasing them. Maybe 10/600 or so?
>
> Also, if you are short on disk space for WAL, increasing wal_files isn't
> such a great idea either.
>
> regards, tom lane
Attachments:
smime.p7s (application/x-pkcs7-signature, 1.8K) download
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2001-05-23 17:54 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-05-22 23:01 WAL and backup recovery Dario Brignardello <dbrignar@sinectis.com>
2001-05-23 12:26 WAL and backup recovery Dario Brignardello <dbrignar@sinectis.com>
2001-05-23 16:08 ` Tom Lane <tgl@sss.pgh.pa.us>
2001-05-23 17:23 ` Thalis A. Kalfigopoulos <thalis@cs.pitt.edu>
2001-05-23 17:54 ` Dario Brignardello <dbrignar@sinectis.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