Skip site navigation (1) Skip section navigation (2)

Re: Decreasing WAL size effects

From: Aidan Van Dyk <aidan(at)highrise(dot)ca>
To: Greg Smith <gsmith(at)gregsmith(dot)com>
Cc: Kyle Cordes <kyle(at)kylecordes(dot)com>, pgsql <pgsql-general(at)postgresql(dot)org>
Subject: Re: Decreasing WAL size effects
Date: 2008-10-31 21:02:11
Message-ID: 20081031210211.GG20934@yugib.highrise.ca (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-hackers
* Aidan Van Dyk <aidan(at)highrise(dot)ca> [081031 15:11]:
> How about something like the attached.  It's been spun quickly, passed
> regression tests, and some simple hand tests on REL8_3_STABLE.  It seem slike
> HEAD can't  initdb on my machine (quad opteron with SW raid1), I tried a few
> revision in the last few days, and initdb dies on them all...

OK, HEAD does work, I don't know what was going on previosly... Attached is my
patch against head.

I'll try and pull out some machines on Monday to really thrash/crash this but
I'm running out of time today to set that up.

But in running head, I've come accross this:
	regression=# SELECT pg_stop_backup();
	WARNING:  pg_stop_backup still waiting for archive to complete (60 seconds elapsed)
	WARNING:  pg_stop_backup still waiting for archive to complete (120 seconds elapsed)
	WARNING:  pg_stop_backup still waiting for archive to complete (240 seconds elapsed)

My archive script is *not* running, it ran and exited:
	mountie(at)pumpkin:~/projects/postgresql/PostgreSQL/src/test/regress$ ps -ewf | grep post
	mountie   2904     1  0 16:31 pts/14   00:00:00 /home/mountie/projects/postgresql/PostgreSQL/src/test/regress/tmp_check/install/usr/local/pgsql
	mountie   2906  2904  0 16:31 ?        00:00:01 postgres: writer process
	mountie   2907  2904  0 16:31 ?        00:00:00 postgres: wal writer process
	mountie   2908  2904  0 16:31 ?        00:00:00 postgres: archiver process   last was 00000001000000000000001F
	mountie   2909  2904  0 16:31 ?        00:00:01 postgres: stats collector process
	mountie   2921  2904  1 16:31 ?        00:00:18 postgres: mountie regression 127.0.0.1(56455) idle

Those all match up:
	mountie(at)pumpkin:~/projects/postgresql/PostgreSQL/src/test/regress$ pstree -acp 2904
	postgres,2904 -D/home/mountie/projects/postgres
	  ├─postgres,2906
	  ├─postgres,2907
	  ├─postgres,2908
	  ├─postgres,2909
	  └─postgres,2921

strace on the "archiver process" postgres:
	select(0, NULL, NULL, NULL, {1, 0})     = 0 (Timeout)
	getppid()                               = 2904
	select(0, NULL, NULL, NULL, {1, 0})     = 0 (Timeout)
	getppid()                               = 2904
	select(0, NULL, NULL, NULL, {1, 0})     = 0 (Timeout)
	getppid()                               = 2904
	select(0, NULL, NULL, NULL, {1, 0})     = 0 (Timeout)
	getppid()                               = 2904
	select(0, NULL, NULL, NULL, {1, 0})     = 0 (Timeout)
	getppid()                               = 2904

It *does* finally finish, postmaster log looks like ("Archving ..." is what my
archive script prints, bytes is the gzip'ed size):
	Archiving 000000010000000000000016 [16397 bytes]
	Archiving 000000010000000000000017 [4405457 bytes]
	Archiving 000000010000000000000018 [3349243 bytes]
	Archiving 000000010000000000000019 [3349505 bytes]
	LOG:  ZEROING xlog file 0 segment 27 from 7954432 - 16777216 [8822784 bytes]
	Archiving 00000001000000000000001A [3349590 bytes]
	Archiving 00000001000000000000001B [1596676 bytes]
	LOG:  ZEROING xlog file 0 segment 28 from 8192 - 16777216 [16769024 bytes]
	Archiving 00000001000000000000001C [16398 bytes]
	LOG:  ZEROING xlog file 0 segment 29 from 8192 - 16777216 [16769024 bytes]
	Archiving 00000001000000000000001D [16397 bytes]
	LOG:  ZEROING xlog file 0 segment 30 from 8192 - 16777216 [16769024 bytes]
	Archiving 00000001000000000000001E [16393 bytes]
	Archiving 00000001000000000000001E.00000020.backup [146 bytes]
	WARNING:  pg_stop_backup still waiting for archive to complete (60 seconds elapsed)
	WARNING:  pg_stop_backup still waiting for archive to complete (120 seconds elapsed)
	WARNING:  pg_stop_backup still waiting for archive to complete (240 seconds elapsed)
	LOG:  ZEROING xlog file 0 segment 31 from 8192 - 16777216 [16769024 bytes]
	Archiving 00000001000000000000001F [16395 bytes]


So what's this "pg_stop_backup still waiting for archive to complete" for 5
minutes state?  I've not seen that before (runing 8.2 and 8.3).

a.
-- 
Aidan Van Dyk                                             Create like a god,
aidan(at)highrise(dot)ca                                       command like a king,
http://www.highrise.ca/                                   work like a slave.

In response to

Responses

pgsql-hackers by date

Next:From: Zdenek KotalaDate: 2008-10-31 21:12:21
Subject: PostgreSQL in-place upgrade Git repository is ready to play
Previous:From: Simon RiggsDate: 2008-10-31 20:37:40
Subject: Re: pgsql: Unite ReadBufferWithFork,ReadBufferWithStrategy, and

pgsql-general by date

Next:From: Eric SchwarzenbachDate: 2008-10-31 21:03:31
Subject: GEQO randomness?
Previous:From: Eric SchwarzenbachDate: 2008-10-31 20:49:08
Subject: GEQO randomness?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group