Re: count(*) performance improvement ideas - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: count(*) performance improvement ideas
Date
Msg-id 20080416093838.55834d92@mha-laptop
Whole thread Raw
In response to Re: count(*) performance improvement ideas  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: count(*) performance improvement ideas
List pgsql-hackers
Tom Lane wrote:
> "Stephen Denne" <Stephen.Denne@datamail.co.nz> writes:
> > From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
> >> As for 2) and 3), can't you look into the pg_settings view?
> 
> > pg_settings view doesn't contain custom variables created on the
> > fly,
> 
> Really?  [ pokes around ... ]  Hm, you're right, because
> add_placeholder_variable() sets the GUC_NO_SHOW_ALL flag, and in this
> usage it'll never be cleared.  I wonder if we should change that.
> 
> The whole thing is a bit of an abuse of what the mechanism was
> intended for, and so I'm not sure we should rejigger GUC's behavior
> to make it more pleasant, but on the other hand if we're not ready to
> provide a better substitute ...

While I agree with that part, is there any actual *reason* why we
shouldn't have the custom variables included in pg_settings? ISTM that
it would be usable in cases that aren't an abuse as well...

//Magnus


pgsql-hackers by date:

Previous
From: Zdenek Kotala
Date:
Subject: Re: WIP: Pg_upgrade - page layout converter (PLC) hook
Next
From: Magnus Hagander
Date:
Subject: Re: pg_terminate_backend() issues