BUG #1707: statistics collector starts with stats_start_collector = false

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

BUG #1707: statistics collector starts with stats_start_collector = false

Federico Di Gregorio

The following bug has been logged online:

Bug reference:      1707
Logged by:          Federico Di Gregorio
Email address:      [hidden email]
PostgreSQL version: 7.4.8
Operating system:   Debian GNU/Linux
Description:        statistics collector starts with stats_start_collector =
false
Details:

If the following combinatio of parameters is used:

stats_start_collector = false
stats_row_level = true

the collector process is started even if the documentation says that "The
parameter stats_start_collector must be set to true for the statistics
collector to be launched at all."

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
      joining column's datatypes do not match
Reply | Threaded
Open this post in threaded view
|

Re: BUG #1707: statistics collector starts with stats_start_collector = false

Tom Lane-2
"Federico Di Gregorio" <[hidden email]> writes:
> If the following combinatio of parameters is used:

> stats_start_collector = false
> stats_row_level = true

> the collector process is started even if the documentation says that "The
> parameter stats_start_collector must be set to true for the statistics
> collector to be launched at all."

I believe stats_start_collector is forced on if any of the subsidiary
parameters is set.  Isn't that what you want?

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq
Reply | Threaded
Open this post in threaded view
|

Re: BUG #1707: statistics collector starts with stats_start_collector

Bruce Momjian-2
Tom Lane wrote:

> "Federico Di Gregorio" <[hidden email]> writes:
> > If the following combinatio of parameters is used:
>
> > stats_start_collector = false
> > stats_row_level = true
>
> > the collector process is started even if the documentation says that "The
> > parameter stats_start_collector must be set to true for the statistics
> > collector to be launched at all."
>
> I believe stats_start_collector is forced on if any of the subsidiary
> parameters is set.  Isn't that what you want?

If that is the logic, why do we have stats_start_collector at all?
Seems we either should honor it, or remove it.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  [hidden email]               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster
Reply | Threaded
Open this post in threaded view
|

Re: BUG #1707: statistics collector starts with stats_start_collector = false

Tom Lane-2
Bruce Momjian <[hidden email]> writes:
> If that is the logic, why do we have stats_start_collector at all?

Ask Jan ;-)

I can see some advantage to it as a way of finding out whether the
collector was started or not ... but if that's the intent, we
should make it non user-writable.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings
Reply | Threaded
Open this post in threaded view
|

Re: BUG #1707: statistics collector starts with stats_start_collector

Bruce Momjian-2
Tom Lane wrote:
> Bruce Momjian <[hidden email]> writes:
> > If that is the logic, why do we have stats_start_collector at all?
>
> Ask Jan ;-)
>
> I can see some advantage to it as a way of finding out whether the
> collector was started or not ... but if that's the intent, we
> should make it non user-writable.

I can see someone turning it off but leaving other options on because
they will want to turn them on later.  I think our current behavior is
broken.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  [hidden email]               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to [hidden email] so that your
      message can get through to the mailing list cleanly
Reply | Threaded
Open this post in threaded view
|

Re: BUG #1707: statistics collector starts with stats_start_collector = false

Tom Lane-2
Bruce Momjian <[hidden email]> writes:
> I can see someone turning it off but leaving other options on because
> they will want to turn them on later.

"later" when?  It's not useful to try to turn on stats_start_collector
after postmaster start, because the UDP socket won't exist.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

               http://archives.postgresql.org
Reply | Threaded
Open this post in threaded view
|

Re: BUG #1707: statistics collector starts with stats_start_collector

Bruce Momjian-2
Tom Lane wrote:
> Bruce Momjian <[hidden email]> writes:
> > I can see someone turning it off but leaving other options on because
> > they will want to turn them on later.
>
> "later" when?  It's not useful to try to turn on stats_start_collector
> after postmaster start, because the UDP socket won't exist.

