Re: [HACKERS] navigation menu for documents

2009-07-16 Thread David E. Wheeler
On Jul 16, 2009, at 12:49 PM, Andrew Dunstan wrote: I'm using jQuery to pull the proper doc into a div. I'm still noodling with it, trying to fix encoding issues on Windows, but it's pretty close to done. Yes, that's nice, it's just the sort of thing I had in mind - if you can do it with

[HACKERS] Review: revised hstore patch

2009-07-16 Thread David E. Wheeler
On Jul 16, 2009, at 7:17 AM, Andrew Gierth wrote: Revision to previous hstore patch to fix (and add tests for) some edge case bugs with nulls or empty arrays. This looks great, Andrew, thanks. Here's what I did to try it out: * I built a simple database with a table with an (old) hstore colum

Re: [HACKERS] [pgsql-www] Launching commitfest.postgresql.org

2009-07-16 Thread Josh Berkus
Robert, BTW, the new commitfest software is great. Easily a 75% reduction in time required to track reviewing activity. -- Josh Berkus PostgreSQL Experts Inc. www.pgexperts.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://

Re: [HACKERS] [PATCH] SE-PgSQL/tiny rev.2193

2009-07-16 Thread KaiGai Kohei
Robert Haas wrote: > 2009/7/16 KaiGai Kohei : >> Yes, the tiny version will not give any advantages in security without >> future enhancements. >> It is not difficult to add object classes and permissions. >> If necessary, I'll add checks them with corresponding permissions. >> >> One anxiety is Po

Re: [HACKERS] slow count in window query

2009-07-16 Thread Pavel Stehule
Hello look on: postgres=# explain select count(*) over () from x; QUERY PLAN - WindowAgg (cost=0.00..265.00 rows=1 width=0) -> Seq Scan on x (cost=0.00..140.00 rows=1 width=0) (2 rows) Time: 1,473

Re: [HACKERS] COPY WITH CSV FORCE QUOTE * -- REVIEW

2009-07-16 Thread Itagaki Takahiro
Josh Berkus wrote: > On 7/16/09 12:53 PM, Robert Haas wrote: > > I think perhaps we should ask the patch author to remove the NOT NULL > > stuff first? > > Yes, current status is "Waiting on Author". OK, I removed "FORCE NOT NULL" stuff from the patch. The attached patch only adds "FORCE QUOTE *

Re: [HACKERS] [PATCH] SE-PgSQL/tiny rev.2193

2009-07-16 Thread Robert Haas
2009/7/16 KaiGai Kohei : > Yes, the tiny version will not give any advantages in security without > future enhancements. > It is not difficult to add object classes and permissions. > If necessary, I'll add checks them with corresponding permissions. > > One anxiety is PostgreSQL specific object cl

Re: [HACKERS] [PATCH] SE-PgSQL/tiny rev.2193

2009-07-16 Thread KaiGai Kohei
Robert Haas wrote: > 2009/7/16 KaiGai Kohei : >> Updated SE-PgSQL patch is here: >> >> http://sepgsql.googlecode.com/files/sepgsql-01-tiny-8.5devel-r2196.patch.gz >> >> Unused definitions of SELinux's permissions are ripped out from >> the permission table. > > OK, I'm looking at this version of

Re: [HACKERS] [pgsql-www] Launching commitfest.postgresql.org

2009-07-16 Thread Robert Haas
On Tue, Jul 14, 2009 at 5:33 PM, Stefan Kaltenbrunner wrote: >> If you have time, that would be great; if not I will do it. > > well you just volunteered... I was trying hard not to. But, done. ...Robert -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to y

[HACKERS] Review: Revise parallel pg_restore's scheduling heuristic

2009-07-16 Thread Kevin Grittner
Rebased to correct for pg_indent changes. Applies cleanly. Compiles cleanly. Passes regression tests. Comments and format look good. No documentation changes needed. No regression test changes needed. Performance tests to follow in a day or two. -Kevin Index: src/bin/pg_dump/pg_backup_archive

Re: [HACKERS] join removal

2009-07-16 Thread Robert Haas
On Thu, Jul 16, 2009 at 9:02 PM, Greg Stark wrote: > I started looking at this patch and it looks pretty good as far as it > goes. But I think we can do a lot more. It seems to me the cases where > foreign key relationships exist are likely to be really big use cases. I agree. But that seems a lo

Re: [HACKERS] [PATCH] SE-PgSQL/tiny rev.2193

2009-07-16 Thread Robert Haas
2009/7/16 KaiGai Kohei : > Updated SE-PgSQL patch is here: > >  http://sepgsql.googlecode.com/files/sepgsql-01-tiny-8.5devel-r2196.patch.gz > > Unused definitions of SELinux's permissions are ripped out from > the permission table. OK, I'm looking at this version of the patch, and my first reactio

Re: [HACKERS] [PATCH] [v8.5] Security checks on largeobjects

2009-07-16 Thread KaiGai Kohei
I summarized the design proposal and issues currently we have. I would like to see any comments corresponding to the proposition. Especially, selection of the snapshot is a headach issue for me. This project tries to solve two items listed at: http://wiki.postgresql.org/wiki/To

Re: [HACKERS] join removal

2009-07-16 Thread Greg Stark
I started looking at this patch and it looks pretty good as far as it goes. But I think we can do a lot more. It seems to me the cases where foreign key relationships exist are likely to be really big use cases. I have one big worry though. Currently you're detecting the unique property using the

Re: [HACKERS] Docbook toolchain interfering with patch review?

2009-07-16 Thread Andrew Dunstan
Brendan Jurd wrote: app-text/openjade 1.3.2-r1 app-text/docbook-sgml 1.0 app-text/docbook-sgml-dtd 4.2-r2 app-text/docbook-sgml-utils 0.6.14 app-text/docbook-dsssl-stylesheets 1.79 ... plus some other packages which were pulled in to satisfy dependencies on the above. The version is only a b

Re: [HACKERS] Docbook toolchain interfering with patch review?

2009-07-16 Thread Kevin Grittner
Brendan Jurd wrote: > The only trick was working out exactly which > packages I needed to install. Which were? -Kevin -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Docbook toolchain interfering with patch review?

2009-07-16 Thread Alvaro Herrera
Robert Haas escribió: > But I can't say I've ever had much trouble building the docs. I find > it a bit odd that "make" in the doc directory does nothing; and "make" > in doc/src does nothing, but "make" in doc/src/sgml does what you > expect. I also find the slowness of openjade to be pretty an

Re: [HACKERS] Docbook toolchain interfering with patch review?

2009-07-16 Thread Brendan Jurd
2009/7/17 Kevin Grittner : > Brendan Jurd wrote: > >> The only trick was working out exactly which >> packages I needed to install. > > Which were? > Currently I have: app-text/openjade 1.3.2-r1 app-text/docbook-sgml 1.0 app-text/docbook-sgml-dtd 4.2-r2 app-text/docbook-sgml-utils 0.6.14 app-tex

Re: [HACKERS] Docbook toolchain interfering with patch review?

2009-07-16 Thread Robert Haas
On Thu, Jul 16, 2009 at 8:07 PM, Brendan Jurd wrote: > 2009/7/17 Josh Berkus : >> This seems like a serious issue for development.  Reviewers, how many of you >> are able to build docs with each patch? > > Being able to build docs did require some fidgeting with the docbook > packages (on Gentoo).

Re: [HACKERS] WIP: generalized index constraints

2009-07-16 Thread Jeff Davis
On Fri, 2009-07-17 at 09:51 +1000, Brendan Jurd wrote: > I like that idea ... although how would this interact (if at all) with > the existing pg_index.isunique flag? Would it become deprecated in > favour of using indconstrats, or would you actually look at switching > isunique to TRUE if somebod

Re: [HACKERS] [PATCH] [v8.5] Security checks on largeobjects

2009-07-16 Thread KaiGai Kohei
Robert Haas wrote: > 2009/7/16 KaiGai Kohei : >> However, I don't think the initial proposal of the largeobject >> security is now on the state to be reviewed seriously. > > OK, I am moving this patch to returned with feedback. If possible, I would like to have a discussion to make consensus abou

Re: [HACKERS] Docbook toolchain interfering with patch review?

2009-07-16 Thread Brendan Jurd
2009/7/17 Josh Berkus : > This seems like a serious issue for development.  Reviewers, how many of you > are able to build docs with each patch? Being able to build docs did require some fidgeting with the docbook packages (on Gentoo). The only trick was working out exactly which packages I neede

Re: [HACKERS] WIP: generalized index constraints

2009-07-16 Thread Brendan Jurd
2009/7/17 Jeff Davis : > Another idea that I thought about is that: > >   ALTER TABLE foo ADD UNIQUE (a, b) USING foo_idx; > > could be a shorthand for: > >   ALTER TABLE foo ADD INDEX CONSTRAINT (a =, b =) USING foo_idx; > > The benefit is that it could go over GiST indexes or hash indexes, not >

Re: [HACKERS] Docbook toolchain interfering with patch review?

2009-07-16 Thread Andrew Dunstan
Tom Lane wrote: Greg Smith writes: On Thu, 16 Jul 2009, Josh Berkus wrote: Well, after an hour of tinkering with docbook DTDs and openjade I've given up on building docs for the patch I was reviewing on my Mac. It's easier to get the whole chain working under Linux, but e

Re: [HACKERS] Docbook toolchain interfering with patch review?

2009-07-16 Thread Tom Lane
Greg Smith writes: > On Thu, 16 Jul 2009, Josh Berkus wrote: >> Well, after an hour of tinkering with docbook DTDs and openjade I've given >> up >> on building docs for the patch I was reviewing on my Mac. > It's easier to get the whole chain working under Linux, but even that > isn't trivial.

Re: [HACKERS] Status report: getting plpgsql to use the core lexer

2009-07-16 Thread Tom Lane
"Kevin Grittner" writes: > ... > We were able to get to much cleaner code by rewriting the parser to > have a "dumb" phase to get the overall structure into an AST, and then > use a tree-walker phase to do all the lookups and type resolution > after we had the rough structure, writing another AST

Re: [HACKERS] Status report: getting plpgsql to use the core lexer

2009-07-16 Thread Kevin Grittner
Tom Lane wrote: > One problem that wasn't obvious when I started is that if you are > trying to use a reentrant lexer, Bison insists on including its > YYSTYPE union in the call signature of the lexer. Of course, > YYSTYPE means different things to the core grammar and plpgsql's > grammar. I

Re: [HACKERS] boolean in C

2009-07-16 Thread Dann Corbit
> -Original Message- > From: pgsql-hackers-ow...@postgresql.org [mailto:pgsql-hackers- > ow...@postgresql.org] On Behalf Of Bernd Helmle > Sent: Thursday, July 16, 2009 8:47 AM > To: Grzegorz Jaskiewicz > Cc: pgsql-hackers Hackers > Subject: Re: [HACKERS] boolean in C > > --On 16. Juli 200

Re: [HACKERS] boolean in C

2009-07-16 Thread Bernd Helmle
--On 16. Juli 2009 13:32:03 +0100 Grzegorz Jaskiewicz wrote: oh, another thing. stdbool is C99 standard feature. Not gcc extension. There might be compiler versions out there which claims to be C99 but do not provide full compliant include headers. SUN Studio 12 at least has the followi

Re: [HACKERS] Make planning via GEQO repeatable

2009-07-16 Thread Andres Freund
On Thursday 16 July 2009 23:04:58 Tom Lane wrote: > Andres Freund writes: > > Query planning via GEQO currently can yield a different plan on every > > invokation of the planner due to its non-exhaustive nature. > > This often can be inconvenient because at times there may be a very > > bad plan.

Re: [HACKERS] Review: support for multiplexing SIGUSR1

