Thread: Disk full problem

Disk full problem

From
Prashant
Date:
Hi all,

I am a new addition to this mailing list. I am using Postgresql 7.4.3.
I went through the postgresql documentation for saving the disk usage.
Accordingly i changed the checkpoint_segments parameter to 1 in the
postgresql.conf file. I cross checked by giving the SHOW ALL command.
It shows 1 for the checkpoint_segments parameter. But when I chk the
disk usage, the pg_xlog folder is taking up 65MB. There are 4 files
under pg_xlog folder. According to the documentation, it should be
taking only 16MB.

And one more thing I noticed was that the base folder under pgsql/data
folder is taking up 25MB space.

How do I reduce the space taken up by these folders. I am running the
vaccumdb command at regular intervals.

Thanks in advance.

Re: Disk full problem

From
Frank Bax
Date:
At 03:06 AM 4/20/05, Prashant wrote:
>I am a new addition to this mailing list. I am using Postgresql 7.4.3.
>I went through the postgresql documentation for saving the disk usage.
>Accordingly i changed the checkpoint_segments parameter to 1 in the
>postgresql.conf file. I cross checked by giving the SHOW ALL command.
>It shows 1 for the checkpoint_segments parameter. But when I chk the
>disk usage, the pg_xlog folder is taking up 65MB. There are 4 files
>under pg_xlog folder. According to the documentation, it should be
>taking only 16MB.

Not quite.  the docs say 16M per file.  4 files * 16M = 64M

>And one more thing I noticed was that the base folder under pgsql/data
>folder is taking up 25MB space.
>
>How do I reduce the space taken up by these folders. I am running the
>vaccumdb command at regular intervals.


pgsql/data contains one folder for each database you created.  To further
reduce space here, you'll need to drop tables and/or databases.


Re: Disk full problem

From
"Pradeepkumar, Pyatalo (IE10)"
Date:
But in the documentation, it says that there can be 2*checkpoint_segments +
1 xlog files at a time. Since I have configured the only 1
checkpoint_segments....there should be a maximum of only 3 xlog files taking
only 48 MB, not 4 taking 65MB.



-----Original Message-----
From: pgsql-novice-owner@postgresql.org
[mailto:pgsql-novice-owner@postgresql.org] On Behalf Of Frank Bax
Sent: Thursday, April 21, 2005 6:26 PM
To: pgsql-novice@postgresql.org
Subject: Re: [NOVICE] Disk full problem

At 03:06 AM 4/20/05, Prashant wrote:
>I am a new addition to this mailing list. I am using Postgresql 7.4.3.
>I went through the postgresql documentation for saving the disk usage.
>Accordingly i changed the checkpoint_segments parameter to 1 in the
>postgresql.conf file. I cross checked by giving the SHOW ALL command.
>It shows 1 for the checkpoint_segments parameter. But when I chk the
>disk usage, the pg_xlog folder is taking up 65MB. There are 4 files
>under pg_xlog folder. According to the documentation, it should be
>taking only 16MB.

Not quite.  the docs say 16M per file.  4 files * 16M = 64M

>And one more thing I noticed was that the base folder under pgsql/data
>folder is taking up 25MB space.
>
>How do I reduce the space taken up by these folders. I am running the
>vaccumdb command at regular intervals.


pgsql/data contains one folder for each database you created.  To further
reduce space here, you'll need to drop tables and/or databases.


---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

Re: Disk full problem

From
Frank Bax
Date:
You misread the documentation.  It says "normally not be more than 2 *
checkpoint_segments + 1 files".  Notice the word "normally".  There can be
more files on your system due to "short-term peak" in log activity, but
system will recover space when system activity is reduced.  If your system
has "short-term peaks" often enough, the system will not recover that space.

http://www.postgresql.org/docs/current/static/wal-configuration.html

I just checked two of my systems (both with default setting of
checkpoint_segments = 3).  The production system has 4 log files (with
timestamps 25-30 hours apart), the test system (which has been idle for a
few days) has only 2 log files.




At 04:28 AM 4/22/05, Pradeepkumar, Pyatalo (IE10) wrote:


>But in the documentation, it says that there can be 2*checkpoint_segments +
>1 xlog files at a time. Since I have configured the only 1
>checkpoint_segments....there should be a maximum of only 3 xlog files taking
>only 48 MB, not 4 taking 65MB.
>
>
>
>-----Original Message-----
>From: pgsql-novice-owner@postgresql.org
>[mailto:pgsql-novice-owner@postgresql.org] On Behalf Of Frank Bax
>Sent: Thursday, April 21, 2005 6:26 PM
>To: pgsql-novice@postgresql.org
>Subject: Re: [NOVICE] Disk full problem
>
>At 03:06 AM 4/20/05, Prashant wrote:
> >I am a new addition to this mailing list. I am using Postgresql 7.4.3.
> >I went through the postgresql documentation for saving the disk usage.
> >Accordingly i changed the checkpoint_segments parameter to 1 in the
> >postgresql.conf file. I cross checked by giving the SHOW ALL command.
> >It shows 1 for the checkpoint_segments parameter. But when I chk the
> >disk usage, the pg_xlog folder is taking up 65MB. There are 4 files
> >under pg_xlog folder. According to the documentation, it should be
> >taking only 16MB.
>
>Not quite.  the docs say 16M per file.  4 files * 16M = 64M
>
> >And one more thing I noticed was that the base folder under pgsql/data
> >folder is taking up 25MB space.
> >
> >How do I reduce the space taken up by these folders. I am running the
> >vaccumdb command at regular intervals.
>
>
>pgsql/data contains one folder for each database you created.  To further
>reduce space here, you'll need to drop tables and/or databases.