Re: [HACKERS] [PATCHES] default database creation with initdb

2005-06-20 Thread Michael Paesold
Tom Lane wrote: Another point is that Dave added code to pg_dumpall to not dump the postgres database. This seems mistaken to me, so I did not include it in the applied patch: if someone is doing real work in postgres then they'll be pretty annoyed if it's not backed up. But perhaps the questio

Re: [HACKERS] [PATCHES] O_DIRECT for WAL writes

2005-06-20 Thread ITAGAKI Takahiro
Hi all, O_DIRECT for WAL writes was discussed at http://archives.postgresql.org/pgsql-patches/2005-06/msg00064.php but I have some items that want to be discussed, so I would like to re-post it to HACKERS. Bruce Momjian wrote: > I think the conclusion from the discussion is that O_DIRECT is in

Re: [HACKERS] Escape handling in strings

2005-06-20 Thread Oliver Jowett
Bruce Momjian wrote: > I have received very few replies to my suggestion that we implement E'' > for escaped strings, so eventually, after a few major releases, we can > have '' treat backslashes literally like the SQL standard requires. Just checking: with this plan, a client needs to know what

[HACKERS] Escape handling in strings

2005-06-20 Thread Bruce Momjian
[ BCC to general. ] I have received very few replies to my suggestion that we implement E'' for escaped strings, so eventually, after a few major releases, we can have '' treat backslashes literally like the SQL standard requires. I assume this is because most people say, "yea, it is going to be

[HACKERS] Autovacuum Patch Status

2005-06-20 Thread Matthew T. O'Connor
Sorry to do this on the hackers list, but I have tried to email Alvaro off-list and my email keeps getting bounced so Alvaro, I was just wondering what the current status of your work with the Autovacuum patch is. Also, if you would like to discuss anything and also if I can help you. M

Re: [HACKERS] [PATCHES] default database creation with initdb

2005-06-20 Thread Tom Lane
"Dave Page" writes: > OK, new patch posted to -patches that updates all the utilities as well. Applied. One thing that neither Dave nor I wanted to touch is pg_autovacuum. If that gets integrated into the backend by feature freeze then the question is moot, but if it doesn't then we'll have to d

[HACKERS] Schedule for 8.1 feature freeze

2005-06-20 Thread Bruce Momjian
We have addressed all the open issues for 8.1 except for auto-vacuum, which Alvaro is working on, so I think we are ready for a feature freeze on July 1. -- Bruce Momjian| http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life

Re: [HACKERS] query plan ignoring check constraints

2005-06-20 Thread Josh Berkus
Folks, > Any discussions at the level of changing infomask bits definitely belong > on -hackers. Do not be too surprised if you get an unfriendly reception > when you post low-level changes to -patches that were never previously > discussed on -hackers ... Oh, I'm not expecting this to make it i

Re: [HACKERS] query plan ignoring check constraints

2005-06-20 Thread Tom Lane
Christopher Kings-Lynne <[EMAIL PROTECTED]> writes: >> This is called "range partitioning". We're working on it. You're welcome >> to >> join the Bizgres project where most of the discussion on this feature takes >> place: >> www.bizgres.org >> http://pgfoundry.org/mail/?group_id=1000107 > I

Re: [HACKERS] query plan ignoring check constraints

2005-06-20 Thread Christopher Kings-Lynne
Doh, sorry for coming off sounding like a knob here...my point is that it's not like you guys are some sort of rogue faction implementing range partitioning against the wishes of "the Man" - it's something that I think we all agree we want in the backend, so I don't see why you are making it ha

Re: [HACKERS] query plan ignoring check constraints

2005-06-20 Thread Andrew Dunstan
Josh Berkus said: > KL- > >> I still think the fact that that discussion is taking place on a >> completely non-hackers mailing list is the lamest thing ever... > > What, like phpPgAdmin? ;-) > Josh, That is not an appropriate analogy at all - range partitioning is an inherently server-side feat

Re: [HACKERS] query plan ignoring check constraints

2005-06-20 Thread Christopher Kings-Lynne
I still think the fact that that discussion is taking place on a completely non-hackers mailing list is the lamest thing ever... What, like phpPgAdmin? ;-) Erm. Last time I checked phpPgAdmin was a userland application, using PHP and libpq. Bizgres is proposing modifying PostgreSQL itsel

Re: [HACKERS] query plan ignoring check constraints

2005-06-20 Thread Gavin Sherry
On Mon, 20 Jun 2005, Josh Berkus wrote: > KL- > > > I still think the fact that that discussion is taking place on a > > completely non-hackers mailing list is the lamest thing ever... > > What, like phpPgAdmin? ;-) > What on earth does phpPgAdmin have to do with the backend? I'm on the list an

Re: [HACKERS] query plan ignoring check constraints

2005-06-20 Thread Josh Berkus
KL- > I still think the fact that that discussion is taking place on a > completely non-hackers mailing list is the lamest thing ever... What, like phpPgAdmin? ;-) -- Josh Berkus Aglio Database Solutions San Francisco ---(end of broadcast)--- TI

Re: [HACKERS] query plan ignoring check constraints

2005-06-20 Thread Christopher Kings-Lynne
This is called "range partitioning". We're working on it. You're welcome to join the Bizgres project where most of the discussion on this feature takes place: www.bizgres.org http://pgfoundry.org/mail/?group_id=1000107 I still think the fact that that discussion is taking place on a comp

Re: [HACKERS] [PATCHES] default database creation with initdb

2005-06-20 Thread Tom Lane
"Dave Page" writes: >> I don't see that much of a problem with having createdb etc. hardwire >> postgres instead of template1 as the db-to-connect-to. > OK, new patch posted to -patches that updates all the utilities as well. I'm going to apply this this evening (ie, before any of the code drif

Re: [HACKERS] query plan ignoring check constraints

2005-06-20 Thread John Hansen
Someone Wrote: > Should not check constraint act as the first filter? The index should > ideally be scanned only when the check constraint is passed by the search > criteria but surprisingly it did not happen. The explain analyze showed > cost for index scans of subtables that cannot contain ro

Re: [HACKERS] make distclean keeps some files

2005-06-20 Thread Tom Lane
"Victor Y. Yegorov" <[EMAIL PROTECTED]> writes: > Are they kept intentionally? Yes. See maintainer-clean if you don't want 'em. regards, tom lane ---(end of broadcast)--- TIP 2: you can get off all lists at once with the un

Re: [HACKERS] query plan ignoring check constraints

2005-06-20 Thread Simon Riggs
On Mon, 2005-06-20 at 14:40 -0400, Alvaro Herrera wrote: > On Mon, Jun 20, 2005 at 10:35:24AM -0700, Josh Berkus wrote: > > Rohit, > > > > > Now, when I do a select on the basetable with a range of ids, it looks up > > > each subtable that inherits from the base table and using an indexed scan > >

[HACKERS] make distclean keeps some files

2005-06-20 Thread Victor Y. Yegorov
Playing with diffs, I've noticed, that after `make distclean` command some files are still present in the source tree. They're were not there before ./configure && make. They are: src/backend/bootstrap/bootparse.c src/backend/bootstrap/bootscanner.c src/backend/bootstrap/bootstrap_tokens.h src/bac

Re: [HACKERS] [PATCHES] default database creation with initdb

2005-06-20 Thread Andreas Pflug
Tom Lane wrote: Andreas Pflug <[EMAIL PROTECTED]> writes: Tom Lane wrote: If it's a server-side failure it should have a SQLSTATE code. Specifically, I'm talking about "no pg_hba.conf entry for ", ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION "Ident authentication failed.." (b

Re: [HACKERS] pg_locks view versus prepared transactions

2005-06-20 Thread Alvaro Herrera
On Mon, Jun 20, 2005 at 04:18:03PM -0400, Tom Lane wrote: > However, all you could get from ProcArray would be the database in > which the backend is running, and maybe the owning user's ID if we > cared to expend the extra space to store it there. We're certainly > not going to add current_query

Re: [HACKERS] Issue with plpython write_file and read_file tests

2005-06-20 Thread Tom Lane
"Jim C. Nasby" <[EMAIL PROTECTED]> writes: > Setting up the buildfarm on a machine I've discovered an issue with the > plpython write_file and read_file tests. The problem can be seen at > http://www.pgbuildfarm.org/cgi-bin/show_log.pl?nm=platypus&dt=2005-06-20%2018:15:00 > The specific issue is th

Re: [HACKERS] index selection by query planner

2005-06-20 Thread Josh Berkus
Rohit, > I have a table with two indices on the same column, one of which is a > partial index. I would like the query planner to use the partial index > whenever the query condition lies in the range of the partial index as it > would yield better performance. Is there any way to enforce the orde

Re: [HACKERS] Checkpointing problem with new buffer mgr.

2005-06-20 Thread Josh Berkus
Tom, > The latest omit-the-hole change went in 2005-06-06 16:22 (EDT), so > anything older than that is probably not representative. Looks like this was 5/29. Re-running the tests with current CVS now. -- Josh Berkus Aglio Database Solutions San Francisco ---(end of br

Re: [HACKERS] pg_locks view versus prepared transactions

2005-06-20 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > On Mon, Jun 20, 2005 at 03:55:45PM -0400, Merlin Moncure wrote: >> It is interesting to note that systems with stats disabled are unable to >> get lock owner information in this case (so what?). > We could make the pg_stat_activity view show information

Re: [HACKERS] pg_locks view versus prepared transactions

2005-06-20 Thread Tom Lane
"Merlin Moncure" <[EMAIL PROTECTED]> writes: >> I was also wondering about adding a current-XID column to >> pg_stat_activity, and encouraging people to join pg_locks and >> pg_stat_activity on XID instead of PID. > That would be awesome. Is there any performance penalty to do this? I gave up on

Re: [HACKERS] pg_locks view versus prepared transactions

2005-06-20 Thread Alvaro Herrera
On Mon, Jun 20, 2005 at 03:55:45PM -0400, Merlin Moncure wrote: > > Ultimately we should maybe even remove PID from pg_locks, but probably > > for backwards compatibility it'd have to be deprecated for a release > > or two first. > > It is interesting to note that systems with stats disabled are

Re: [HACKERS] pg_locks view versus prepared transactions

2005-06-20 Thread Merlin Moncure
> I think the minimum thing we ought to do about this is add an XID > column to pg_locks to show the transaction ID holding each lock. > Then you could join that to pg_prepared_xacts to see what's what. > I was also wondering about adding a current-XID column to > pg_stat_activity, and encouragin

[HACKERS] index selection by query planner

2005-06-20 Thread Rohit Gaddi
Hi,   I have a table with two indices on the same column, one of which is a partial index. I would like the query planner to use the partial index whenever the query condition lies in the range of the partial index as it would yield better performance. Is there any way to enforce the ordering fo

Re: [HACKERS] HOOKS for Synchronous Replication

2005-06-20 Thread Heikki Linnakangas
On Mon, 20 Jun 2005, Alvaro Herrera wrote: On Mon, Jun 20, 2005 at 11:03:45AM +0100, Alfranio Correia Junior wrote: Alfranio, The implementation of a set of hooks for efficient synchronous replication without extensive patching of Postgresql source is now available at: http://gorda.d

[HACKERS] Issue with plpython write_file and read_file tests

2005-06-20 Thread Jim C. Nasby
Setting up the buildfarm on a machine I've discovered an issue with the plpython write_file and read_file tests. The problem can be seen at http://www.pgbuildfarm.org/cgi-bin/show_log.pl?nm=platypus&dt=2005-06-20%2018:15:00 The specific issue is that the test doesn't clean up after itself, leaving

Re: [HACKERS] buildfarm notifications

2005-06-20 Thread Josh Berkus
Robert, > I'd be interested in getting failure reports on phpPgAdmin... can you > put me in touch with someone wrt that ? I'll post to you & KL as soon as it's publicly available. Currently you can only access the tests on Spike's intranet. -- --Josh Josh Berkus Aglio Database Solutions San

Re: [HACKERS] query plan ignoring check constraints

2005-06-20 Thread Alvaro Herrera
On Mon, Jun 20, 2005 at 10:35:24AM -0700, Josh Berkus wrote: > Rohit, > > > Now, when I do a select on the basetable with a range of ids, it looks up > > each subtable that inherits from the base table and using an indexed scan > > searches for values in the range. It does it even for subtables wh

Re: [HACKERS] HOOKS for Synchronous Replication

2005-06-20 Thread Alvaro Herrera
On Mon, Jun 20, 2005 at 11:03:45AM +0100, Alfranio Correia Junior wrote: Alfranio, > The implementation of a set of hooks for efficient synchronous replication > without extensive patching of Postgresql source is now available at: > > http://gorda.di.uminho.pt/community/ Some random come

Re: [HACKERS] buildfarm notifications

2005-06-20 Thread Robert Treat
On Sunday 19 June 2005 15:42, Josh Berkus wrote: > > What are they testing and how? How often? > > Regression tests on PostgreSQL, their own php tests on phpPgAdmin, and > standard JDBC test on pgJDBC. > > Tests are based on when there have been submissions to CVS. They are doing > their best to d

Re: [HACKERS] query plan ignoring check constraints

2005-06-20 Thread Josh Berkus
Rohit, > Now, when I do a select on the basetable with a range of ids, it looks up > each subtable that inherits from the base table and using an indexed scan > searches for values in the range. It does it even for subtables whose check > constraint completely rules out the possibility of it conta

[HACKERS] query plan ignoring check constraints

2005-06-20 Thread Rohit Gaddi
Hi   I have created a base table with a column id of type int. This table is inherited by a few subtables each of which have rows which satisfy a range of ids. The ranges are mutually exclusive. For example:   0<=id<1 subtable1 1<=id<2 subtable2 2<=id<3 subtable3 3<=i

Re: [HACKERS] [PATCHES] default database creation with initdb

2005-06-20 Thread Dave Page
> -Original Message- > From: Tom Lane [mailto:[EMAIL PROTECTED] > Sent: 20 June 2005 14:19 > To: Andrew Dunstan > Cc: Dave Page; Andreas Pflug; Robert Treat; Magnus Hagander; > pgsql-hackers@postgresql.org > Subject: Re: [HACKERS] [PATCHES] default database creation > with initdb >

Re: [HACKERS] [PATCHES] default database creation with initdb

2005-06-20 Thread Tom Lane
Andreas Pflug <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> If it's a server-side failure it should have a SQLSTATE code. > Specifically, I'm talking about > "no pg_hba.conf entry for ", ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION > "Ident authentication failed.." (both server sice) Dit

Re: [HACKERS] quote_boolean() and friends missing

2005-06-20 Thread Tom Lane
Markus Bertheau =?UTF-8?Q?=E2=98=AD?= <[EMAIL PROTECTED]> writes: >> Just assign the value to a text variable and then use quote_literal. > Isn't that a workaround? Or is that the way such things are done in > plpgsql? It's the way it's done --- plpgsql does this by invoking the datatype output f

Re: [HACKERS] quote_boolean() and friends missing

2005-06-20 Thread Tom Lane
Stephan Szabo <[EMAIL PROTECTED]> writes: > On Mon, 20 Jun 2005, Tom Lane wrote: >> I don't think so --- at least not in plpgsql, which can do this already. >> Just assign the value to a text variable and then use quote_literal. > Would that work for a bytea with embedded nul characters or does th

Re: [HACKERS] [PATCHES] default database creation with initdb

2005-06-20 Thread Andreas Pflug
Tom Lane wrote: Andreas Pflug <[EMAIL PROTECTED]> writes: Fallback is a fine idea, but this brings up another problem I'm currently facing: how to identify the problem the connection has from libpq? If the problem is a wrong password, we certainly don't want to try again. I browsed the source

Re: [HACKERS] quote_boolean() and friends missing

2005-06-20 Thread Stephan Szabo
On Mon, 20 Jun 2005, Tom Lane wrote: > Markus Bertheau =?UTF-8?Q?=E2=98=AD?= <[EMAIL PROTECTED]> writes: > > Maybe quote_* is not the right name, but the functionality is needed. > > I don't think so --- at least not in plpgsql, which can do this already. > Just assign the value to a text variable

Re: [HACKERS] quote_boolean() and friends missing

2005-06-20 Thread Markus Bertheau ☭
В Пнд, 20/06/2005 в 10:10 -0400, Tom Lane пишет: > Markus Bertheau =?UTF-8?Q?=E2=98=AD?= <[EMAIL PROTECTED]> writes: > > Maybe quote_* is not the right name, but the functionality is needed. > > I don't think so --- at least not in plpgsql, which can do this already. > Just assign the value to a t

Re: [HACKERS] quote_boolean() and friends missing

2005-06-20 Thread Tom Lane
Markus Bertheau =?UTF-8?Q?=E2=98=AD?= <[EMAIL PROTECTED]> writes: > Maybe quote_* is not the right name, but the functionality is needed. I don't think so --- at least not in plpgsql, which can do this already. Just assign the value to a text variable and then use quote_literal.

Re: [HACKERS] quote_boolean() and friends missing

2005-06-20 Thread Markus Bertheau ☭
В Пнд, 20/06/2005 в 10:01 -0400, Tom Lane пишет: > Markus Bertheau =?UTF-8?Q?=E2=98=AD?= <[EMAIL PROTECTED]> writes: > > I'm writing an application with a lot of PL/pgSQL and am constructing > > SQL queries on the fly. The quote_literal() and quote_ident() functions > > proved very much needed. Sim

Re: [HACKERS] quote_boolean() and friends missing

2005-06-20 Thread Tom Lane
Markus Bertheau =?UTF-8?Q?=E2=98=AD?= <[EMAIL PROTECTED]> writes: > I'm writing an application with a lot of PL/pgSQL and am constructing > SQL queries on the fly. The quote_literal() and quote_ident() functions > proved very much needed. Similarly, I need functions that return the SQL > representa

Re: [HACKERS] [PATCHES] default database creation with initdb

2005-06-20 Thread Tom Lane
Andreas Pflug <[EMAIL PROTECTED]> writes: > Fallback is a fine idea, but this brings up another problem I'm > currently facing: how to identify the problem the connection has from > libpq? If the problem is a wrong password, we certainly don't want to > try again. I browsed the sources over and

Re: [HACKERS] [PATCHES] default database creation with initdb

2005-06-20 Thread Tom Lane
Andrew Dunstan <[EMAIL PROTECTED]> writes: > Dave Page wrote: >> That's what I'm working on atm, and given Tom's previous comment about >> small-footprint users not wanting an extra 5/6MB on the size of a new >> cluster, I'm leaving most things using template1 and mainly just >> updating docs and e

[HACKERS] quote_boolean() and friends missing

2005-06-20 Thread Markus Bertheau ☭
Hi, I'm writing an application with a lot of PL/pgSQL and am constructing SQL queries on the fly. The quote_literal() and quote_ident() functions proved very much needed. Similarly, I need functions that return the SQL representation of all the other datatypes, not just TEXT: quote_boolean (), quo

[HACKERS] HOOKS for Synchronous Replication

2005-06-20 Thread Alfranio Correia Junior
Hi, The implementation of a set of hooks for efficient synchronous replication without extensive patching of Postgresql source is now available at: http://gorda.di.uminho.pt/community/ Note that this is far from a full replication product. It is made available for early feedback by t

Re: [HACKERS] [PATCHES] default database creation with initdb

2005-06-20 Thread Dave Page
> -Original Message- > From: Andrew Dunstan [mailto:[EMAIL PROTECTED] > Sent: 20 June 2005 10:41 > To: Dave Page > Cc: Andreas Pflug; Tom Lane; Robert Treat; Magnus Hagander; > pgsql-hackers@postgresql.org > Subject: Re: [HACKERS] [PATCHES] default database creation with initdb > > >

Re: [HACKERS] [PATCHES] default database creation with initdb

2005-06-20 Thread Andrew Dunstan
Dave Page wrote: That's what I'm working on atm, and given Tom's previous comment about small-footprint users not wanting an extra 5/6MB on the size of a new cluster, I'm leaving most things using template1 and mainly just updating docs and examples. 'postgres' can then be dropped with no ill e

Re: [HACKERS] [PATCHES] default database creation with initdb

2005-06-20 Thread Andreas Pflug
Andrew Dunstan wrote: The decision which files should be changed must be taken. e.g. createdb, dropdb will use template1 hardcoded. Is it acceptable that those tools fail if the "postgres" database isn't present any more? How about template1 as a fallback? Fallback is a fine idea,

Re: [HACKERS] [PATCHES] default database creation with initdb

2005-06-20 Thread Andrew Dunstan
Andreas Pflug wrote: Tom Lane wrote: Andreas Pflug <[EMAIL PROTECTED]> writes: Can't tell whether I could find time for reviewing the docs the next days (more interesting for feature freeze is having fixed the implementation anyway). Of the sixty-odd files that mention template1 in cu

Re: [HACKERS] [PATCHES] default database creation with initdb

2005-06-20 Thread Dave Page
> -Original Message- > From: Andreas Pflug [mailto:[EMAIL PROTECTED] > Sent: 20 June 2005 10:14 > To: Tom Lane > Cc: Dave Page; Robert Treat; Magnus Hagander; > pgsql-hackers@postgresql.org > Subject: Re: [HACKERS] [PATCHES] default database creation with initdb > > Tom Lane wrote: >

Re: [HACKERS] [PATCHES] default database creation with initdb

2005-06-20 Thread Andreas Pflug
Tom Lane wrote: Andreas Pflug <[EMAIL PROTECTED]> writes: Can't tell whether I could find time for reviewing the docs the next days (more interesting for feature freeze is having fixed the implementation anyway). Of the sixty-odd files that mention template1 in current CVS, only about half

Re: [HACKERS] Gist Recovery testing

2005-06-20 Thread Teodor Sigaev
I find this code pretty unreadable, but possibly lines 315 and 316 should be manipulating newpage->buffer instead of buffer? You are right, I'll commit changes some later with a lot of additional work.. -- Teodor Sigaev E-mail: [EMAIL PROTECTED]

Re: [HACKERS] [PATCHES] default database creation with initdb

2005-06-20 Thread Dave Page
> -Original Message- > From: Tom Lane [mailto:[EMAIL PROTECTED] > Sent: 20 June 2005 03:46 > To: Andreas Pflug > Cc: Dave Page; Robert Treat; Magnus Hagander; > pgsql-hackers@postgresql.org > Subject: Re: [HACKERS] [PATCHES] default database creation > with initdb > > Andreas Pflug