2009-07-16 Thread Jaime Casanova
On Thu, Jul 16, 2009 at 2:57 AM, Jaime Casanova wrote: > Hi, > > I'm reviewing this patch: > http://archives.postgresql.org/message-id/3f0b79eb0907022341m1d36a841x19c3e2a5a6906...@mail.gmail.com Another thing that took my attention, i don't think this is safe (it assumes only one auxiliary process

Re: [HACKERS] Docbook toolchain interfering with patch review?

2009-07-16 Thread Euler Taveira de Oliveira
Merlin Moncure escreveu: > Isn't it possible though to write and/or review the documentation > patch without building it? > cd pgsql/doc/src/sgml && gmake check -- Euler Taveira de Oliveira http://www.timbira.com/ -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To ma

Re: [HACKERS] Make planning via GEQO repeatable

2009-07-16 Thread Tom Lane
Andres Freund writes: > Query planning via GEQO currently can yield a different plan on every > invokation of the planner due to its non-exhaustive nature. > This often can be inconvenient because at times there may be a very > bad plan. It also makes it very hard to reproduce a problem with GEQO.

Re: [HACKERS] COPY WITH CSV FORCE QUOTE *

2009-07-16 Thread Andrew Dunstan
Chris Spotts wrote: As for importing data from programs that produce all values in quotes including null/missing values (your pro case above), arguably what we need is another flag that would turn an empty string into a null. h, TODO, please? There's a lot of this out there, and I've ha

Re: [HACKERS] Docbook toolchain interfering with patch review?

2009-07-16 Thread Greg Smith
On Thu, 16 Jul 2009, Josh Berkus wrote: Well, after an hour of tinkering with docbook DTDs and openjade I've given up on building docs for the patch I was reviewing on my Mac. It's easier to get the whole chain working under Linux, but even that isn't trivial. I think one useful step here wo

Re: [HACKERS] WIP patch for TODO Item: Add prompt escape to display the client and server versions

2009-07-16 Thread Peter Eisentraut
On Thursday 07 May 2009 05:23:41 Dickson S. Guedes wrote: > This is a WIP patch (for the TODO item in the subject) that I'm putting > in the Commit Fest queue for 8.5. The problem I'm seeing with this is that currently it resolves %v (client) = 8.5devel %V (server) = 8.5.0 Besides being inconsis

Re: [HACKERS] COPY WITH CSV FORCE QUOTE *

2009-07-16 Thread Chris Spotts
Josh Berkus wrote: Andrew, AFAICT on a brief look at the patch, it doesn't affect the quoting of nulls on export, it just allows * as an alias for all columns for FORCE QUOTE (as well as FORCE NOT NULL). But FORCE QUOTE has never forced quoting of null values, only non-null values. We have neve

Re: [HACKERS] Docbook toolchain interfering with patch review?

2009-07-16 Thread Merlin Moncure
On Thu, Jul 16, 2009 at 2:34 PM, Josh Berkus wrote: > All, > > Well, after an hour of tinkering with docbook DTDs and openjade I've given > up on building docs for the patch I was reviewing on my Mac. > > If I'm encountering this difficulty building docs, so are many of the other > new patch review

Re: [HACKERS] COPY WITH CSV FORCE QUOTE *

2009-07-16 Thread Josh Berkus
Andrew, AFAICT on a brief look at the patch, it doesn't affect the quoting of nulls on export, it just allows * as an alias for all columns for FORCE QUOTE (as well as FORCE NOT NULL). But FORCE QUOTE has never forced quoting of null values, only non-null values. We have never quoted null values

Re: [HACKERS] Review remove {join,from}_collapse_limit, add enable_join_ordering

2009-07-16 Thread Kenneth Marshall
On Thu, Jul 16, 2009 at 06:49:08PM +0200, Andres Freund wrote: > On Thursday 16 July 2009 17:59:58 Tom Lane wrote: > > Andres Freund writes: > > > The default settings currently make it relatively hard to trigger geqo at > > > all. > > > > Yes, and that was intentional. One of the implications of

Re: [HACKERS] pg_stat_activity.application_name

2009-07-16 Thread Heikki Linnakangas
Kevin Grittner wrote: > We would probably want to modify psql, pg_dump, etc. to put the > application name into this connection property, at least by default. > We may want to add a command-line switch to allow user override -- to > provide something more detailed. For example, > --application-na

Re: [HACKERS] COPY WITH CSV FORCE QUOTE * -- REVIEW

2009-07-16 Thread Josh Berkus
On 7/16/09 12:53 PM, Robert Haas wrote: On Thu, Jul 16, 2009 at 2:47 PM, Josh Berkus wrote: Unless there are other things we want to test (CLOBs?) I think the patch is probably ready for code review of the FORCE QUOTE * portion. I think perhaps we should ask the patch author to remove the NOT

Re: [HACKERS] pg_stat_activity.application_name

2009-07-16 Thread Kevin Grittner
Greg Stark wrote: > Kevin Grittner wrote: >> On the admin list there was a request for an application name >> column in pg_stat_activity. >> >> http://archives.postgresql.org/pgsql-admin/2009-07/msg00095.php >> >> This is available in a lot of other DBMS products, can be useful to >> DBAs, and see

Re: [HACKERS] COPY WITH CSV FORCE QUOTE * -- REVIEW

2009-07-16 Thread Robert Haas
On Thu, Jul 16, 2009 at 2:47 PM, Josh Berkus wrote: > Unless there are other things we want to test (CLOBs?) I think the patch is > probably ready for code review of the FORCE QUOTE * portion. I think perhaps we should ask the patch author to remove the NOT NULL stuff first? ...Robert -- Sent v

Re: [HACKERS] navigation menu for documents

2009-07-16 Thread Andrew Dunstan
David E. Wheeler wrote: On Jul 14, 2009, at 3:21 PM, Andrew Dunstan wrote: Yes, really. What you suggest here is just not adequate, IMNSHO. I don't want to have to scroll to the top or bottom of the page to get navigation, and I want to be able to see the navigation and go where I want dire

Re: [HACKERS] Synch Rep for CommitFest 2009-07

2009-07-16 Thread Robert Haas
On Thu, Jul 16, 2009 at 1:09 PM, Greg Stark wrote: > On Thu, Jul 16, 2009 at 4:41 PM, Heikki > Linnakangas wrote: >> Rick Gigger wrote: >>> If you use an rsync like algorithm for doing the base backups wouldn't >>> that increase the size of the database for which it would still be >>> practical to

Re: [HACKERS] pg_stat_activity.application_name

2009-07-16 Thread Greg Stark
On Thu, Jul 16, 2009 at 8:08 PM, Kevin Grittner wrote: > On the admin list there was a request for an application name > column in pg_stat_activity. > > http://archives.postgresql.org/pgsql-admin/2009-07/msg00095.php > > This is available in a lot of other DBMS products, can be useful to > DBAs, an

Re: [HACKERS] pg_stat_activity.application_name

2009-07-16 Thread Kevin Grittner
Jaime Casanova wrote: > Kevin Grittner wrote: >> On the admin list there was a request for an application name >> column in pg_stat_activity. > ah? how do you implement that? and what's the use case for? It would be passed as a connection property. (If that's not feasible, perhaps a session

Re: [HACKERS] COPY WITH CSV FORCE QUOTE *

2009-07-16 Thread Andrew Dunstan
Josh Berkus wrote: Andrew, FORCE NOT NULL is in any case a fairly blunt instrument - it doesn't work for a column of any type that doesn't accept an empty string as valid input, such as numeric types. Con: this allows COPY to produce output which cannot be reloaded into PostgreSQL. Pro:

Re: [HACKERS] Synch Rep for CommitFest 2009-07

2009-07-16 Thread Rick Gigger
On Jul 16, 2009, at 11:09 AM, Greg Stark wrote: On Thu, Jul 16, 2009 at 4:41 PM, Heikki Linnakangas wrote: Rick Gigger wrote: If you use an rsync like algorithm for doing the base backups wouldn't that increase the size of the database for which it would still be practical to just re-sync?

Re: [HACKERS] navigation menu for documents

2009-07-16 Thread David E. Wheeler
On Jul 14, 2009, at 3:21 PM, Andrew Dunstan wrote: Yes, really. What you suggest here is just not adequate, IMNSHO. I don't want to have to scroll to the top or bottom of the page to get navigation, and I want to be able to see the navigation and go where I want directly. Hey Andrew, Che

Re: [HACKERS] pg_stat_activity.application_name

2009-07-16 Thread Jaime Casanova
On Thu, Jul 16, 2009 at 2:08 PM, Kevin Grittner wrote: > On the admin list there was a request for an application name > column in pg_stat_activity. > > http://archives.postgresql.org/pgsql-admin/2009-07/msg00095.php > > This is available in a lot of other DBMS products, can be useful to > DBAs, an

[HACKERS] pg_stat_activity.application_name

2009-07-16 Thread Kevin Grittner
On the admin list there was a request for an application name column in pg_stat_activity. http://archives.postgresql.org/pgsql-admin/2009-07/msg00095.php This is available in a lot of other DBMS products, can be useful to DBAs, and seems pretty cheap and easy. Could we get that onto the TODO l

Re: [HACKERS] COPY WITH CSV FORCE QUOTE *

2009-07-16 Thread Josh Berkus
Andrew, FORCE NOT NULL is in any case a fairly blunt instrument - it doesn't work for a column of any type that doesn't accept an empty string as valid input, such as numeric types. Con: this allows COPY to produce output which cannot be reloaded into PostgreSQL. Pro: there is a lot of extr

Re: [HACKERS] [GENERAL] pg_migrator not setting values of sequences?

2009-07-16 Thread Bruce Momjian
Peter Eisentraut wrote: > On Thursday 16 July 2009 07:09:22 Bruce Momjian wrote: > > Uh, how is this going to behave in 8.5? Do we still dump sequences, and > > if so, aren't we heading down the road of dumping stuff only because a > > previous release needed it? > > Which leads me to a related q

Re: [HACKERS] COPY WITH CSV FORCE QUOTE * -- REVIEW

2009-07-16 Thread Josh Berkus
All, 1) Patch applies cleanly against CVS head. 2) Patch compiles and builds cleanly. 3) Unable to check docs because of general doc build problems. 4) Tested the following commands, using a 10MB table of PostgreSQL log data: postgres=# COPY marchlog TO '/tmp/marchlog1.csv' with csv header; C

[HACKERS] Docbook toolchain interfering with patch review?

2009-07-16 Thread Josh Berkus
All, Well, after an hour of tinkering with docbook DTDs and openjade I've given up on building docs for the patch I was reviewing on my Mac. If I'm encountering this difficulty building docs, so are many of the other new patch reviewers. Which means we're *not* reviewing docs for completene

Re: [HACKERS] [PATCH] plpythonu datatype conversion improvements

2009-07-16 Thread Caleb Welton
Sorry about that. Here it is again as an attachment. -Caleb On 7/16/09 7:16 AM, "Peter Eisentraut" wrote: On Wednesday 27 May 2009 02:07:33 Caleb Welton wrote: > Patch for plpythonu This patch doesn't apply; I think it got mangled during email transport. (Tabs changed to spaces, it looks lik

Re: [HACKERS] [PATCH] [v8.5] Security checks on largeobjects

2009-07-16 Thread Robert Haas
2009/7/16 KaiGai Kohei : > However, I don't think the initial proposal of the largeobject > security is now on the state to be reviewed seriously. OK, I am moving this patch to returned with feedback. ...Robert -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make change

Re: [HACKERS] Review remove {join,from}_collapse_limit, add enable_join_ordering

2009-07-16 Thread Andres Freund
On Thursday 16 July 2009 19:22:30 Robert Haas wrote: > On Thu, Jul 16, 2009 at 11:32 AM, Tom Lane wrote: > > I wrote: > >> If I set both collapse_limit variables to very high values (I used 999), > >> it takes ... um ... not sure; I gave up waiting after half an hour. > >> I also tried with geqo_ef

Re: [HACKERS] Review remove {join,from}_collapse_limit, add enable_join_ordering

2009-07-16 Thread Tom Lane
Robert Haas writes: > On Thu, Jul 16, 2009 at 11:32 AM, Tom Lane wrote: >> So maybe a redesign of the equivalence-class joinclause mechanism is in >> order.  Still, this is unlikely to fix the fundamental issue that the >> time for large join problems grows nonlinearly. > Nonlinear is one thing,

Re: [HACKERS] Review remove {join,from}_collapse_limit, add enable_join_ordering

2009-07-16 Thread Andres Freund
On Thursday 16 July 2009 19:13:55 Robert Haas wrote: > On Thu, Jul 16, 2009 at 12:49 PM, Andres Freund wrote: > > On Thursday 16 July 2009 17:59:58 Tom Lane wrote: > >> Andres Freund writes: > >> > The default settings currently make it relatively hard to trigger geqo > >> > at all. > >> > >> Yes,

Re: [HACKERS] Review remove {join,from}_collapse_limit, add enable_join_ordering

2009-07-16 Thread Robert Haas
On Thu, Jul 16, 2009 at 11:32 AM, Tom Lane wrote: > I wrote: >> If I set both collapse_limit variables to very high values (I used 999), >> it takes ... um ... not sure; I gave up waiting after half an hour. >> I also tried with geqo_effort reduced to the minimum of 1, but that >> didn't produce a

Re: [HACKERS] WIP: generalized index constraints

2009-07-16 Thread Jeff Davis
On Thu, 2009-07-16 at 15:22 +1000, Brendan Jurd wrote: > I had a play around with the feature in psql. I think the syntax is > okay, but using "ALTER TABLE ... ADD" as you mentioned upthread could > be a better option. Ok, I think we're pretty much settled on that option then. Another idea that

Re: [HACKERS] Review remove {join,from}_collapse_limit, add enable_join_ordering

2009-07-16 Thread Robert Haas
On Thu, Jul 16, 2009 at 12:49 PM, Andres Freund wrote: > On Thursday 16 July 2009 17:59:58 Tom Lane wrote: >> Andres Freund writes: >> > The default settings currently make it relatively hard to trigger geqo at >> > all. >> >> Yes, and that was intentional.  One of the implications of what we're >

Re: [HACKERS] Synch Rep for CommitFest 2009-07

2009-07-16 Thread Greg Stark
On Thu, Jul 16, 2009 at 4:41 PM, Heikki Linnakangas wrote: > Rick Gigger wrote: >> If you use an rsync like algorithm for doing the base backups wouldn't >> that increase the size of the database for which it would still be >> practical to just re-sync?  Couldn't you in fact sync a very large >> da

Re: [HACKERS] Review remove {join,from}_collapse_limit, add enable_join_ordering

2009-07-16 Thread Andres Freund
On Thursday 16 July 2009 17:59:58 Tom Lane wrote: > Andres Freund writes: > > The default settings currently make it relatively hard to trigger geqo at > > all. > > Yes, and that was intentional. One of the implications of what we're > discussing here is that geqo would get used a lot more for "t

Re: [HACKERS] Review remove {join,from}_collapse_limit, add enable_join_ordering

2009-07-16 Thread Andres Freund
On Thursday 16 July 2009 18:23:06 Tom Lane wrote: > Andres Freund writes: > > On Thursday 16 July 2009 17:16:31 Tom Lane wrote: > >> I tried the example query and couldn't get "Failed to make a valid plan" > >> out of it ... what settings do you need for that? > > > > It unfortunately depends on s

Re: [HACKERS] Review remove {join,from}_collapse_limit, add enable_join_ordering

2009-07-16 Thread Tom Lane
Andres Freund writes: > On Thursday 16 July 2009 17:16:31 Tom Lane wrote: >> I tried the example query and couldn't get "Failed to make a valid plan" >> out of it ... what settings do you need for that? > It unfortunately depends on settings and luck. This dependence on luck was > the > reason

Re: [HACKERS] slow count in window query

2009-07-16 Thread Pavel Stehule
2009/7/16 Hitoshi Harada : > 2009/7/16 Greg Stark : >> On Wed, Jul 15, 2009 at 11:18 AM, Pavel Stehule >> wrote: >>> postgres=# select avg(a) from (select a, row_number() over (order by >>> a) as r, count(*) over () as rc from x ) p where r in >>> ((rc+1)/2,(rc+2)/2) ; >> >> How does this compare

Re: [HACKERS] Review remove {join,from}_collapse_limit, add enable_join_ordering

2009-07-16 Thread Tom Lane
Andres Freund writes: > The default settings currently make it relatively hard to trigger geqo at all. Yes, and that was intentional. One of the implications of what we're discussing here is that geqo would get used a lot more for "typical complex queries" (if there is any such thing as a typica

Re: [HACKERS] Review remove {join,from}_collapse_limit, add enable_join_ordering

2009-07-16 Thread Andres Freund
On Thursday 16 July 2009 17:27:39 Greg Stark wrote: > On Thu, Jul 16, 2009 at 4:16 PM, Tom Lane wrote: > > However, I do observe that this seems a sufficient counterexample > > against the theory that we can just remove the collapse limits and let > > GEQO save us on very complex queries. On my ma

Re: [HACKERS] Review remove {join,from}_collapse_limit, add enable_join_ordering

2009-07-16 Thread Tom Lane
Greg Stark writes: > On Thu, Jul 16, 2009 at 4:32 PM, Tom Lane wrote: >> So maybe a redesign of the equivalence-class joinclause mechanism is in >> order.  Still, this is unlikely to fix the fundamental issue that the >> time for large join problems grows nonlinearly. > Perhaps it's GEQO's fault

Re: [HACKERS] Synch Rep for CommitFest 2009-07

2009-07-16 Thread Heikki Linnakangas
Rick Gigger wrote: > If you use an rsync like algorithm for doing the base backups wouldn't > that increase the size of the database for which it would still be > practical to just re-sync? Couldn't you in fact sync a very large > database if the amount of actual change in the files was a small >

[HACKERS] Re: Review remove {join,from}_collapse_limit, add enable_join_ordering

2009-07-16 Thread Greg Stark
On Thu, Jul 16, 2009 at 4:32 PM, Tom Lane wrote: > samples  %        image name               symbol name > 886498   53.8090  postgres                 have_relevant_eclass_joinclause > 460596   27.9574  postgres                 bms_overlap > > So maybe a redesign of the equivalence-class joinclause

Re: [HACKERS] Review remove {join,from}_collapse_limit, add enable_join_ordering

2009-07-16 Thread Andres Freund
On Thursday 16 July 2009 17:16:31 Tom Lane wrote: > Andres Freund writes: > > On Thursday 16 July 2009 15:13:02 Tom Lane wrote: > >> Andres Freund writes: > >>> "Error: Failed to make a valid plan" > >> > >> We're not going to be able to fix this unless you show us examples. > > > > In the other

Re: [HACKERS] boolean in C

2009-07-16 Thread Tom Lane
Grzegorz Jaskiewicz writes: > On 16 Jul 2009, at 15:17, Tom Lane wrote: >> That's hardly going to improve readability for anyone. Also, it will >> flat out not work for the catalog struct declarations. When we say >> "bool relhasindex;" the compiler had better think that that's a >> one-byte fie

Re: [HACKERS] Re: Review remove {join,from}_collapse_limit, add enable_join_ordering

2009-07-16 Thread Kenneth Marshall
On Thu, Jul 16, 2009 at 04:27:39PM +0100, Greg Stark wrote: > On Thu, Jul 16, 2009 at 4:16 PM, Tom Lane wrote: > > However, I do observe that this seems a sufficient counterexample > > against the theory that we can just remove the collapse limits and let > > GEQO save us on very complex queries. ?

Re: [HACKERS] Review remove {join,from}_collapse_limit, add enable_join_ordering

2009-07-16 Thread Tom Lane
I wrote: > If I set both collapse_limit variables to very high values (I used 999), > it takes ... um ... not sure; I gave up waiting after half an hour. > I also tried with geqo_effort reduced to the minimum of 1, but that > didn't produce a plan in reasonable time either (I gave up after ten > mi

Re: [HACKERS] boolean in C

2009-07-16 Thread Zdenek Kotala
Grzegorz Jaskiewicz píše v čt 16. 07. 2009 v 14:59 +0100: > > > >> Why C89, and not C99 ? Virtually all compilers for last 4 years have/ > >> had C99 support. > > > > Well, I think we want to run on systems that are older than 4 years, > > too. > > > Sure, but that's probably less than 1% of

[HACKERS] Re: Review remove {join,from}_collapse_limit, add enable_join_ordering

2009-07-16 Thread Greg Stark
On Thu, Jul 16, 2009 at 4:16 PM, Tom Lane wrote: > However, I do observe that this seems a sufficient counterexample > against the theory that we can just remove the collapse limits and let > GEQO save us on very complex queries.  On my machine, the example query > takes about 22 seconds to plan us

Re: [HACKERS] Review remove {join,from}_collapse_limit, add enable_join_ordering

2009-07-16 Thread Tom Lane
Andres Freund writes: > On Thursday 16 July 2009 15:13:02 Tom Lane wrote: >> Andres Freund writes: >>> "Error: Failed to make a valid plan" >> We're not going to be able to fix this unless you show us examples. > In the other thread I attached a similar to the real schema + example query. > No

Re: [HACKERS] boolean in C

2009-07-16 Thread Grzegorz Jaskiewicz
On 16 Jul 2009, at 15:17, Tom Lane wrote: Grzegorz Jaskiewicz writes: That's hardly going to improve readability for anyone. Also, it will flat out not work for the catalog struct declarations. When we say "bool relhasindex;" the compiler had better think that that's a one-byte field. Sur

Re: [HACKERS] Mostly Harmless: c++bookends - patch 2 of 4

2009-07-16 Thread Peter Eisentraut
On Thursday 16 July 2009 17:00:03 Robert Haas wrote: > On Mon, Jul 13, 2009 at 5:51 PM, Peter Eisentraut wrote: > > So I think either decoration is added to all of these files or none of > > them. And I think the former is not going to go over well. > > We do have some things that are conditioned o

Re: [HACKERS] boolean in C

2009-07-16 Thread Tom Lane
Grzegorz Jaskiewicz writes: > On 16 Jul 2009, at 14:53, Peter Eisentraut wrote: the standard does not promise that type _Bool has size = 1 byte. We have to have that because of on-disk compatibility requirements. >>> I think the latter is easily fixable, or forceable to be one byte. >>

[HACKERS] revised hstore patch

2009-07-16 Thread Andrew Gierth
Revision to previous hstore patch to fix (and add tests for) some edge case bugs with nulls or empty arrays. -- Andrew (irc:RhodiumToad) hstore_20090716.patch.gz Description: hstore patch -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscripti

Re: [HACKERS] [PATCH] plpythonu datatype conversion improvements

2009-07-16 Thread Peter Eisentraut
On Wednesday 27 May 2009 02:07:33 Caleb Welton wrote: > Patch for plpythonu This patch doesn't apply; I think it got mangled during email transport. (Tabs changed to spaces, it looks like.) Could you resend the patch as a separate attachment in a way that it doesn't get mangled? -- Sent via

Re: [HACKERS] Mostly Harmless: c++bookends - patch 2 of 4

2009-07-16 Thread Robert Haas
On Mon, Jul 13, 2009 at 5:51 PM, Peter Eisentraut wrote: > So I think either decoration is added to all of these files or none of them. > And I think the former is not going to go over well. We do have some things that are conditioned on __cplusplus already, such as "c.h", "pg_config.h.in", and "p

Re: [HACKERS] boolean in C

2009-07-16 Thread Grzegorz Jaskiewicz
On 16 Jul 2009, at 14:53, Peter Eisentraut wrote: On Thursday 16 July 2009 16:23:31 Grzegorz Jaskiewicz wrote: On 16 Jul 2009, at 14:20, Tom Lane wrote: Grzegorz Jaskiewicz writes: oh, another thing. stdbool is C99 standard feature. We are still targeting C89, not C99. Another reason not

Re: [HACKERS] boolean in C

2009-07-16 Thread Peter Eisentraut
On Thursday 16 July 2009 16:23:31 Grzegorz Jaskiewicz wrote: > On 16 Jul 2009, at 14:20, Tom Lane wrote: > > Grzegorz Jaskiewicz writes: > >> oh, another thing. > >> stdbool is C99 standard feature. > > > > We are still targeting C89, not C99. > > > > Another reason not to depend on stdbool is tha

Re: [HACKERS] [PATCH] Psql List Languages

2009-07-16 Thread Peter Eisentraut
On Thursday 16 July 2009 00:38:31 Fernando Ike de Oliveira wrote: > I applied the Tom Lane and Peter considerations, but I had that > remove one column (Owner) of out command \dL to compatibility with 7.4 > version. The mandate is to work as best as they can with older versions, not to provide

Re: [HACKERS] slow count in window query

2009-07-16 Thread Hitoshi Harada
2009/7/16 Pavel Stehule : >> I'm also not sure how to handle this if the set has to be spooled to >> disk. Quicksort and Quickselect do a lot of scans throught he data and >> wouldn't perform well on disk. > > I thing, so problem is in aggregate func used as window func - or some > missing optimali

Re: [HACKERS] boolean in C

2009-07-16 Thread Tom Lane
Grzegorz Jaskiewicz writes: > Why C89, and not C99 ? Virtually all compilers for last 4 years have/ > had C99 support. Not everybody is running a compiler released within the last 4 years. The short answer is that C99 doesn't appear to offer enough advantage over C89, *for our purposes*, to jus

Re: [HACKERS] Review remove {join,from}_collapse_limit, add enable_join_ordering

2009-07-16 Thread Andres Freund
On Thursday 16 July 2009 15:18:01 Andres Freund wrote: > On Thursday 16 July 2009 15:13:02 Tom Lane wrote: > > Andres Freund writes: > > > The queries on the second reporting schema unfortunately are different. > > > Its the one were I copied the crazy example I attached in the original > > > thre

Re: [HACKERS] boolean in C

2009-07-16 Thread Grzegorz Jaskiewicz
On 16 Jul 2009, at 14:20, Tom Lane wrote: Grzegorz Jaskiewicz writes: oh, another thing. stdbool is C99 standard feature. We are still targeting C89, not C99. Another reason not to depend on stdbool is that, so far as I can see, the standard does not promise that type _Bool has size = 1 by

Re: [HACKERS] boolean in C

2009-07-16 Thread Tom Lane
Grzegorz Jaskiewicz writes: > oh, another thing. > stdbool is C99 standard feature. We are still targeting C89, not C99. Another reason not to depend on stdbool is that, so far as I can see, the standard does not promise that type _Bool has size = 1 byte. We have to have that because of on-disk

Re: [HACKERS] Review remove {join,from}_collapse_limit, add enable_join_ordering

2009-07-16 Thread Andres Freund
On Thursday 16 July 2009 15:13:02 Tom Lane wrote: > Andres Freund writes: > > The queries on the second reporting schema unfortunately are different. > > Its the one were I copied the crazy example I attached in the original > > thread. With geqo=off a good part of the queries used daily use too m

Re: [HACKERS] Review remove {join,from}_collapse_limit, add enable_join_ordering

2009-07-16 Thread Tom Lane
Andres Freund writes: > The queries on the second reporting schema unfortunately are different. Its > the > one were I copied the crazy example I attached in the original thread. > With geqo=off a good part of the queries used daily use too much memory to > plan > sensibly and geqo=on outright

Re: [HACKERS] slow count in window query

2009-07-16 Thread Hitoshi Harada
2009/7/16 Greg Stark : > On Wed, Jul 15, 2009 at 11:18 AM, Pavel Stehule > wrote: >> postgres=# select avg(a) from (select a, row_number() over (order by >> a) as r, count(*) over () as rc from x ) p where r in >> ((rc+1)/2,(rc+2)/2) ; > > How does this compare to the plain non-windowing SQL imple

Re: [HACKERS] [GENERAL] pg_migrator not setting values of sequences?

2009-07-16 Thread Tom Lane
Peter Eisentraut writes: > Which leads me to a related question: Do you plan to maintain one > version of pg_migrator that can upgrade any version to any other > version (within reason), or will there be separate binaries, say > pg_migrator-8.4 and pg_migrator-8.5, that each can only upgrade from

  1   2   >