Re: Really really slow select count(*)

From: Maciek Sakrejda <msakrejda(at)truviso(dot)com>
To: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
Cc: Marti Raudsepp <marti(at)juffo(dot)org>, Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, sthomas(at)peak6(dot)com, felix <crucialfelix(at)gmail(dot)com>, "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Really really slow select count(*)
Date: 2011-02-08 17:58:27
Message-ID: AANLkTim70HErKpVTgTgbwL3+nLy23QbR-LpSe3vvtQ8T@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

>> I couldn't find any past discussions about changing the default to "fast".
>> Are there any reasons why that cannot be done in a future release?
>
> Or at least throw a hint the user's way that -m fast might be needed.

I think there are several issues here:

1. Does pg_ctl give a clear indication of the outcome of a failed
"smart" mode shutdown?
2. Is the current "smart" shutdown mode behavior useful?
3. Should the default shutdown mode be changed to "fast"?

I think felix mainly complained about (1), and that's what I was
talking about as well. The current message (I have only an 8.3 handy,
but I don't imagine this has changed much) is:

pg_ctl stop -t5
waiting for server to shut down........ failed
pg_ctl: server does not shut down

This leaves out crucial information (namely, "but it will stop
accepting new connections and shut down when all current connections
are closed"). It seems like something along those lines should be
added to the error message, or perhaps at least to pg_ctl
documentation. Currently, the docs page (
http://www.postgresql.org/docs/current/static/app-pg-ctl.html ) only
hints at this, and pg_ctl --help does not really mention this at all.

Of the two other issues, (3) seems reasonable (I have no strong
feelings there either way), and (2) is probably a moot point (the
behavior won't change in a backward-incompatible manner now, and if
it's dethroned as default, that doesn't really matter).

---
Maciek Sakrejda | System Architect | Truviso

1065 E. Hillsdale Blvd., Suite 215
Foster City, CA 94404
(650) 242-3500 Main
www.truviso.com

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Kevin Grittner 2011-02-08 19:00:37 Re: Really really slow select count(*)
Previous Message Scott Marlowe 2011-02-08 17:31:25 Re: Really really slow select count(*)