Later such as in a later postmaster start, but personally I would just
remove the option completely.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  [hidden email]               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend
Reply | Threaded
Open this post in threaded view
|

Re: BUG #1707: statistics collector starts with stats_start_collector = false

Tom Lane-2
Bruce Momjian <[hidden email]> writes:
> Later such as in a later postmaster start, but personally I would just
> remove the option completely.

I don't have a problem with removing it as a writable option ... but
I'm thinking we should leave it as a read-only GUC parameter (like
the several others we have already).  Otherwise we'll need to add some
other method of finding out whether the collector is running.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: BUG #1707: statistics collector starts with stats_start_collector

Bruce Momjian-2
Tom Lane wrote:
> Bruce Momjian <[hidden email]> writes:
> > Later such as in a later postmaster start, but personally I would just
> > remove the option completely.
>
> I don't have a problem with removing it as a writable option ... but
> I'm thinking we should leave it as a read-only GUC parameter (like
> the several others we have already).  Otherwise we'll need to add some
> other method of finding out whether the collector is running.

Why would a user care?  They either are gathering such statistics, or
they are not.  I think the only issue is that you can't turn on certain
options after postmaster start unless the stats collector is running ---
is that the issue?

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  [hidden email]               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings
Reply | Threaded
Open this post in threaded view
|

Re: BUG #1707: statistics collector starts with stats_start_collector = false

Tom Lane-2
Bruce Momjian <[hidden email]> writes:
> Tom Lane wrote:
>> I don't have a problem with removing it as a writable option ... but
>> I'm thinking we should leave it as a read-only GUC parameter (like
>> the several others we have already).  Otherwise we'll need to add some
>> other method of finding out whether the collector is running.

> Why would a user care?

luser> It's not collecting statistics!

us> Is the collector running?

luser> How should I know?

us> er ...

If we don't have a way to check this, we'll regret it soon enough...
now maybe a GUC setting isn't the optimal way, but I think we need
*some* way besides ps.  ps doesn't work remotely and I think there's
no simple equivalent under Windows either.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
      joining column's datatypes do not match
Reply | Threaded
Open this post in threaded view
|

Re: BUG #1707: statistics collector starts with stats_start_collector

Bruce Momjian-2
Tom Lane wrote:

> Bruce Momjian <[hidden email]> writes:
> > Tom Lane wrote:
> >> I don't have a problem with removing it as a writable option ... but
> >> I'm thinking we should leave it as a read-only GUC parameter (like
> >> the several others we have already).  Otherwise we'll need to add some
> >> other method of finding out whether the collector is running.
>
> > Why would a user care?
>
> luser> It's not collecting statistics!
>
> us> Is the collector running?
>
> luser> How should I know?
>
> us> er ...
>
> If we don't have a way to check this, we'll regret it soon enough...
> now maybe a GUC setting isn't the optimal way, but I think we need
> *some* way besides ps.  ps doesn't work remotely and I think there's
> no simple equivalent under Windows either.

Sure, but the GUC only reports that it thinks the stats collector
started, not whether it is running or not.  I think 'ps' is a fine way
to tell.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  [hidden email]               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
      joining column's datatypes do not match
Reply | Threaded
Open this post in threaded view
|

Re: BUG #1707: statistics collector starts with stats_start_collector

Andreas Pflug
Bruce Momjian wrote:

>>
>>If we don't have a way to check this, we'll regret it soon enough...
>>now maybe a GUC setting isn't the optimal way, but I think we need
>>*some* way besides ps.  ps doesn't work remotely and I think there's
>>no simple equivalent under Windows either.
>
>
> Sure, but the GUC only reports that it thinks the stats collector
> started, not whether it is running or not.  I think 'ps' is a fine way
> to tell.

Um, no such beast under win32. You can only see some postgres processes,
but can't distinguish them. We'd need some functions that examine the
pids known to the postmaster (pg_get_collector_pid, pg_get_logger_pid, ...)

Regards,
Andreas

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend