Re: [HACKERS] Mini improvement: statement_cost_limit

2008-08-03 Thread daveg
On Sat, Aug 02, 2008 at 09:30:08PM +0200, Hans-Jürgen Schönig wrote: > On Aug 2, 2008, at 8:38 PM, Tom Lane wrote: > > >Andrew Dunstan <[EMAIL PROTECTED]> writes: > >>Hans-Jürgen Schönig wrote: > >>>i introduced a GUC called statement_cost_limit which can be used to > >>>error out if a statement i

Re: [HACKERS] Parsing of pg_hba.conf and authentication inconsistencies

2008-08-03 Thread Magnus Hagander
Tom Lane wrote: > Robert Treat <[EMAIL PROTECTED]> writes: >> Certainly there isn't any reason to allow a reload of a file that is just >> going to break things when the first connection happens. For that matter, >> why would we ever not want to parse it at HUP time rather than connect time? >

Re: [HACKERS] Parsing of pg_hba.conf and authentication inconsistencies

2008-08-03 Thread Magnus Hagander
Tom Lane wrote: > Magnus Hagander <[EMAIL PROTECTED]> writes: >>> The good way to solve this would be to have independant command line >>> utilities which check pg_hba.conf, pg_ident.conf and postgresql.conf for >>> errors. Then DBAs could run a check *before* restarting the server. > >> While cl

Re: [HACKERS] Auto-explain patch

2008-08-03 Thread Dean Rasheed
Thanks for the feedback, and sorry for my delay in replying (I was on holiday). > Tom Lane wrote: > > Comments: > > I do not think that you should invent a new elog level for this, and > especially not one that is designed to send unexpected messages to the > client. Having to kluge tab completio

Re: [HACKERS] Parsing of pg_hba.conf and authentication inconsistencies

2008-08-03 Thread Gregory Stark
"Tom Lane" <[EMAIL PROTECTED]> writes: > Robert Treat <[EMAIL PROTECTED]> writes: >> Certainly there isn't any reason to allow a reload of a file that is just >> going to break things when the first connection happens. For that matter, >> why would we ever not want to parse it at HUP time rathe

Re: [HACKERS] Parsing of pg_hba.conf and authentication inconsistencies

2008-08-03 Thread Stephen Frost
* Magnus Hagander ([EMAIL PROTECTED]) wrote: > For pg_hba.conf, I don't see that as a very big problem, really. It > doesn't (and shouldn't) modify any "external" variables, so it should be > as simple as parsing the new file into a completely separate > list-of-structs and only if it's all correct

Re: [HACKERS] Parsing of pg_hba.conf and authentication inconsistencies

2008-08-03 Thread Magnus Hagander
Stephen Frost wrote: > * Magnus Hagander ([EMAIL PROTECTED]) wrote: >> For pg_hba.conf, I don't see that as a very big problem, really. It >> doesn't (and shouldn't) modify any "external" variables, so it should be >> as simple as parsing the new file into a completely separate >> list-of-structs a

Re: [HACKERS] Parsing of pg_hba.conf and authentication inconsistencies

2008-08-03 Thread Stephen Frost
* Magnus Hagander ([EMAIL PROTECTED]) wrote: > I think it'd be reasonable to refuse starting if the config is *known > broken* (such as containing lines that are unparseable, or that contain > completely invalid tokens), whereas you'd start if they just contain > things that are "probably wrong". B

Re: [HACKERS] Parsing of pg_hba.conf and authentication inconsistencies

2008-08-03 Thread Stephen Frost
* Magnus Hagander ([EMAIL PROTECTED]) wrote: > Stephen Frost wrote: > > A little extra code in the backend is well worth fixing this foot-gun. > > The concerns raised so far have been "who will write it?" and "what if > > it has bugs?". Neither of these are particularly compelling arguments > > wh

Re: [HACKERS] Mini improvement: statement_cost_limit

2008-08-03 Thread Simon Riggs
On Sun, 2008-08-03 at 00:44 -0700, daveg wrote: > On Sat, Aug 02, 2008 at 09:30:08PM +0200, Hans-Jürgen Schönig wrote: > > On Aug 2, 2008, at 8:38 PM, Tom Lane wrote: > > > > >Andrew Dunstan <[EMAIL PROTECTED]> writes: > > >>Hans-Jürgen Schönig wrote: > > >>>i introduced a GUC called statement_co

Re: [HACKERS] small bug in hlCover

2008-08-03 Thread Sushant Sinha
Has any one noticed this? -Sushant. On Wed, 2008-07-16 at 23:01 -0400, Sushant Sinha wrote: > I think there is a slight bug in hlCover function in wparser_def.c > > If there is only one query item and that is the first word in the text, > then hlCover does not returns any cover. This is evident

Re: [HACKERS] Mini improvement: statement_cost_limit

2008-08-03 Thread Hans-Jürgen Schönig
hello ... I still support it. Regrettably, many SQL developers introduce product joins and other unintentional errors. Why let problem queries through? i think the killer is that we don't have to wait until the query dies with a statement_timeout. it is ways more elegant to kill things be

Re: [HACKERS] patch: Add a separate TRUNCATE permission

2008-08-03 Thread Simon Riggs
On Tue, 2008-07-29 at 09:03 -0400, Stephen Frost wrote: > * Peter Eisentraut ([EMAIL PROTECTED]) wrote: > > Am Tuesday, 29. July 2008 schrieb Stephen Frost: > > > I'd certainly like to see a truncate permission, I wrote a patch for it > > > myself back in January of 2006. That thread starts here:

Re: [HACKERS] Mini improvement: statement_cost_limit

2008-08-03 Thread Simon Riggs
On Sun, 2008-08-03 at 22:09 +0200, Hans-Jürgen Schönig wrote: > > Another alternative would be to have a plugin that can examine the > > plan > > immediately after planner executes, so you can implement this > > yourself, > > plus some other possibilities. > > > this would be really fancy. >

[HACKERS] unnecessary code in_bt_split

2008-08-03 Thread Zdenek Kotala
I found that _bt_split function calls PageGetTempPage, but next call is _bt_page_init which clear all contents anyway. Is there any reason to call PageGetTempPage instead of palloc? Original code: 00796 leftpage = PageGetTempPage(origpage, sizeof(BTPageOpaqueData)); 00797 rightpage = B

Re: [HACKERS] unnecessary code in_bt_split

2008-08-03 Thread Tom Lane
Zdenek Kotala <[EMAIL PROTECTED]> writes: > I found that _bt_split function calls PageGetTempPage, but next call is > _bt_page_init which clear all contents anyway. Is there any reason to call > PageGetTempPage instead of palloc? Not violating a perfectly good abstraction? I agree that PageGetT

Re: [HACKERS] Mini improvement: statement_cost_limit

2008-08-03 Thread Josh Berkus
Tom, > Wasn't this exact proposal discussed and rejected awhile back? We rejected Greenplum's much more invasive resource manager, because it created a large performance penalty on small queries whether or not it was turned on. However, I don't remember any rejection of an idea as simple as a

Re: [HACKERS] Instructions for adding new catalog

2008-08-03 Thread Gustavo Tonini
Thanks for reply, Tom. Well, just for documenting the process... Adding new postgres catalog in 2 little steps: 1)Write catalog header file and save it into "src/include/catalog" directory. Hint: copy format from other catalog headers. 2)Add your header file name to variable POSTGRES_BKI_SRCS in f

Re: [HACKERS] Mini improvement: statement_cost_limit

2008-08-03 Thread Robert Treat
On Sunday 03 August 2008 15:12:22 Simon Riggs wrote: > On Sun, 2008-08-03 at 00:44 -0700, daveg wrote: > > On Sat, Aug 02, 2008 at 09:30:08PM +0200, Hans-Jürgen Schönig wrote: > > > On Aug 2, 2008, at 8:38 PM, Tom Lane wrote: > > > >Andrew Dunstan <[EMAIL PROTECTED]> writes: > > > >>Hans-Jürgen Sch

Re: [HACKERS] Instructions for adding new catalog

2008-08-03 Thread Tom Lane
"Gustavo Tonini" <[EMAIL PROTECTED]> writes: > Well, just for documenting the process... > Adding new postgres catalog in 2 little steps: > 1)Write catalog header file and save it into "src/include/catalog" > directory. Hint: copy format from other catalog headers. > 2)Add your header file name to

Re: [HACKERS] small bug in hlCover

2008-08-03 Thread Sushant Sinha
On Mon, 2008-08-04 at 00:36 -0300, Euler Taveira de Oliveira wrote: > Sushant Sinha escreveu: > > I think there is a slight bug in hlCover function in wparser_def.c > > > The bug is not in the hlCover. In prsd_headline, if we didn't find a > suitable bestlen (i.e. >= 0), than it includes up to do

Re: [HACKERS] Mini improvement: statement_cost_limit

2008-08-03 Thread Mark Kirkwood
Josh Berkus wrote: Tom, Wasn't this exact proposal discussed and rejected awhile back? We rejected Greenplum's much more invasive resource manager, because it created a large performance penalty on small queries whether or not it was turned on. However, I don't remember any rejecti