Re: [HACKERS] ALTER TABLE SET STATISTICS requires AccessExclusiveLock

2010-07-17 Thread Simon Riggs
On Fri, 2010-07-16 at 23:03 +0200, Andres Freund wrote: Sure its not that bad, but at least it needs to get documented imho. Likely others should chime in here ;-) Don't understand you. This is a clear bug in join removal, test case attached, a minor rework of your original test case. What

Re: [HACKERS] pg_dump(all) --quote-all-identifiers

2010-07-17 Thread Alex Hunsaker
On Sun, Jun 13, 2010 at 18:35, Robert Haas robertmh...@gmail.com wrote: *Waves* Hi! Patch looks and tests good to me. Only thing that seemed to be missing was documentation of the new pg_dump(all) and guc params. Find attached a stab at this. Yeah the docs I added need work, but I figure if

Re: [HACKERS] ALTER TABLE SET STATISTICS requires AccessExclusiveLock

2010-07-17 Thread Simon Riggs
On Fri, 2010-07-16 at 20:45 -0400, Tom Lane wrote: Andres Freund and...@anarazel.de writes: Just to help me: The primary reasons for using SnapshotNow is speed and in some cases correctness (referential integrity). Right? Any other reasons? Well, the main point for system catalog accesses

Re: [HACKERS] Functional dependencies and GROUP BY

2010-07-17 Thread Peter Eisentraut
On fre, 2010-07-16 at 22:29 -0600, Alex Hunsaker wrote: The only corner case I have run into is creating a view with what I would call an implicit 'not null' constraint. Demonstration below: create table nn (a int4 not null, b int4, unique (a)); select * from nn group by a; -- should this

Re: [HACKERS] gSoC - ADD MERGE COMMAND - code patch submission

2010-07-17 Thread Simon Riggs
On Fri, 2010-07-16 at 08:26 +0800, Boxuan Zhai wrote: The merge actions are transformed into lower level queries. I create a Query node for each of them and append them in a newly create List field mergeActQry. The action queries have different command type and specific target list and qual

Re: [HACKERS] dividing money by money

2010-07-17 Thread Peter Eisentraut
On fre, 2010-07-16 at 12:21 -0400, Tom Lane wrote: Actually ... the thing that might turn money into a less deprecated type is if you could set lc_monetary per column. I wonder whether Peter's collation hack could be extended to deal with that. In principle yes. -- Sent via pgsql-hackers

Re: [HACKERS] dividing money by money

2010-07-17 Thread Peter Eisentraut
On fre, 2010-07-16 at 08:55 -0500, Kevin Grittner wrote: Peter Eisentraut pete...@gmx.net wrote: I didn't see any discussion about why this should return float8 rather than numeric. It seems wrong to use float8 for this. That discussion took place several months ago on the -bugs list.

Re: [HACKERS] dividing money by money

2010-07-17 Thread Peter Eisentraut
On fre, 2010-07-16 at 10:31 -0400, Tom Lane wrote: The other argument that I found convincing was that if the operator was defined to yield numeric, people might think that the result was exact ... which of course it won't be, either way. Choosing float8 helps to remind the user it's an

Re: [HACKERS] bg worker: overview

2010-07-17 Thread Simon Riggs
On Tue, 2010-07-13 at 16:30 +0200, Markus Wanner wrote: I've combined these two components into a single, general purpose background worker infrastructure component I think many people want such a feature, so the requirement is good. The code itself merely reflects your design, so what I

Re: [HACKERS] suppress automatic recovery after back crash

2010-07-17 Thread Simon Riggs
On Sun, 2010-06-27 at 20:54 -0400, Robert Haas wrote: automatic_restart = true # reinitialize after backend crash? automatic_restart makes me think when does that happen?. Can we call this restart_after_crash? Or similar. So we are explicit about when the restart will kick in. -- Simon

Re: [HACKERS] bg worker: overview

2010-07-17 Thread Markus Wanner
Hello Simon, On 07/17/2010 12:30 PM, Simon Riggs wrote: The code itself merely reflects your design, so what I would really like to see is a full explanation of this. Are the descriptive mails I sent for each patch going into the right direction and just need to be extended, in your opinion?

Re: [HACKERS] bg worker: overview

2010-07-17 Thread Markus Wanner
Sorry, hit send too early. On 07/17/2010 01:47 PM, Markus Wanner wrote: I think that I commented the source code pretty extensively, however, that's a subjective feeling. Take this phrase. I'm under the impression, that I commented the source code pretty well. Scratch that, please. :-)

Fwd: [HACKERS] gSoC - ADD MERGE COMMAND - code patch submission

2010-07-17 Thread Boxuan Zhai
-- Forwarded message -- From: Boxuan Zhai bxzhai2...@gmail.com Date: 2010/7/17 Subject: Re: [HACKERS] gSoC - ADD MERGE COMMAND - code patch submission To: Simon Riggs si...@2ndquadrant.com 2010/7/17 Simon Riggs si...@2ndquadrant.com On Fri, 2010-07-16 at 08:26 +0800, Boxuan

Re: [HACKERS] bg worker: overview

2010-07-17 Thread Simon Riggs
On Sat, 2010-07-17 at 13:47 +0200, Markus Wanner wrote: Are the descriptive mails I sent for each patch going into the right direction and just need to be extended, in your opinion? Or are you really missing something in there? Not detailed enough, for me, by a long way. Your notes read

Re: [HACKERS] SHOW TABLES

2010-07-17 Thread Robert Haas
On Jul 16, 2010, at 11:02 PM, Stephen Frost sfr...@snowman.net wrote: * Robert Haas (robertmh...@gmail.com) wrote: Why must the backslash commands be more powerful than any alternative we might come up with? Because they encode alot of information in a character- something which is next to

Re: [HACKERS] suppress automatic recovery after back crash

2010-07-17 Thread Tom Lane
Simon Riggs si...@2ndquadrant.com writes: On Sun, 2010-06-27 at 20:54 -0400, Robert Haas wrote: automatic_restart = true # reinitialize after backend crash? automatic_restart makes me think when does that happen?. Can we call this restart_after_crash? Or similar. +1. automatic_restart

Re: [HACKERS] dividing money by money

2010-07-17 Thread Andy Balholm
On Jul 17, 2010, at 3:20 AM, Peter Eisentraut wrote: On fre, 2010-07-16 at 10:31 -0400, Tom Lane wrote: The other argument that I found convincing was that if the operator was defined to yield numeric, people might think that the result was exact ... which of course it won't be, either way.

Re: [HACKERS] dividing money by money

2010-07-17 Thread Tom Lane
Peter Eisentraut pete...@gmx.net writes: On fre, 2010-07-16 at 10:31 -0400, Tom Lane wrote: The other argument that I found convincing was that if the operator was defined to yield numeric, people might think that the result was exact ... which of course it won't be, either way. Choosing

Re: [HACKERS] dividing money by money

2010-07-17 Thread Kevin Grittner
Peter Eisentraut pete...@gmx.net wrote: I read most of these messages rather as advocating the use of NUMERIC. Yeah, I did advocate that at first, but became convinced float8 was more appropriate. Also, the multiplication problem can be addressed by adding a money * numeric operator.

Re: [HACKERS] SHOW TABLES

2010-07-17 Thread Kevin Grittner
Tim Landscheidt t...@tim-landscheidt.de wrote: One major flaw I see is that the fractional precision is fixed. Not only petrol stations split cents. Well, I've never paid a petrol station a fraction of a cent; I've only seen *rates* of money per some unit of measure with fractional cents.

Re: [HACKERS] Review: Patch for phypot - Pygmy Hippotause

2010-07-17 Thread Kevin Grittner
Andrew Geery andrew.ge...@gmail.com wrote: The HYPOT macro executed 100 million times in 11 seconds and the phypot function executed the same number of times in 22 seconds. Or, to put that another way, the new function adds 110 nanoseconds to each hypotenuse calculation. With both -O2 and

Re: [HACKERS] Review: Row-level Locks SERIALIZABLE transactions, postgres vs. Oracle

2010-07-17 Thread Kevin Grittner
= Submission review = * Is the patch in context diff format? Yes. * Does it apply cleanly to the current CVS HEAD? Yes. * Does it include reasonable tests, necessary doc patches, etc? There is one pgbench test which shows incorrect behavior without the

Re: [HACKERS] Review: Row-level Locks SERIALIZABLE transactions, postgres vs. Oracle

2010-07-17 Thread Joe Conway
On 07/17/2010 09:25 AM, Kevin Grittner wrote: I was concerned about its interaction with the other serializable patch (by myself and Dan Ports), so I also combined the patches and tested. Florian's pgbench test did expose bugs in the *other* patch, which I then fixed in the combined setting.

Re: [HACKERS] Functional dependencies and GROUP BY

2010-07-17 Thread Alex Hunsaker
On Sat, Jul 17, 2010 at 04:15, Peter Eisentraut pete...@gmx.net wrote: On fre, 2010-07-16 at 22:29 -0600, Alex Hunsaker wrote: The only corner case I have run into is creating a view with what I would call an implicit 'not null' constraint.  Demonstration below: create table nn (a int4 not

[HACKERS] Broken due to CVS branching? .bki has wrong info for build

2010-07-17 Thread Selena Deckelmann
Hi! I pulled the latest from the git repo, I got this error on initdb: creating template1 database in testdb/base/1 ... initdb: input file /usr/local/pg90/share/postgresql/postgres.bki does not belong to PostgreSQL 9.0devel The problem was having '9.1' instead of '9.0' in the first line of the

Re: [HACKERS] Broken due to CVS branching? .bki has wrong info for build

2010-07-17 Thread Robert Haas
On Jul 17, 2010, at 12:44 PM, Selena Deckelmann selenama...@gmail.com wrote: Hi! I pulled the latest from the git repo, I got this error on initdb: creating template1 database in testdb/base/1 ... initdb: input file /usr/local/pg90/share/postgresql/postgres.bki does not belong to

Re: [HACKERS] Broken due to CVS branching? .bki has wrong info for build

2010-07-17 Thread Tom Lane
Selena Deckelmann selenama...@gmail.com writes: I pulled the latest from the git repo, I got this error on initdb: creating template1 database in testdb/base/1 ... initdb: input file /usr/local/pg90/share/postgresql/postgres.bki does not belong to PostgreSQL 9.0devel The problem was having

Re: [HACKERS] Synchronous replication

2010-07-17 Thread Heikki Linnakangas
On 14/07/10 09:50, Fujii Masao wrote: Quorum commit - In previous discussion about synchronous replication, some people wanted the quorum commit feature. This feature is included in also Zontan's synchronous replication patch, so I decided to create it. The patch provides quorum

Re: [HACKERS] Broken due to CVS branching? .bki has wrong info for build

2010-07-17 Thread Selena Deckelmann
On Sat, Jul 17, 2010 at 10:51 AM, Tom Lane t...@sss.pgh.pa.us wrote: Selena Deckelmann selenama...@gmail.com writes: I pulled the latest from the git repo, I got this error on initdb: creating template1 database in testdb/base/1 ... initdb: input file

Re: [HACKERS] Review: Row-level Locks SERIALIZABLE transactions, postgres vs. Oracle

2010-07-17 Thread Kevin Grittner
Joe Conway wrote: Should I be installing Florian's patch in addition to yours when I start testing? There's some manual fix-up needed, primarily because we need to differentiate between SERIALIZABLE and REPEATABLE READ isolation levels, and therefore replaced the IsXactIsoLevelSerializable

Re: [HACKERS] Review: Patch for phypot - Pygmy Hippotause

2010-07-17 Thread Tom Lane
Kevin Grittner kevin.gritt...@wicourts.gov writes: Andrew Geery andrew.ge...@gmail.com wrote: I found that the difference in the two calculations were always less than 0.01. However, about a third of the calculations differed at one more magnitude of precision (that is, there were

Re: [HACKERS] Review: Row-level Locks SERIALIZABLE transactions, postgres vs. Oracle

2010-07-17 Thread Joseph Conway
On 7/17/10 12:09 PM, Kevin Grittner wrote: Joe Conway wrote: Should I be installing Florian's patch in addition to yours when I start testing? There's some manual fix-up needed, primarily because we need to differentiate between SERIALIZABLE and REPEATABLE READ isolation levels, and

Re: [HACKERS] ERROR: argument to pg_get_expr() must come from system catalogs

2010-07-17 Thread Tom Lane
I wrote: Heikki Linnakangas heikki.linnakan...@enterprisedb.com writes: Do you want to go ahead with your plan of changing what's passed in FuncInfo? I won't object if you want to do it, but I wouldn't feel comfortable with backporting such big changes myself. I will take a look at it, but

Re: [HACKERS] SHOW TABLES

2010-07-17 Thread Joshua D. Drake
On Sat, 2010-07-17 at 09:02 -0500, Robert Haas wrote: On Jul 16, 2010, at 11:02 PM, Stephen Frost sfr...@snowman.net wrote: * Robert Haas (robertmh...@gmail.com) wrote: Why must the backslash commands be more powerful than any alternative we might come up with? Because they encode alot

Re: [HACKERS] SHOW TABLES

2010-07-17 Thread Pavel Stehule
2010/7/17 Joshua D. Drake j...@commandprompt.com: On Sat, 2010-07-17 at 09:02 -0500, Robert Haas wrote: On Jul 16, 2010, at 11:02 PM, Stephen Frost sfr...@snowman.net wrote: * Robert Haas (robertmh...@gmail.com) wrote: Why must the backslash commands be more powerful than any alternative

Re: [HACKERS] SHOW TABLES

2010-07-17 Thread Stefan Kaltenbrunner
On 07/17/2010 04:02 PM, Robert Haas wrote: On Jul 16, 2010, at 11:02 PM, Stephen Frostsfr...@snowman.net wrote: * Robert Haas (robertmh...@gmail.com) wrote: Why must the backslash commands be more powerful than any alternative we might come up with? Because they encode alot of information

Re: [HACKERS] SHOW TABLES

2010-07-17 Thread Joshua D. Drake
On Sat, 2010-07-17 at 23:30 +0200, Stefan Kaltenbrunner wrote: On 07/17/2010 04:02 PM, Robert Haas wrote: On Jul 16, 2010, at 11:02 PM, Stephen Frostsfr...@snowman.net wrote: * Robert Haas (robertmh...@gmail.com) wrote: Why must the backslash commands be more powerful than any alternative

Re: [HACKERS] Review: Row-level Locks SERIALIZABLE transactions, postgres vs. Oracle

2010-07-17 Thread Florian Pflug
On Jul17, 2010, at 18:25 , Kevin Grittner wrote: * Does it include reasonable tests, necessary doc patches, etc? Documentation changes are needed in the Concurrency Control chapter. ... * Do we want that? Yes. We seem to have reached consensus on the -hackers list to that effect.

Re: [HACKERS] SHOW TABLES

2010-07-17 Thread Robert Haas
On Sat, Jul 17, 2010 at 5:30 PM, Stefan Kaltenbrunner ste...@kaltenbrunner.cc wrote: On 07/17/2010 04:02 PM, Robert Haas wrote: On Jul 16, 2010, at 11:02 PM, Stephen Frostsfr...@snowman.net  wrote: * Robert Haas (robertmh...@gmail.com) wrote: Why must the backslash commands be more powerful

[HACKERS] TODO 9.0 done items removed

2010-07-17 Thread Bruce Momjian
Since we branched 9.1 before we released Postgres 9.0, I had to remove the 9.0 TODO items before 9.0 was released, or people might have marked items as done when they were done only in 9.1. I also updated the TODO legend at the top to mention 9.1: [D] Completed item - marks changes that

Re: [HACKERS] SHOW TABLES

2010-07-17 Thread Bruce Momjian
Robert Haas wrote: I'd like to be able to list comments on objects of a particular type. And, yeah, I'd like to be able to list all the aggregates that take a numeric argument, or all the functions that take, say, an argument of type internal. Right now, this is an ENORMOUS pain in the neck.

Re: [HACKERS] SHOW TABLES

2010-07-17 Thread Robert Haas
On Sat, Jul 17, 2010 at 11:14 PM, Bruce Momjian br...@momjian.us wrote: Robert Haas wrote: I'd like to be able to list comments on objects of a particular type. And, yeah, I'd like to be able to list all the aggregates that take a numeric argument, or all the functions that take, say, an

Re: [HACKERS] Functional dependencies and GROUP BY

2010-07-17 Thread Alex Hunsaker
On Fri, Jul 16, 2010 at 22:29, Alex Hunsaker bada...@gmail.com wrote: (FYI I do plan on doing some performance testing with large columns later, any other requests?) And here are the results. All tests are with an empty table with 1500 int4 columns. There is a unique non null index on the

Re: [HACKERS] Functional dependencies and GROUP BY

2010-07-17 Thread Alex Hunsaker
On Sat, Jul 17, 2010 at 11:13, Alex Hunsaker bada...@gmail.com wrote: On Sat, Jul 17, 2010 at 04:15, Peter Eisentraut pete...@gmx.net wrote: On fre, 2010-07-16 at 22:29 -0600, Alex Hunsaker wrote: The only corner case I have run into is creating a view with what I would call an implicit 'not

Re: [HACKERS] crash-recovery replay of CREATE TABLESPACE is broken in HEAD

2010-07-17 Thread Bruce Momjian
Tom Lane wrote: I managed to crash the executor in the tablespace.sql test while working on a 9.1 patch, and discovered that the postmaster fails to recover from that. The end of postmaster.log looks like LOG: all server processes terminated; reinitializing LOG: database system was

Re: [HACKERS] crash-recovery replay of CREATE TABLESPACE is broken in HEAD

2010-07-17 Thread Heikki Linnakangas
On 18/07/10 08:22, Bruce Momjian wrote: The bug is that we can't replay mkdir()/symlink() and assume those will always succeed. I looked at the createdb redo code and it basically drops the directory before creating it. The tablespace directory/symlink setup is more complex, so I just wrote