pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ross J. Reedstrom <reedstrm@rice.edu>
To: Kevin Grittner <Kevin.Grittner@wicourts.gov>
Cc: Greg Smith <greg@2ndquadrant.com>
Cc: Scott Marlowe <scott.marlowe@gmail.com>
Cc: felix <crucialfelix@gmail.com>
Cc: Marti Raudsepp <marti@juffo.org>
Cc: sthomas@peak6.com, "pgsql-performance@postgresql.org" <pgsql-performance@postgresql.org>
Cc: Maciek Sakrejda <msakrejda@truviso.com>
Subject: Re: Really really slow select count(*)
Date: Wed, 16 Feb 2011 10:28:32 -0600
Message-ID: <20110216162832.GA17015@rice.edu> (raw)
In-Reply-To: <4D5166BF020000250003A672@gw.wicourts.gov>
References: <AANLkTimnFc-hKG+PFEfwBPLAoK6q9kx=nc_4Fr++C_QB@mail.gmail.com>
	<D247E79EFD801E40A9449A9724F6295B0474BBF807@spswchi6mail1.peak6.net>
	<AANLkTiknh-snZvy4_PzS9CgVfNCH3RTS+V=COWVOnTNo@mail.gmail.com>
	<4D5151C6.7040109@peak6.com>
	<AANLkTinaaVonows3OzN3dVNZQyqhLMVYv8M0Y0Cg73H_@mail.gmail.com>
	<4D511C99020000250003A62D@gw.wicourts.gov>
	<AANLkTi=uh-zScT=LcYQ6kXDXCpmMZoAeiO4hqk0=WWSt@mail.gmail.com>
	<4D51A304.4070003@2ndquadrant.com>
	<AANLkTikFaJsaR_4M8rw4Wwyu_N+5yx2+7MQOZgXPt-kX@mail.gmail.com>
	<4D5166BF020000250003A672@gw.wicourts.gov>

On Tue, Feb 08, 2011 at 03:52:31PM -0600, Kevin Grittner wrote:
> Scott Marlowe <scott.marlowe@gmail.com> wrote:
> > Greg Smith <greg@2ndquadrant.com> wrote:
>  
> >> Kevin and I both suggested a "fast plus timeout then immediate"
> >> behavior is what many users seem to want.
>  
> > Are there any settings in postgresql.conf that would make it
> > unsafe to use -m immediate?
>  
> I don't think so.  There could definitely be problems if someone
> cuts power before your shutdown completes, though.  (I hear that
> those firefighters like to cut power to a building before they grab
> those big brass nozzles to spray a stream of water into a building. 
> Go figure...)

Following you off topic, I know of one admin type who has stated "I don't
care what sort of fine the power company wants to give me, if my
property's on fire, I'm going to pull the meter, in order to hand it to
the first responder, rather than have them sit there waiting for the
power tech to arrive while my house burns."

Back on topic, I like the the idea of a timed escalation. That means
there's two things to configure though, timeout(s?) and the set of
states to escalate through. I can see different use cases for different
sets. Hmmm:

pg_ctl -m s:10:f:5:i restart

for smart, 5 sec. timeout, escalate to fast, 5 sec., then immediate?
Not sure how rhat would interact w/ -t.

Perhaps:

pg_ctl -t 10 -m s -t 5 -m f -m i restart

Some video-processing tools do things like that: the order of options
impacts their interaction.

Ross
-- 
Ross Reedstrom, Ph.D.                                 reedstrm@rice.edu
Systems Engineer & Admin, Research Scientist        phone: 713-348-6166
Connexions                  http://cnx.org            fax: 713-348-3665
Rice University MS-375, Houston, TX 77005
GPG Key fingerprint = F023 82C8 9B0E 2CC6 0D8E  F888 D3AE 810E 88F0 BEDE






view thread (66+ messages)  latest in thread

Message-ID: <20110216162832.GA17015@rice.edu>
Permalink:  ../20110216162832.GA17015@rice.edu/
Also on:    postgresql.org/message-id/20110216162832.GA17015@rice.edu

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: reedstrm@rice.edu, Kevin.Grittner@wicourts.gov, greg@2ndquadrant.com, scott.marlowe@gmail.com, crucialfelix@gmail.com, marti@juffo.org, msakrejda@truviso.com
  Subject: Re: Really really slow select count(*)
  In-Reply-To: <20110216162832.GA17015@rice.edu>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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