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

Logging temp file useage ... a little advice would be appreciated

From: Bill Moran <wmoran(at)collaborativefusion(dot)com>
To: hackers(at)postgresql(dot)org
Subject: Logging temp file useage ... a little advice would be appreciated
Date: 2006-12-29 22:53:38
Message-ID: 20061229175338.25ccf571.wmoran@collaborativefusion.com (view raw or flat)
Thread:
Lists: pgsql-hackers
So I've got this patch (attached, against 8.2)

The goal is to track temp file usage as an aid to server tuning (such as
work_mem)

Most of the patch seems to work just dandy, except I'm getting weird
sizes reported:

2006-12-29 17:46:21 EST [45558]: [575-1] LOG:  temp file: size 140737488343776 path base/32861/pgsql_tmp/pgsql_tmp45558.554

Seems a bit odd to have a 140T file on a 130G partition ...

I'm working on a FreeBSD 6.2 amd64 system.  The headers show stat.st_size to
be of type off_t, which appears to be a 64-bit int.  I figured that %ld
would be the correct format.

Am I hitting something such as file sparseness?  Is this entire endeavour
doomed from the start?  Or am I just making some sort of dumb mistake?

Any pointers are welcome.

-- 
Bill Moran
Collaborative Fusion Inc.

Attachment: trace_log_files.diff
Description: text/x-diff (1.3 KB)

Responses

pgsql-hackers by date

Next:From: Robert TreatDate: 2006-12-29 22:57:12
Subject: Re: TODO: GNU TLS
Previous:From: Simon RiggsDate: 2006-12-29 22:49:49
Subject: Re: Dead Space Map for vacuum

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