pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedMassive insert created 975 WAL segments.. what?
3+ messages / 3 participants
[nested] [flat]
* Massive insert created 975 WAL segments.. what?
@ 2012-09-12 00:10 Wells Oliver <wellsoliver@gmail.com>
2012-09-12 01:45 ` Re: Massive insert created 975 WAL segments.. what? Ray Stell <stellr@vt.edu>
2012-09-12 06:14 ` Re: Massive insert created 975 WAL segments.. what? Simon Riggs <simon@2ndQuadrant.com>
0 siblings, 2 replies; 3+ messages in thread
From: Wells Oliver @ 2012-09-12 00:10 UTC (permalink / raw)
To: pgsql-admin
We were doing a test and inserted 1.5 million rows. In doing so, postgres
created 974 WAL segments of 16MB apiece. The relevant configuration from my
master's postgresql.conf:
wal_level = hot_standby
archive_mode = on
archive_command = 'test ! -f /mnt/postgresql-logs/%f && cp %p
/mnt/postgresql-logs/%f'
max_wal_senders = 3
wal_keep_segments = 16
So, now I have 16GB of WAL segments, 974 of them. Will postgresql clean
this up? Will it remove these files? Will it create more with big inserts?
What is the best way to manage this?
--
Wells Oliver
wellsoliver@gmail.com
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Massive insert created 975 WAL segments.. what?
2012-09-12 00:10 Massive insert created 975 WAL segments.. what? Wells Oliver <wellsoliver@gmail.com>
@ 2012-09-12 01:45 ` Ray Stell <stellr@vt.edu>
1 sibling, 0 replies; 3+ messages in thread
From: Ray Stell @ 2012-09-12 01:45 UTC (permalink / raw)
To: Wells Oliver <wellsoliver@gmail.com>; +Cc: pgsql-admin
On Sep 11, 2012, at 8:10 PM, Wells Oliver wrote:
> So, now I have 16GB of WAL segments, 974 of them. Will postgresql clean this up? Will it remove these files? Will it create more with big inserts?
>
> What is the best way to manage this?
http://www.postgresql.org/docs/9.2/static/pgarchivecleanup.html
you can use this in conjunction with your backup facility/scipts. Don't want to clean them up until you have a backup, right?
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Massive insert created 975 WAL segments.. what?
2012-09-12 00:10 Massive insert created 975 WAL segments.. what? Wells Oliver <wellsoliver@gmail.com>
@ 2012-09-12 06:14 ` Simon Riggs <simon@2ndQuadrant.com>
1 sibling, 0 replies; 3+ messages in thread
From: Simon Riggs @ 2012-09-12 06:14 UTC (permalink / raw)
To: Wells Oliver <wellsoliver@gmail.com>; +Cc: pgsql-admin
On 12 September 2012 01:10, Wells Oliver <wellsoliver@gmail.com> wrote:
> We were doing a test and inserted 1.5 million rows. In doing so, postgres
> created 974 WAL segments of 16MB apiece. The relevant configuration from my
> master's postgresql.conf:
>
> wal_level = hot_standby
> archive_mode = on
> archive_command = 'test ! -f /mnt/postgresql-logs/%f && cp %p
> /mnt/postgresql-logs/%f'
> max_wal_senders = 3
> wal_keep_segments = 16
>
> So, now I have 16GB of WAL segments, 974 of them. Will postgresql clean this
> up? Will it remove these files? Will it create more with big inserts?
>
> What is the best way to manage this?
These are transaction log files, created by database writes. They
protect you if you crash and also allow replication/backup.
These will be rotated every checkpoint, which by default is 5 minutes.
So they'll be long gone by now.
--
Simon Riggs http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2012-09-12 06:14 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2012-09-12 00:10 Massive insert created 975 WAL segments.. what? Wells Oliver <wellsoliver@gmail.com>
2012-09-12 01:45 ` Ray Stell <stellr@vt.edu>
2012-09-12 06:14 ` Simon Riggs <simon@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