pg.ddx.io pgsql-performance@postgresql.org mailing list archive
help / color / mirror / Atom feedMonitoring Transaction Log size
7+ messages / 6 participants
[nested] [flat]
* Monitoring Transaction Log size
@ 2007-01-17 16:58 Ziegelwanger, Silvio <Silvio.Ziegelwanger@fabasoft.com>
0 siblings, 1 reply; 7+ messages in thread
From: Ziegelwanger, Silvio @ 2007-01-17 16:58 UTC (permalink / raw)
To: pgsql-performance
Hi,
how can I monitor the size of the transaction log files using SQL Statements?
Best Regards
Silvio
Silvio Ziegelwanger
Research & Development
Fabalabs Software GmbH
Honauerstraße 4
4020 Linz
Austria
Tel: [43] (732) 60 61 62
Fax: [43] (732) 60 61 62-609
E-Mail: silvio.ziegelwanger@fabasoft.com
www.fabasoft.com <http://www.fabasoft.com/;
<http://www.fabasoft.at/fabasofthomepage2006/fabasoftgruppe/veranstaltungen/fabasoftegovdays07.htm;
Fabasoft egovday 07
Trends im E-Government, Innovationen für eine
zukunftsorientierte Verwaltung und digitale Geschäftsprozesse.
23. Januar 2007, Bern
30. Januar 2007, Berlin
6. Februar 2007, Bonn
Attachments:
image001.jpg (image/jpeg, 2.3K) download
view image
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Monitoring Transaction Log size
@ 2007-01-17 17:57 Joshua D. Drake <jd@commandprompt.com>
parent: Ziegelwanger, Silvio <Silvio.Ziegelwanger@fabasoft.com>
0 siblings, 3 replies; 7+ messages in thread
From: Joshua D. Drake @ 2007-01-17 17:57 UTC (permalink / raw)
To: Ziegelwanger, Silvio <Silvio.Ziegelwanger@fabasoft.com>; +Cc: pgsql-performance
Ziegelwanger, Silvio wrote:
> Hi,
>
>
>
> how can I monitor the size of the transaction log files using SQL Statements?
You can't. You would have to write a custom function to heck the size of
the xlog directory.
Sincerely,
Joshua D. Drake
>
>
>
> Best Regards
>
>
>
> Silvio
>
>
>
> Silvio Ziegelwanger
> Research & Development
>
> Fabalabs Software GmbH
> Honauerstraße 4
> 4020 Linz
> Austria
> Tel: [43] (732) 60 61 62
> Fax: [43] (732) 60 61 62-609
> E-Mail: silvio.ziegelwanger@fabasoft.com
> www.fabasoft.com <http://www.fabasoft.com/;
>
> <http://www.fabasoft.at/fabasofthomepage2006/fabasoftgruppe/veranstaltungen/fabasoftegovdays07.htm;
>
> Fabasoft egovday 07
> Trends im E-Government, Innovationen für eine
> zukunftsorientierte Verwaltung und digitale Geschäftsprozesse.
>
> 23. Januar 2007, Bern
>
> 30. Januar 2007, Berlin
>
> 6. Februar 2007, Bonn
>
>
>
>
--
=== The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
Providing the most comprehensive PostgreSQL solutions since 1997
http://www.commandprompt.com/
Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
PostgreSQL Replication: http://www.commandprompt.com/products/
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Monitoring Transaction Log size
@ 2007-01-17 18:03 Shoaib Mir <shoaibmir@gmail.com>
parent: Joshua D. Drake <jd@commandprompt.com>
2 siblings, 1 reply; 7+ messages in thread
From: Shoaib Mir @ 2007-01-17 18:03 UTC (permalink / raw)
To: Joshua D. Drake <jd@commandprompt.com>; +Cc: Ziegelwanger, Silvio <Silvio.Ziegelwanger@fabasoft.com>; pgsql-performance
archive_timeout (came in ver 8.2) might help you with customizing the size
for log files.
-----------------
Shoaib Mir
EnterpriseDB (www.enterprisedb.com)
On 1/17/07, Joshua D. Drake <jd@commandprompt.com> wrote:
>
> Ziegelwanger, Silvio wrote:
> > Hi,
> >
> >
> >
> > how can I monitor the size of the transaction log files using SQL
> Statements?
>
> You can't. You would have to write a custom function to heck the size of
> the xlog directory.
>
> Sincerely,
>
> Joshua D. Drake
>
> >
> >
> >
> > Best Regards
> >
> >
> >
> > Silvio
> >
> >
> >
> > Silvio Ziegelwanger
> > Research & Development
> >
> > Fabalabs Software GmbH
> > Honauerstraße 4
> > 4020 Linz
> > Austria
> > Tel: [43] (732) 60 61 62
> > Fax: [43] (732) 60 61 62-609
> > E-Mail: silvio.ziegelwanger@fabasoft.com
> > www.fabasoft.com <http://www.fabasoft.com/;
> >
> > <
> http://www.fabasoft.at/fabasofthomepage2006/fabasoftgruppe/veranstaltungen/fabasoftegovdays07.htm
> >
> >
> > Fabasoft egovday 07
> > Trends im E-Government, Innovationen für eine
> > zukunftsorientierte Verwaltung und digitale Geschäftsprozesse.
> >
> > 23. Januar 2007, Bern
> >
> > 30. Januar 2007, Berlin
> >
> > 6. Februar 2007, Bonn
> >
> >
> >
> >
>
>
> --
>
> === The PostgreSQL Company: Command Prompt, Inc. ===
> Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
> Providing the most comprehensive PostgreSQL solutions since 1997
> http://www.commandprompt.com/
>
> Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
> PostgreSQL Replication: http://www.commandprompt.com/products/
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: You can help support the PostgreSQL project by donating at
>
> http://www.postgresql.org/about/donate
>
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Monitoring Transaction Log size
@ 2007-01-17 18:29 Stefan Kaltenbrunner <stefan@kaltenbrunner.cc>
parent: Joshua D. Drake <jd@commandprompt.com>
2 siblings, 0 replies; 7+ messages in thread
From: Stefan Kaltenbrunner @ 2007-01-17 18:29 UTC (permalink / raw)
To: Joshua D. Drake <jd@commandprompt.com>; +Cc: Ziegelwanger, Silvio <Silvio.Ziegelwanger@fabasoft.com>; pgsql-performance
Joshua D. Drake wrote:
> Ziegelwanger, Silvio wrote:
>> Hi,
>>
>>
>>
>> how can I monitor the size of the transaction log files using SQL Statements?
>
> You can't. You would have to write a custom function to heck the size of
> the xlog directory.
wel in recent versions of pg it should be pretty easy to do that from
within SQL by using pg_ls_dir() and pg_stat_file().
maybe something(rough sketch) along the line of:
select sum((pg_stat_file('pg_xlog/' || file)).size) from
pg_ls_dir('pg_xlog') as file where file ~ '^[0-9A-F]';
might do the trick
Stefan
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Monitoring Transaction Log size
@ 2007-01-17 22:38 Tom Lane <tgl@sss.pgh.pa.us>
parent: Joshua D. Drake <jd@commandprompt.com>
2 siblings, 0 replies; 7+ messages in thread
From: Tom Lane @ 2007-01-17 22:38 UTC (permalink / raw)
To: Joshua D. Drake <jd@commandprompt.com>; +Cc: Ziegelwanger, Silvio <Silvio.Ziegelwanger@fabasoft.com>; pgsql-performance
"Joshua D. Drake" <jd@commandprompt.com> writes:
> Ziegelwanger, Silvio wrote:
>> how can I monitor the size of the transaction log files using SQL Statements?
> You can't. You would have to write a custom function to heck the size of
> the xlog directory.
Perhaps more to the point, why do you think you need to? pg_xlog should
stay pretty level at approximately 2*checkpoint_segments xlog files
(once it's ramped up to that size, which might take a heavy burst of
activity if checkpoint_segments is large).
regards, tom lane
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Monitoring Transaction Log size
@ 2007-01-18 09:55 Simon Riggs <simon@2ndquadrant.com>
parent: Shoaib Mir <shoaibmir@gmail.com>
0 siblings, 1 reply; 7+ messages in thread
From: Simon Riggs @ 2007-01-18 09:55 UTC (permalink / raw)
To: Shoaib Mir <shoaibmir@gmail.com>; +Cc: Joshua D. Drake <jd@commandprompt.com>; Ziegelwanger, Silvio <Silvio.Ziegelwanger@fabasoft.com>; pgsql-performance
On Wed, 2007-01-17 at 23:03 +0500, Shoaib Mir wrote:
> archive_timeout (came in ver 8.2) might help you with customizing the
> size for log files.
I'm not sure that it will.
If anything it could produce more log files, which could lead to a
backlog if the archive_command isn't functioning for some reason.
--
Simon Riggs
EnterpriseDB http://www.enterprisedb.com
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Monitoring Transaction Log size
@ 2007-01-18 10:19 Shoaib Mir <shoaibmir@gmail.com>
parent: Simon Riggs <simon@2ndquadrant.com>
0 siblings, 0 replies; 7+ messages in thread
From: Shoaib Mir @ 2007-01-18 10:19 UTC (permalink / raw)
To: Simon Riggs <simon@2ndquadrant.com>; +Cc: Joshua D. Drake <jd@commandprompt.com>; Ziegelwanger, Silvio <Silvio.Ziegelwanger@fabasoft.com>; pgsql-performance
Suggested in case he wants to do a log switch after certain amount of
time...
-----------
Shoaib Mir
EnterpriseDB (www.enterprisedb.com)
On 1/18/07, Simon Riggs <simon@2ndquadrant.com> wrote:
>
> On Wed, 2007-01-17 at 23:03 +0500, Shoaib Mir wrote:
> > archive_timeout (came in ver 8.2) might help you with customizing the
> > size for log files.
>
> I'm not sure that it will.
>
> If anything it could produce more log files, which could lead to a
> backlog if the archive_command isn't functioning for some reason.
>
> --
> Simon Riggs
> EnterpriseDB http://www.enterprisedb.com
>
>
>
^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2007-01-18 10:19 UTC | newest]
Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-01-17 16:58 Monitoring Transaction Log size Ziegelwanger, Silvio <Silvio.Ziegelwanger@fabasoft.com>
2007-01-17 17:57 ` Joshua D. Drake <jd@commandprompt.com>
2007-01-17 18:03 ` Shoaib Mir <shoaibmir@gmail.com>
2007-01-18 09:55 ` Simon Riggs <simon@2ndquadrant.com>
2007-01-18 10:19 ` Shoaib Mir <shoaibmir@gmail.com>
2007-01-17 18:29 ` Stefan Kaltenbrunner <stefan@kaltenbrunner.cc>
2007-01-17 22:38 ` Tom Lane <tgl@sss.pgh.pa.us>
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