Re: [HACKERS] WARNING : pgstat wait timeout - Postgres 9.1

2013-05-24 Thread Mathieu Guerin
About the stats_temp_directory, I didn't run as root...
Now I'm sure the configurations are correct.

I think, I have too much IO to use stats. I will ever have this message...
Maybe I can disable this option.
Do you know what it really impact ?

Thanks.
Math




2013/5/24 Mathieu Guerin 

> Hello,
>
> Thanks a lot for your answers.
>
>
> > You should get it...
> > stats_temp_directory   |
> pg_stat_tmp   | Writes temporary
> statistics files to the specified directory.
>
> I don't know why i don't get it. I am in 9.1 version...
>
> Moreover, when I mount pg_stat_tmp in a tmpfs, the warning messages
> decrease  the warning messages decrease from 1 each minutes to 1 each five
> secondes. I don't have any others logs warning but the file pg_stat.stat in
> the mounting point is not created... I tryed before on a test environment
> and it works...
>
> If you have any ideas...
> Thanks a lot.
> Regards,
> Math
>
>
>
> 2013/5/24 Michael Paquier 
>
>>
>>
>>
>> On Thu, May 23, 2013 at 9:31 PM, Mathieu Guerin <
>> mathieu.gueri...@gmail.com> wrote:
>>
>>> What are the consequences ? Because this file will be remove if the
>>> server reboot.
>>>
>> Those temporary statistics are stored in global directory when server
>> shuts down, so the risk here would be to lose a portion of this data in the
>> case of a crash, either at PG or at OS level.
>>
>>
>>> If we change the parameter stats_temp_directory is it necessary to
>>> reboot the server ?
>>>
>> No, sending SIGHUP to the server is enough.
>>
>>
>>> When I lauch a SHOW ALL; command, the parameter stats_temp_director is
>>> not here.
>>>
>> You should get it...
>> stats_temp_directory|
>> pg_stat_tmp   | Writes temporary
>> statistics files to the specified directory.
>>  --
>> Michael
>>
>
>


Re: [HACKERS] WARNING : pgstat wait timeout - Postgres 9.1

2013-05-24 Thread Mathieu Guerin
Hello,

Thanks a lot for your answers.

> You should get it...
> stats_temp_directory   |
pg_stat_tmp   | Writes temporary
statistics files to the specified directory.

I don't know why i don't get it. I am in 9.1 version...

Moreover, when I mount pg_stat_tmp in a tmpfs, the warning messages
decrease  the warning messages decrease from 1 each minutes to 1 each five
secondes. I don't have any others logs warning but the file pg_stat.stat in
the mounting point is not created... I tryed before on a test environment
and it works...

If you have any ideas...
Thanks a lot.
Regards,
Math



2013/5/24 Michael Paquier 

>
>
>
> On Thu, May 23, 2013 at 9:31 PM, Mathieu Guerin <
> mathieu.gueri...@gmail.com> wrote:
>
>> What are the consequences ? Because this file will be remove if the
>> server reboot.
>>
> Those temporary statistics are stored in global directory when server
> shuts down, so the risk here would be to lose a portion of this data in the
> case of a crash, either at PG or at OS level.
>
>
>> If we change the parameter stats_temp_directory is it necessary to
>> reboot the server ?
>>
> No, sending SIGHUP to the server is enough.
>
>
>> When I lauch a SHOW ALL; command, the parameter stats_temp_director is
>> not here.
>>
> You should get it...
> stats_temp_directory|
> pg_stat_tmp   | Writes temporary
> statistics files to the specified directory.
>  --
> Michael
>


Re: [HACKERS] WARNING : pgstat wait timeout - Postgres 9.1

2013-05-23 Thread Michael Paquier
On Thu, May 23, 2013 at 9:31 PM, Mathieu Guerin
wrote:

> What are the consequences ? Because this file will be remove if the server
> reboot.
>
Those temporary statistics are stored in global directory when server shuts
down, so the risk here would be to lose a portion of this data in the case
of a crash, either at PG or at OS level.


> If we change the parameter stats_temp_directory is it necessary to reboot
> the server ?
>
No, sending SIGHUP to the server is enough.


> When I lauch a SHOW ALL; command, the parameter stats_temp_director is
> not here.
>
You should get it...
stats_temp_directory|
pg_stat_tmp   | Writes temporary
statistics files to the specified directory.
-- 
Michael


Re: [HACKERS] WARNING : pgstat wait timeout - stats_temp_directory - postgres 9.1

2013-05-23 Thread Alvaro Herrera
Mathieu Guerin escribió:
> Hello,
> 
> I am facing a problem with pgstat as my subject says. I known, some topics
> are open about that, but I would like to go deeper.
> 
> Some person told that the better way to don't have this message anymore is
> to configure pgstat.stat to be loaded in the RAM with a tmpfs mount point.
> 
> What are the consequences ? Because this file will be remove if the server
> reboot.

There are two separate files, one is the temp file which is used while
the server is running and is written very frequently.  You put that one
on volatile storage (stats_temp_directory) and immediately see a
performance benefit.

The other one is the permanent file, which is written only once when the
system is shutting down.  This is not put in stats_temp_directory, so
it's safe.

In case of a crash (the server didn't have the chance to write the
permanent file), stats would be reset anyway at restart, so there's no
conceptual problem with the permanent file not being written.

> If we change the parameter stats_temp_directory is it necessary to reboot
> the server ?

No, a reload (pg_ctl reload) is sufficient.

-- 
Álvaro Herrerahttp://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] WARNING: pgstat wait timeout

2010-01-29 Thread Magnus Hagander
2010/1/29 Greg Smith :
> I just found a few of these errors in a log file during some pgbench testing 
> tonight.  Linux, recent CVS HEAD; given the range of systems and versions 
> this has been reported against now, this bug doesn't look like a platform or 
> version/build specific issue.
>
> Unfortunately the instance I had up wasn't setup very well for logging, but I 
> did notice that all of the ones I saw had nearby messages about autovacuum 
> issues, which seems to match Tom's earlier suggestion at 
> http://archives.postgresql.org/pgsql-bugs/2009-07/msg00083.php that the 
> source of the warning (but not necessarily the underlying problem) for these 
> is the autovacuum launcher complaining; here's two different sets:
>
> ERROR:  canceling autovacuum task
> CONTEXT:  automatic analyze of table "pgbench.public.pgbench_accounts"
> WARNING:  pgstat wait timeout
> WARNING:  pgstat wait timeout
> ERROR:  canceling autovacuum task
> CONTEXT:  automatic analyze of table "pgbench.public.pgbench_accounts"
>
> WARNING:  pgstat wait timeout
> ERROR:  canceling autovacuum task
> CONTEXT:  automatic analyze of table "pgbench.public.pgbench_accounts"
> ERROR:  canceling autovacuum task
> CONTEXT:  automatic analyze of table "pgbench.public.pgbench_accounts"
>
> Because of what I'm (not) seeing in pg_stat_bgwriter, I'm suspicious that its 
> underlying work or messages may be involved here.  I'm not seeing the sort of 
> totals I expect in that view after these large bouts of activity.  Now, my 
> use tonight has included the new pg_stat_reset_shared('bgwriter') to clear 
> out those stats between runs, so perhaps that's involved too.  Guessing not 
> only because of the reports going back to 8.4 that also have this error 
> message.
>
> Will keep an eye out for this one now that I know I might run into it, have 
> already cranked up the logging and will look for something reproducible to 
> gather more info.

I've seen this happen semi-frequently during initdb on win32 on an
Amazon EC2 image. I attributed it to the combination of windows and
overloaded virtualization, but it may just be that it shows up more
often there.

-- 
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] WARNING: pgstat wait timeout

2010-01-28 Thread Greg Smith
I just found a few of these errors in a log file during some pgbench 
testing tonight.  Linux, recent CVS HEAD; given the range of systems and 
versions this has been reported against now, this bug doesn't look like 
a platform or version/build specific issue.


Unfortunately the instance I had up wasn't setup very well for logging, 
but I did notice that all of the ones I saw had nearby messages about 
autovacuum issues, which seems to match Tom's earlier suggestion at 
http://archives.postgresql.org/pgsql-bugs/2009-07/msg00083.php that the 
source of the warning (but not necessarily the underlying problem) for 
these is the autovacuum launcher complaining; here's two different sets:


ERROR:  canceling autovacuum task
CONTEXT:  automatic analyze of table "pgbench.public.pgbench_accounts"
WARNING:  pgstat wait timeout
WARNING:  pgstat wait timeout
ERROR:  canceling autovacuum task
CONTEXT:  automatic analyze of table "pgbench.public.pgbench_accounts"

WARNING:  pgstat wait timeout
ERROR:  canceling autovacuum task
CONTEXT:  automatic analyze of table "pgbench.public.pgbench_accounts"
ERROR:  canceling autovacuum task
CONTEXT:  automatic analyze of table "pgbench.public.pgbench_accounts"

Because of what I'm (not) seeing in pg_stat_bgwriter, I'm suspicious 
that its underlying work or messages may be involved here.  I'm not 
seeing the sort of totals I expect in that view after these large bouts 
of activity.  Now, my use tonight has included the new 
pg_stat_reset_shared('bgwriter') to clear out those stats between runs, 
so perhaps that's involved too.  Guessing not only because of the 
reports going back to 8.4 that also have this error message.


Will keep an eye out for this one now that I know I might run into it, 
have already cranked up the logging and will look for something 
reproducible to gather more info.


--
Greg Smith2ndQuadrant   Baltimore, MD
PostgreSQL Training, Services and Support
g...@2ndquadrant.com  www.2ndQuadrant.com


--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] WARNING: pgstat wait timeout

2010-01-21 Thread Matteo Beccati

Il 21/01/2010 03:33, Jaime Casanova ha scritto:

On Wed, Jan 20, 2010 at 9:32 PM, Jaime Casanova
  wrote:

On Wed, Jan 20, 2010 at 6:20 PM, Sergey E. Koposov  wrote:

Hello hackers,

I've recently hit the message "WARNING:  pgstat wait timeout" with PG 8.4.2.


i see the same yesterday when initdb a freshly compiled 8.5dev +
lock_timeout patch
i thought maybe it was related to that patch and was thinking in
recompile without the patch but hadn't time, obviously i was wrong



ah! i forgot to say that it was on win32 + mingw, to confirme that
patch works fin in that os


I've seen it a few days ago with 8.5alpha3 on NetBSD when I left the 
backend running for a few days. Backend was completely inactive but the 
massage was repeated 3-4 times. Googling didn't help and I didnt' know 
how to replicate it.



Cheers
--
Matteo Beccati

Development & Consulting - http://www.beccati.com/

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] WARNING: pgstat wait timeout

2010-01-20 Thread Jaime Casanova
On Wed, Jan 20, 2010 at 9:32 PM, Jaime Casanova
 wrote:
> On Wed, Jan 20, 2010 at 6:20 PM, Sergey E. Koposov  wrote:
>> Hello hackers,
>>
>> I've recently hit the message "WARNING:  pgstat wait timeout" with PG 8.4.2.
>
> i see the same yesterday when initdb a freshly compiled 8.5dev +
> lock_timeout patch
> i thought maybe it was related to that patch and was thinking in
> recompile without the patch but hadn't time, obviously i was wrong
>

ah! i forgot to say that it was on win32 + mingw, to confirme that
patch works fin in that os

-- 
Atentamente,
Jaime Casanova
Soporte y capacitación de PostgreSQL
Asesoría y desarrollo de sistemas
Guayaquil - Ecuador
Cel. +59387171157

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] WARNING: pgstat wait timeout

2010-01-20 Thread Jaime Casanova
On Wed, Jan 20, 2010 at 6:20 PM, Sergey E. Koposov  wrote:
> Hello hackers,
>
> I've recently hit the message "WARNING:  pgstat wait timeout" with PG 8.4.2.

i see the same yesterday when initdb a freshly compiled 8.5dev +
lock_timeout patch
i thought maybe it was related to that patch and was thinking in
recompile without the patch but hadn't time, obviously i was wrong

-- 
Atentamente,
Jaime Casanova
Soporte y capacitación de PostgreSQL
Asesoría y desarrollo de sistemas
Guayaquil - Ecuador
Cel. +59387171157

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers