Re: [HACKERS] How to determine failed connection attempt due to invalid authorization (libpq)?

2010-10-19 Thread David Fetter
On Mon, Oct 18, 2010 at 07:26:32AM -0700, David Fetter wrote: On Mon, Oct 18, 2010 at 10:18:25AM -0400, Robert Haas wrote: On Mon, Oct 18, 2010 at 10:05 AM, David Fetter da...@fetter.org wrote: On Mon, Oct 18, 2010 at 10:03:55AM -0400, Robert Haas wrote: On Sun, Oct 17, 2010 at 2:03 AM,

Re: [HACKERS] WIP: extensible enums

2010-10-19 Thread Dean Rasheed
On 19 October 2010 05:21, Andrew Dunstan and...@dunslane.net wrote: On 10/18/2010 10:52 AM, Tom Lane wrote: We could possibly deal with enum types that follow the existing convention if we made the cache entry hold a list of all the original, known-to-be-sorted OIDs.  (This could be

Re: [HACKERS] WIP: extensible enums

2010-10-19 Thread Thom Brown
On 19 October 2010 05:21, Andrew Dunstan and...@dunslane.net wrote: On 10/18/2010 10:52 AM, Tom Lane wrote: We could possibly deal with enum types that follow the existing convention if we made the cache entry hold a list of all the original, known-to-be-sorted OIDs.  (This could be

Re: [HACKERS] WIP: extensible enums

2010-10-19 Thread Magnus Hagander
On Tue, Oct 19, 2010 at 10:19, Thom Brown t...@linux.com wrote: On 19 October 2010 05:21, Andrew Dunstan and...@dunslane.net wrote: On 10/18/2010 10:52 AM, Tom Lane wrote: We could possibly deal with enum types that follow the existing convention if we made the cache entry hold a list of

Re: [HACKERS] leaky views, yet again

2010-10-19 Thread KaiGai Kohei
(2010/10/14 1:52), Tom Lane wrote: Robert Haasrobertmh...@gmail.com writes: On Wed, Oct 13, 2010 at 11:45 AM, Tom Lanet...@sss.pgh.pa.us wrote: That's all true, but you have to consider how much the obstacle actually gets in their way versus how painful it is on your end to create and

Re: [HACKERS] Simplifying replication

2010-10-19 Thread Dimitri Fontaine
Hi, Josh Berkus j...@agliodbs.com writes: It is critical that we make replication easier to set up, administrate and monitor than it currently is. In my conversations with people, this is more important to our users and the adoption of PostgreSQL than synchronous replication is. I want to

Re: [HACKERS] Extensions, this time with a patch

2010-10-19 Thread Itagaki Takahiro
On Mon, Oct 18, 2010 at 8:37 PM, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Here's another version of the patch, v3. Changes: CREATE EXTENSION is interesting feature! I just compiled it and tested it via SQL commands. Here is a quick report. * There are some compiler warnings. You might be

Re: [HACKERS] Extensions, this time with a patch

2010-10-19 Thread Dimitri Fontaine
Itagaki Takahiro itagaki.takah...@gmail.com writes: CREATE EXTENSION is interesting feature! I just compiled it and tested it via SQL commands. Here is a quick report. Thanks for you time and interest! * There are some compiler warnings. You might be missing something in copyfuncs and

Re: [HACKERS] max_wal_senders must die

2010-10-19 Thread Stefan Kaltenbrunner
Josh Berkus wrote: Hackers, What purpose is served, exactly, by max_wal_senders? In order for a standby to connect, it must have a superuser login, and replication connections must be enabled in pg_hba.conf. How is having one more setting in one more file you have to enable on the master

Re: [HACKERS] max_wal_senders must die

2010-10-19 Thread Magnus Hagander
On Tue, Oct 19, 2010 at 13:14, Stefan Kaltenbrunner ste...@kaltenbrunner.cc wrote: Josh Berkus wrote: Hackers, What purpose is served, exactly, by max_wal_senders? In order for a standby to connect, it must have a superuser login, and replication connections must be enabled in pg_hba.conf.

Re: [HACKERS] comments on type attributes broken in 9.1devel

2010-10-19 Thread Robert Haas
On Tue, Oct 19, 2010 at 1:46 AM, Peter Eisentraut pete...@gmx.net wrote: The comment code refactoring c10575ff005c330d0475345621b7d381eb510c48 broke comments on composite type attributes: COMMENT ON COLUMN foo.a is 'test'; ERROR:  42809: foo is a composite type LOCATION:  heap_openrv,

Re: [HACKERS] max_wal_senders must die

2010-10-19 Thread Stefan Kaltenbrunner
Magnus Hagander wrote: On Tue, Oct 19, 2010 at 13:14, Stefan Kaltenbrunner ste...@kaltenbrunner.cc wrote: Josh Berkus wrote: Hackers, What purpose is served, exactly, by max_wal_senders? In order for a standby to connect, it must have a superuser login, and replication connections must be

Re: [HACKERS] leaky views, yet again

2010-10-19 Thread Robert Haas
On Oct 19, 2010, at 4:34 AM, KaiGai Kohei kai...@ak.jp.nec.com wrote: (2010/10/14 1:52), Tom Lane wrote: Robert Haasrobertmh...@gmail.com writes: On Wed, Oct 13, 2010 at 11:45 AM, Tom Lanet...@sss.pgh.pa.us wrote: That's all true, but you have to consider how much the obstacle actually gets

Re: [HACKERS] Extensions, this time with a patch

2010-10-19 Thread Dimitri Fontaine
Itagaki Takahiro itagaki.takah...@gmail.com writes: * There are some compiler warnings. You might be missing something in copyfuncs and equalfuncs. Fixed in v4, attached. * There might be some bugs in pg_dump: pg_dump: schema with OID 2200 does not exist, but is needed for object 16411

Re: [HACKERS] Extensions, this time with a patch

2010-10-19 Thread Robert Haas
On Oct 19, 2010, at 8:33 AM, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: I didn't realise that using SPI would mean dumping the all script in case of even NOTICEs. May be we want to protect against that in the CREATE EXTENSION case, but I didn't have a look at how to do it. Do we want

Re: [HACKERS] Extensions, this time with a patch

2010-10-19 Thread Dimitri Fontaine
Robert Haas robertmh...@gmail.com writes: I don't see why. I think the real action item here is to remove = from hstore. As input, consider that lots of extensions will create types that are only a shell at the moment of the CREATE TYPE, and for each of those types you will see the

Re: [HACKERS] leaky views, yet again

2010-10-19 Thread KaiGai Kohei
(2010/10/19 21:31), Robert Haas wrote: On Oct 19, 2010, at 4:34 AM, KaiGai Koheikai...@ak.jp.nec.com wrote: (2010/10/14 1:52), Tom Lane wrote: Robert Haasrobertmh...@gmail.com writes: On Wed, Oct 13, 2010 at 11:45 AM, Tom Lanet...@sss.pgh.pa.us wrote: That's all true, but you have to

Re: [HACKERS] Extensions, this time with a patch

2010-10-19 Thread Robert Haas
On Tue, Oct 19, 2010 at 9:07 AM, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Robert Haas robertmh...@gmail.com writes: I don't see why.  I think the real action item here is to remove = from hstore. As input, consider that lots of extensions will create types that are only a shell at the

Re: [HACKERS] WIP: extensible enums

2010-10-19 Thread Alvaro Herrera
Excerpts from Magnus Hagander's message of mar oct 19 05:23:31 -0300 2010: He certainly could, but github provides more features and a nicer look :-) And since it's git, it doesn't matter where the repo is. Yeah. If you have a checked out copy of the GIT repo (preferably one with the master

Re: [HACKERS] create tablespace fails silently, or succeeds improperly

2010-10-19 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: Tom Lane wrote: Bruce Momjian br...@momjian.us writes: Looking at the pg_upgrade code some more, I found that it was not removing the PG_VERSION file when deleting = 8.4 tablespace files. This might confuse administrators so the attached patch adds the

Re: [HACKERS] knngist - 0.8

2010-10-19 Thread David Fetter
On Mon, Oct 18, 2010 at 04:13:04PM +0100, Mark Cave-Ayland wrote: David Fetter wrote: For my vote, I'd prefer either the Oid of a custom type or an array of Oid, Datum pairs - i.e. something we can extend in the future if required. This sounds a lot like a foreign key to another table.

Re: [HACKERS] [PATH] Idle in transaction cancellation

2010-10-19 Thread Kevin Grittner
Andres Freund and...@anarazel.de wrote: Here is a proposed patch which enables cancellation of $subject. Cool. Some enhancements we'd like to do to Serializable Snapshot Isolation (SSI), should the base patch make it in, would require this capability. Currently it does *not* report any

Re: [HACKERS] [PATH] Idle in transaction cancellation

2010-10-19 Thread Robert Haas
On Tue, Oct 19, 2010 at 10:18 AM, Kevin Grittner kevin.gritt...@wicourts.gov wrote: Andres Freund and...@anarazel.de wrote: Here is a proposed patch which enables cancellation of $subject. I'll take a look when I can, but it may be a couple weeks from now. How about adding it to

Re: [HACKERS] Extensions, this time with a patch

2010-10-19 Thread Tom Lane
Dimitri Fontaine dimi...@2ndquadrant.fr writes: Robert Haas robertmh...@gmail.com writes: I don't see why. I think the real action item here is to remove = from hstore. As input, consider that lots of extensions will create types that are only a shell at the moment of the CREATE TYPE, and

Re: [HACKERS] leaky views, yet again

2010-10-19 Thread Tom Lane
KaiGai Kohei kai...@kaigai.gr.jp writes: (2010/10/19 21:31), Robert Haas wrote: I think you're still misreading it. Hmm. In my understanding, it seems to me he concerned about possible leaky estimate functions, so he mentioned the horrible performance degrading, if we don't allow to execute

Re: [HACKERS] patch: Add JSON datatype to PostgreSQL (GSoC, WIP)

2010-10-19 Thread Robert Haas
On Sat, Oct 16, 2010 at 12:59 PM, Terry Laurenzo t...@laurenzo.org wrote:    - It is directly iterable without parsing and/or constructing an AST    - It is its own representation.  If iterating and you want to tear-off a value to be returned or used elsewhere, its a simple buffer copy plus

Re: [HACKERS] patch: Add JSON datatype to PostgreSQL (GSoC, WIP)

2010-10-19 Thread Andrew Dunstan
On 10/19/2010 10:44 AM, Robert Haas wrote: On Sat, Oct 16, 2010 at 12:59 PM, Terry Laurenzot...@laurenzo.org wrote: - It is directly iterable without parsing and/or constructing an AST - It is its own representation. If iterating and you want to tear-off a value to be returned or

Re: [HACKERS] Extensions, this time with a patch

2010-10-19 Thread Dimitri Fontaine
Tom Lane t...@sss.pgh.pa.us writes: Only if the script is intentionally noisy. The right fix here is probably to bump up the min message level while running the script. You mean doing that from the SQL script itself (using SET) or in the pg_execute_from_file() code? My guess is the former,

Re: [HACKERS] O_DSYNC broken on MacOS X?

2010-10-19 Thread Bruce Momjian
Robert Haas wrote: On Thu, Oct 7, 2010 at 11:52 AM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: Proposed doc patch attached. discusesed? ?Otherwise +1 Woops, thanks. Committed with that change. I back-patched it back to 8.3, which is as far as it

Re: [HACKERS] knngist - 0.8

2010-10-19 Thread Teodor Sigaev
3) 3-rd boolean column (amopopr, amopfamily, amoporder) - could be two records per operator + operator could be used in both roles + strategy number could be different for different roles How can #3 work at all? It's ignoring a couple of critical index columns. In particular, I

Re: [HACKERS] knngist - 0.8

2010-10-19 Thread Teodor Sigaev
Thinking about it that way, perhaps we could add an integer column amop_whats_it_good_for that gets used as a bit field. That wouldn't require changing the index structure, although it might break some other things. OPERATOR strategy_number ( op_type [ , op_type ] ) [ FOR { SEARCH | ORDER }

Re: [HACKERS] Simplifying replication

2010-10-19 Thread Greg Smith
Josh Berkus wrote: It is critical that we make replication easier to set up, administrate and monitor than it currently is. In my conversations with people, this is more important to our users and the adoption of PostgreSQL than synchronous replication is. You should enjoy one of the

Re: [HACKERS] patch: Add JSON datatype to PostgreSQL (GSoC, WIP)

2010-10-19 Thread Terry Laurenzo
Agreed. BSON was born out of implementations that either lacked arbitrary precision numbers or had a strong affinity to an int/floating point way of thinking about numbers. I believe that if BSON had an arbitrary precision number type, it would be a proper superset of JSON. As an aside, the max

Re: [HACKERS] O_DSYNC broken on MacOS X?

2010-10-19 Thread Bruce Momjian
Greg Smith wrote: A.M. wrote: Perhaps a simpler tool could run a basic fsyncs-per-second test and prompt the DBA to check that the numbers are within the realm of possibility. This is what the test_fsync utility that already ships with the database should be useful for. The way

Re: [HACKERS] PL/JS

2010-10-19 Thread Greg
Cool, will take a look. Thanks! --- On Tue, 19/10/10, Itagaki Takahiro itagaki.takah...@gmail.com wrote: From: Itagaki Takahiro itagaki.takah...@gmail.com Subject: Re: [HACKERS] PL/JS To: Terri Laurenzo t...@laurenzo.org Cc: Greg grigo...@yahoo.co.uk, pgsql-hackers@postgresql.org

Re: [HACKERS] O_DSYNC broken on MacOS X?

2010-10-19 Thread A.M.
On Oct 19, 2010, at 11:22 AM, Bruce Momjian wrote: Greg Smith wrote: A.M. wrote: Perhaps a simpler tool could run a basic fsyncs-per-second test and prompt the DBA to check that the numbers are within the realm of possibility. This is what the test_fsync utility that already ships with

Re: [HACKERS] knngist - 0.8

2010-10-19 Thread Teodor Sigaev
combination of parameters is one that it can handle. I'm thinking perhaps in lieu of a boolean, we can add another indexam method which, if not InvalidOid, gets called when we're wondering about whether a given clause is something that the index can order by. Although knngist focuses on a the

Re: [HACKERS] Extensions, this time with a patch

2010-10-19 Thread Tom Lane
Dimitri Fontaine dimi...@2ndquadrant.fr writes: Tom Lane t...@sss.pgh.pa.us writes: Only if the script is intentionally noisy. The right fix here is probably to bump up the min message level while running the script. You mean doing that from the SQL script itself (using SET) or in the

Re: [HACKERS] Simplifying replication

2010-10-19 Thread Josh Berkus
You should enjoy one of the patches we're furiously working on then, which is aiming at some of the administration and monitoring pieces here. Great, glad to hear it! Would you be willing to go into detail? I have my own grand vision of how easy replication should be to setup too. So,

Re: [HACKERS] create tablespace fails silently, or succeeds improperly

2010-10-19 Thread Bruce Momjian
Tom Lane wrote: Bruce Momjian br...@momjian.us writes: Tom Lane wrote: Bruce Momjian br...@momjian.us writes: Looking at the pg_upgrade code some more, I found that it was not removing the PG_VERSION file when deleting = 8.4 tablespace files. This might confuse administrators so the

Re: [HACKERS] Simplifying replication

2010-10-19 Thread Greg Smith
Josh Berkus wrote: *shrug*. Robert asked me to write it up for the list based on the discussions around synch rep. Now you're going to bash me for doing so? Sorry, next time I'll make sure to bash Robert too. I don't have any problems with the basic ideas you're proposing, just concerns

Re: [HACKERS] max_wal_senders must die

2010-10-19 Thread Josh Berkus
Stefan, Dimitri, I disagree - limiting the maximum number of replication connections is important for my usecases. Can you explain more? I clearly don't understand your use case. If we want something fixed *now*, should we perhaps just bump the *default* value for max_wal_senders to 5 or

Re: [HACKERS] max_wal_senders must die

2010-10-19 Thread Greg Smith
Josh Berkus wrote: Under what bizarre set of circumstances would anyone have runaway connections from replicas to the master? Cloud computing deployments where additional replicas are brought up automatically in response to demand. It's easy to imagine a situation where a standby instance

Re: [HACKERS] Extensions, this time with a patch

2010-10-19 Thread Dimitri Fontaine
Tom Lane t...@sss.pgh.pa.us writes: You could argue that either way I guess. The script knows what it needs, but OTOH just about every extension there is will probably be generating useless NOTICEs unless something is done, so maybe the extension management code should take care of it for

Re: [HACKERS] Extensions, this time with a patch

2010-10-19 Thread Alvaro Herrera
Excerpts from Dimitri Fontaine's message of dom oct 17 16:30:47 -0300 2010: The bulk of it is now short enough to be inlined in the mail, and if you have more comments I guess they'll be directed at this portion of the patch, so let's make it easy: /* * We abuse some internal

Re: [HACKERS] Extensions, this time with a patch

2010-10-19 Thread Alvaro Herrera
Excerpts from Dimitri Fontaine's message of vie oct 15 16:15:23 -0300 2010: The cfparser patch didn't change, the current version is still v1. Hmm, this needs some cleanup; the comments still talk about the old function name; and about just the recovery.conf file. -- Álvaro Herrera

Re: [HACKERS] O_DSYNC broken on MacOS X?

2010-10-19 Thread Bruce Momjian
A.M. wrote: On Oct 19, 2010, at 11:22 AM, Bruce Momjian wrote: Greg Smith wrote: A.M. wrote: Perhaps a simpler tool could run a basic fsyncs-per-second test and prompt the DBA to check that the numbers are within the realm of possibility. This is what the test_fsync

Re: [HACKERS] Simplifying replication

2010-10-19 Thread Josh Berkus
Dimitri, Greg, I want to say a big big +1 here. The way replication and PITR setup are implemented now are a very good prototype, it's time to consolidate and get to something usable by normal people, as opposed to PostgreSQL full time geeks. Well, one thing to be addressed is separating the

Re: [HACKERS] max_wal_senders must die

2010-10-19 Thread Josh Berkus
On 10/19/2010 09:06 AM, Greg Smith wrote: I think Magnus's idea to bump the default to 5 triages the worst of the annoyance here, without dropping the feature (which has uses) or waiting for new development to complete. I'd be in favor of just committing that change right now, before it gets

Re: [HACKERS] Extensions, this time with a patch

2010-10-19 Thread Dimitri Fontaine
Alvaro Herrera alvhe...@commandprompt.com writes: The error message wording needs some work; maybe errmsg(file \%s\ could not be executed, filename) [...] I happened to notice that there are several pieces of code that are calling SPI_connect and SPI_finish without checking the return

Re: [HACKERS] Extensions, this time with a patch

2010-10-19 Thread Dimitri Fontaine
Alvaro Herrera alvhe...@commandprompt.com writes: Hmm, this needs some cleanup; the comments still talk about the old function name; and about just the recovery.conf file. Ah yes, thinking it's an easy patch is not helping. Please find attached a revised version of it. Regards, -- Dimitri

Re: [HACKERS] Issues with two-server Synch Rep

2010-10-19 Thread Josh Berkus
Absolutely. For a synch standby, you can't tolerate any standby delay at all. This means that anywhere from 1/4 to 3/4 of queries on the standby would be cancelled on any high-traffic OLTP server. Hence, useless. Don't agree with your numbers there and you seem to be assuming no

Re: [HACKERS] WIP: extensible enums

2010-10-19 Thread Andrew Dunstan
On 10/19/2010 12:21 AM, Andrew Dunstan wrote: On 10/18/2010 10:52 AM, Tom Lane wrote: We could possibly deal with enum types that follow the existing convention if we made the cache entry hold a list of all the original, known-to-be-sorted OIDs. (This could be reasonably compact and cheap

[HACKERS] Location for makeWholeRowVar()?

2010-10-19 Thread Tom Lane
The cause of bug #5716 is that preprocess_targetlist is trying to get away with creating a whole-row variable marked with type RECORDOID, even in cases where a specific composite type is known for the referenced RTE. This fails because now we might have non-equal Vars representing the same RTE

Re: [HACKERS] knngist plans

2010-10-19 Thread Marios Vodas
On Sat, Oct 16, 2010 at 8:42 PM, Oleg Bartunov o...@sai.msu.su wrote: Marios, you're right. There are several reasons for poor documentation, but of course, no excuse, we do need good docs any way ! It's very nice you're willing to write one, since it's always better seen from outside of

Re: [HACKERS] Timeline in the light of Synchronous replication

2010-10-19 Thread Robert Haas
On Mon, Oct 18, 2010 at 4:31 AM, Fujii Masao masao.fu...@gmail.com wrote: But, even though we will have done that, it should be noted that WAL in A might be ahead of that in B. For example, A might crash right after writing WAL to the disk and before sending it to B. So when we restart the old

[HACKERS] gist DatumGetPointer returns pointer to corrupted data

2010-10-19 Thread Marios Vodas
I index these structures in gist: typedef struct { uint8 type_flag; float8 xi; float8 yi; Timestamp ti; float8 xe; float8 ye; Timestamp te; int32 id; } typ_s_flagged; typedef struct { uint8 type_flag; float8 xl; float8 yl; Timestamp

Re: [HACKERS] Simplifying replication

2010-10-19 Thread Greg Stark
On Tue, Oct 19, 2010 at 9:16 AM, Josh Berkus j...@agliodbs.com wrote: Well, one thing to be addressed is separating the PITR functionality from replication.  PITR needs a lot of features -- timelines, recovery stop points, etc. -- which replication doesn't need or want.  I think that focussing

Re: [HACKERS] Simplifying replication

2010-10-19 Thread Josh Berkus
Greg, The way things stand you *always* need archived logs. Even if you have streaming set up it might try to use archived logs if it falls too far behind. Actually, you don't. If you're willing to accept possible desynchronization and recloning of the standbys, then you can skip the archive

Re: [HACKERS] Creation of temporary tables on read-only standby servers

2010-10-19 Thread Robert Haas
On Mon, Oct 18, 2010 at 6:05 PM, Greg Stark gsst...@mit.edu wrote: On Mon, Oct 18, 2010 at 1:27 PM, Robert Haas robertmh...@gmail.com wrote: It'd be kinda cool if we had it, but the work required to get there seems far out of proportion to the benefits ... I agree.  I think that's backing

Re: [HACKERS] Extensions, this time with a patch

2010-10-19 Thread Robert Haas
On Tue, Oct 19, 2010 at 12:09 PM, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Tom Lane t...@sss.pgh.pa.us writes: You could argue that either way I guess.  The script knows what it needs, but OTOH just about every extension there is will probably be generating useless NOTICEs unless

Re: [HACKERS] max_wal_senders must die

2010-10-19 Thread Robert Haas
On Tue, Oct 19, 2010 at 12:18 PM, Josh Berkus j...@agliodbs.com wrote: On 10/19/2010 09:06 AM, Greg Smith wrote: I think Magnus's idea to bump the default to 5 triages the worst of the annoyance here, without dropping the feature (which has uses) or waiting for new development to complete.  

Re: [HACKERS] Creation of temporary tables on read-only standby servers

2010-10-19 Thread Martijn van Oosterhout
On Tue, Oct 19, 2010 at 02:52:01PM -0400, Robert Haas wrote: Well, temp tables really want a separate set of XIDs with a separate CLOG, too. Admittedly, they don't necessarily need WAL, if you can make them work without catalog entries, but that's not so easy either. At one point there was

Re: [HACKERS] Creation of temporary tables on read-only standby servers

2010-10-19 Thread Robert Haas
On Tue, Oct 19, 2010 at 3:01 PM, Martijn van Oosterhout klep...@svana.org wrote: On Tue, Oct 19, 2010 at 02:52:01PM -0400, Robert Haas wrote: Well, temp tables really want a separate set of XIDs with a separate CLOG, too.  Admittedly, they don't necessarily need WAL, if you can make them work

Re: [HACKERS] Serializable snapshot isolation patch

2010-10-19 Thread Jeff Davis
On Mon, 2010-10-18 at 22:12 -0500, Kevin Grittner wrote: Hmmm... When Joe was looking at the patch he exposed an intermittent problem with btree indexes which turned out to be related to improper handling of the predicate locks during index page clean-up caused by a vacuum. Easy to fix once

Re: [HACKERS] patch: Add JSON datatype to PostgreSQL (GSoC, WIP)

2010-10-19 Thread Robert Haas
On Tue, Oct 19, 2010 at 11:22 AM, Terry Laurenzo t...@laurenzo.org wrote: Agreed.  BSON was born out of implementations that either lacked arbitrary precision numbers or had a strong affinity to an int/floating point way of thinking about numbers.  I believe that if BSON had an arbitrary

Re: [HACKERS] Extensions, this time with a patch

2010-10-19 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Tue, Oct 19, 2010 at 12:09 PM, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Either way is the key here too, so please find attached a revised (v5) patch which will force log_min_messages and client_min_messages to WARNING while the script is run.

Re: [HACKERS] knngist - 0.8

2010-10-19 Thread Robert Haas
2010/10/19 Teodor Sigaev teo...@sigaev.ru: Thinking about it that way, perhaps we could add an integer column amop_whats_it_good_for that gets used as a bit field.  That wouldn't require changing the index structure, although it might break some other things. OPERATOR strategy_number (

Re: [HACKERS] Issues with two-server Synch Rep

2010-10-19 Thread Simon Riggs
On Tue, 2010-10-19 at 09:36 -0700, Josh Berkus wrote: Absolutely. For a synch standby, you can't tolerate any standby delay at all. This means that anywhere from 1/4 to 3/4 of queries on the standby would be cancelled on any high-traffic OLTP server. Hence, useless. Don't agree with

Re: [HACKERS] gist DatumGetPointer returns pointer to corrupted data

2010-10-19 Thread Robert Haas
On Tue, Oct 19, 2010 at 1:46 PM, Marios Vodas mvo...@gmail.com wrote: I index these structures in gist: typedef struct {     uint8 type_flag;     float8 xi;     float8 yi;     Timestamp ti;     float8 xe;     float8 ye;     Timestamp te;     int32 id; } typ_s_flagged; typedef struct

Re: [HACKERS] max_wal_senders must die

2010-10-19 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Tue, Oct 19, 2010 at 12:18 PM, Josh Berkus j...@agliodbs.com wrote: On 10/19/2010 09:06 AM, Greg Smith wrote: I think Magnus's idea to bump the default to 5 triages the worst of the annoyance here, without dropping the feature (which has uses) or

Re: [HACKERS] patch: Add JSON datatype to PostgreSQL (GSoC, WIP)

2010-10-19 Thread David E. Wheeler
On Oct 19, 2010, at 12:17 PM, Robert Haas wrote: I think we should take a few steps back and ask why we think that binary encoding is the way to go. We store XML as text, for example, and I can't remember any complaints about that on -bugs or -performance, so why do we think JSON will be

Re: [HACKERS] patch: Add JSON datatype to PostgreSQL (GSoC, WIP)

2010-10-19 Thread Joseph Adams
On Tue, Oct 19, 2010 at 11:22 AM, Terry Laurenzo t...@laurenzo.org wrote: Perhaps we should enumerate the attributes of what would make a good binary encoding? Not sure if we're discussing the internal storage format or the binary send/recv format, but in my humble opinion, some attributes of a

Re: [HACKERS] plan time of MASSIVE partitioning ...

2010-10-19 Thread Boszormenyi Zoltan
Hi, Boszormenyi Zoltan írta: There is one problem with the patch, it doesn't survive make check. One of the regression tests fails the Assert(!cur_em-em_is_child); line in process_equivalence() in equivclass.c, but I couldn't yet find it what causes it. The why is vaguely clear:

Re: [HACKERS] Extensions, this time with a patch

2010-10-19 Thread Alvaro Herrera
Excerpts from Dimitri Fontaine's message of mar oct 19 13:09:47 -0300 2010: Tom Lane t...@sss.pgh.pa.us writes: You could argue that either way I guess. The script knows what it needs, but OTOH just about every extension there is will probably be generating useless NOTICEs unless something

Re: [HACKERS] plan time of MASSIVE partitioning ...

2010-10-19 Thread Tom Lane
Boszormenyi Zoltan z...@cybertec.at writes: The problem is with the two functions in path/equivclass.c, as process_equivalance() and those functions are all walk the tree, and the current RBTree code can only deal with one walk at a time. We need to push/pop the iterator state to be able to

Re: [HACKERS] max_wal_senders must die

2010-10-19 Thread Rob Wultsch
On Tue, Oct 19, 2010 at 12:32 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Tue, Oct 19, 2010 at 12:18 PM, Josh Berkus j...@agliodbs.com wrote: On 10/19/2010 09:06 AM, Greg Smith wrote: I think Magnus's idea to bump the default to 5 triages the worst of

Re: [HACKERS] knngist plans

2010-10-19 Thread Oleg Bartunov
On Tue, 19 Oct 2010, Marios Vodas wrote: On Sat, Oct 16, 2010 at 8:42 PM, Oleg Bartunov o...@sai.msu.su wrote: Marios, you're right. There are several reasons for poor documentation, but of course, no excuse, we do need good docs any way ! It's very nice you're willing to write one, since

Re: [HACKERS] max_wal_senders must die

2010-10-19 Thread Robert Haas
On Tue, Oct 19, 2010 at 3:32 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Tue, Oct 19, 2010 at 12:18 PM, Josh Berkus j...@agliodbs.com wrote: On 10/19/2010 09:06 AM, Greg Smith wrote: I think Magnus's idea to bump the default to 5 triages the worst of the

Re: [HACKERS] patch: Add JSON datatype to PostgreSQL (GSoC, WIP)

2010-10-19 Thread Robert Haas
On Tue, Oct 19, 2010 at 3:40 PM, Joseph Adams joeyadams3.14...@gmail.com wrote: On Tue, Oct 19, 2010 at 3:17 PM, Robert Haas robertmh...@gmail.com wrote: I think we should take a few steps back and ask why we think that binary encoding is the way to go.  We store XML as text, for example, and

Re: [HACKERS] max_wal_senders must die

2010-10-19 Thread Josh Berkus
Yes. This isn't just a numeric parameter; it's also a boolean indicating do I want to pay the overhead to be prepared to be a replication master?. Since this is the first time I've heard of the overhead, it would be hard for me to have taken that into consideration. If there was

Re: [HACKERS] Creation of temporary tables on read-only standby servers

2010-10-19 Thread Greg Stark
On Tue, Oct 19, 2010 at 12:03 PM, Robert Haas robertmh...@gmail.com wrote: The trick is that it would require us to have two pg_class tables, two pg_attribute tables, two pg_attrdef tables, etc.: in each case, one permanent and one temporary.  I am not sure how complex that will turn out to

Re: [HACKERS] gist DatumGetPointer returns pointer to corrupted data

2010-10-19 Thread Marios Vodas
On Tue, Oct 19, 2010 at 10:23 PM, Robert Haas robertmh...@gmail.com wrote: Is pg_type.typlen set correctly? Are you refering to table pg_type? If yes, those type structures exist only in c I didn't write any in-out functions, so they don't exist in sql level. I pass a different data type

Re: [HACKERS] patch: Add JSON datatype to PostgreSQL (GSoC, WIP)

2010-10-19 Thread Terry Laurenzo
On Tue, Oct 19, 2010 at 2:46 PM, Robert Haas robertmh...@gmail.com wrote: On Tue, Oct 19, 2010 at 3:40 PM, Joseph Adams joeyadams3.14...@gmail.com wrote: On Tue, Oct 19, 2010 at 3:17 PM, Robert Haas robertmh...@gmail.com wrote: I think we should take a few steps back and ask why we think

[HACKERS] pg_rawdump

2010-10-19 Thread Stephen R. van den Berg
I spent yesterday writing a new tool pg_rawdump (which will be released as open source in due course), which takes the table files in an arbitrary pgsql database, and is able to transform those back into tables (including toast values). In the course of doing this (a customer needed it because he

Re: [HACKERS] Creation of temporary tables on read-only standby servers

2010-10-19 Thread Pavel Stehule
2010/10/19 Greg Stark gsst...@mit.edu: On Tue, Oct 19, 2010 at 12:03 PM, Robert Haas robertmh...@gmail.com wrote: The trick is that it would require us to have two pg_class tables, two pg_attribute tables, two pg_attrdef tables, etc.: in each case, one permanent and one temporary.  I am not

Re: [HACKERS] patch: Add JSON datatype to PostgreSQL (GSoC, WIP)

2010-10-19 Thread Greg Stark
On Tue, Oct 19, 2010 at 12:17 PM, Robert Haas robertmh...@gmail.com wrote: I think we should take a few steps back and ask why we think that binary encoding is the way to go.  We store XML as text, for example, and I can't remember any complaints about that on -bugs or -performance, so why do

Re: [HACKERS] patch: Add JSON datatype to PostgreSQL (GSoC, WIP)

2010-10-19 Thread Pavel Stehule
After spending a week in the morass of this, I have to say that I am less certain than I was on any front regarding the text/binary distinction.  I'll take some time and benchmark different cases.  My hypothesis is that a well implemented binary structure and conversions will add minimal

Re: [HACKERS] pg_rawdump

2010-10-19 Thread Greg Stark
On Tue, Oct 19, 2010 at 1:12 PM, Stephen R. van den Berg s...@cuci.nl wrote: In order to simplify recovery at this point (enormously), it would have been very helpful (at almost negligible cost), to have the name of the table, the name of the columns, and the types of the columns available.

Re: [HACKERS] patch: Add JSON datatype to PostgreSQL (GSoC, WIP)

2010-10-19 Thread Pavel Stehule
2010/10/19 Greg Stark gsst...@mit.edu: On Tue, Oct 19, 2010 at 12:17 PM, Robert Haas robertmh...@gmail.com wrote: I think we should take a few steps back and ask why we think that binary encoding is the way to go.  We store XML as text, for example, and I can't remember any complaints about

Re: [HACKERS] pg_rawdump

2010-10-19 Thread Stephen R. van den Berg
Greg Stark wrote: On Tue, Oct 19, 2010 at 1:12 PM, Stephen R. van den Berg s...@cuci.nl wrote: In order to simplify recovery at this point (enormously), it would have been very helpful (at almost negligible cost), to have the name of the table, the name of the columns, and the types of the

[HACKERS] Domains versus arrays versus typmods

2010-10-19 Thread Tom Lane
In bug #5717, Richard Huxton complains that a domain declared like CREATE DOMAIN mynums numeric(4,2)[1]; doesn't work properly, ie, the typmod isn't enforced in places where it reasonably ought to be. I dug into this a bit, and found that there are more worms in this can than I first

Re: [HACKERS] Serializable snapshot isolation patch

2010-10-19 Thread Kevin Grittner
Jeff Davis pg...@j-davis.com wrote: I briefly looked into this when I woke up this morning, and I think I'm close. I can reproduce it every time, so I should be able to fix this as soon as I can find some free time (tomorrow night, probably). OK, I'll focus on other areas. I might also

Re: [HACKERS] Creation of temporary tables on read-only standby servers

2010-10-19 Thread Tom Lane
Greg Stark gsst...@mit.edu writes: On Tue, Oct 19, 2010 at 12:03 PM, Robert Haas robertmh...@gmail.com wrote: The trick is that it would require us to have two pg_class tables, two pg_attribute tables, two pg_attrdef tables, etc.: in each case, one permanent and one temporary.  I am not sure

Re: [HACKERS] patch: Add JSON datatype to PostgreSQL (GSoC, WIP)

2010-10-19 Thread Tom Lane
Terry Laurenzo t...@laurenzo.org writes: After spending a week in the morass of this, I have to say that I am less certain than I was on any front regarding the text/binary distinction. I'll take some time and benchmark different cases. My hypothesis is that a well implemented binary

Re: [HACKERS] pg_rawdump

2010-10-19 Thread Tom Lane
Stephen R. van den Berg s...@cuci.nl writes: In order to simplify recovery at this point (enormously), it would have been very helpful (at almost negligible cost), to have the name of the table, the name of the columns, and the types of the columns available. Why don't we insert that data

Re: [HACKERS] patch: Add JSON datatype to PostgreSQL (GSoC, WIP)

2010-10-19 Thread Tom Lane
Greg Stark gsst...@mit.edu writes: The elephant in the room is if the binary encoded form is smaller then it occupies less ram and disk bandwidth to copy it around. It seems equally likely that a binary-encoded form could be larger than the text form (that's often true for our other datatypes).

Re: [HACKERS] Creation of temporary tables on read-only standby servers

2010-10-19 Thread Greg Stark
On Tue, Oct 19, 2010 at 3:45 PM, Tom Lane t...@sss.pgh.pa.us wrote: Relcache entries alone are not gonna work.  There is way too much stuff that assumes that tables are correctly represented in the system catalogs. Well we're talking about multiple things now. In the global temporary table

Re: [HACKERS] patch: Add JSON datatype to PostgreSQL (GSoC, WIP)

2010-10-19 Thread Terry Laurenzo
On Tue, Oct 19, 2010 at 4:51 PM, Tom Lane t...@sss.pgh.pa.us wrote: Terry Laurenzo t...@laurenzo.org writes: After spending a week in the morass of this, I have to say that I am less certain than I was on any front regarding the text/binary distinction. I'll take some time and benchmark

Re: [HACKERS] Creation of temporary tables on read-only standby servers

2010-10-19 Thread Tom Lane
Greg Stark gsst...@mit.edu writes: On Tue, Oct 19, 2010 at 3:45 PM, Tom Lane t...@sss.pgh.pa.us wrote: Relcache entries alone are not gonna work.  There is way too much stuff that assumes that tables are correctly represented in the system catalogs. Well we're talking about multiple things

  1   2   >