Re: [HACKERS] pg_upgrade code questions

2010-05-14 Thread Devrim GÜNDÜZ
On Thu, 2010-05-13 at 17:19 +0200, Magnus Hagander wrote: I say remove it. On all accounts. There's a fork of postgres for EDB AS, shouldn't there be a fork of pg_upgrade the same way, if it requires special code? The code in community postgresql certainly shouldn't have any EDB AS code in

Re: [HACKERS] pg_upgrade code questions

2010-05-14 Thread Magnus Hagander
On Fri, May 14, 2010 at 5:34 AM, Bruce Momjian br...@momjian.us wrote: Takahiro Itagaki wrote: Bruce Momjian br...@momjian.us wrote: 2. extern PGDLLIMPORT pg_upgrade has own definitions of extern PGDLLIMPORT Oid binary_upgrade_next_xxx The issue here is that you

[HACKERS] Japanies translation breaks solaris build

2010-05-14 Thread Zdenek Kotala
http://www.pgbuildfarm.org/cgi-bin/show_log.pl?nm=comet_mothdt=2010-05-13%2021:06:01 msgfmt -o po/ja.mo po/ja.po WARNING: the string after closing is ignored at line number 11. Error, No space after directive at line number 2008. ERROR: Exiting... gmake[2]: *** [po/ja.mo] Error 2 The problem

Re: [HACKERS] List traffic

2010-05-14 Thread Yeb Havinga
Marc G. Fournier wrote: On Thu, 13 May 2010, Alvaro Herrera wrote: Excerpts from Yeb Havinga's message of jue may 13 15:06:53 -0400 2010: My $0.02 - I like the whole 'don't sort, search' (or how did they call it?) just let the inbox fill up, google is fast enough. What would be really

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

2010-05-14 Thread Nicolas Barbier
2010/5/14 Greg Stark gsst...@mit.edu: On Thu, May 13, 2010 at 10:25 PM, Florian Pflug f...@phlo.org wrote: C1: BEGIN C1: SELECT * FROM t WHERE id = 1 FOR UPDATE C2: BEGIN C2: SET TRANSACTION ISOLATION LEVEL SERIALIZABLE C2: SELECT * FROM t -- Take snapshot before C1 commits C1: COMMIT

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

2010-05-14 Thread Florian Pflug
On May 14, 2010, at 2:37 , Greg Stark wrote: On Thu, May 13, 2010 at 10:25 PM, Florian Pflug f...@phlo.org wrote: C1: BEGIN C1: SELECT * FROM t WHERE id = 1 FOR UPDATE C2: BEGIN C2: SET TRANSACTION ISOLATION LEVEL SERIALIZABLE C2: SELECT * FROM t -- Take snapshot before C1 commits C1:

Re: [HACKERS] nvarchar notation accepted?

2010-05-14 Thread Florian Pflug
On May 14, 2010, at 5:56 , Jaime Casanova wrote: On Thu, May 13, 2010 at 10:13 PM, Takahiro Itagaki itagaki.takah...@oss.ntt.co.jp wrote: Jaime Casanova ja...@2ndquadrant.com wrote: i migrate a ms sql server database to postgres and was trying some queries from the application to find if

Re: [HACKERS] Japanies translation breaks solaris build

2010-05-14 Thread Takahiro Itagaki
Zdenek Kotala zdenek.kot...@sun.com wrote: http://www.pgbuildfarm.org/cgi-bin/show_log.pl?nm=comet_mothdt=2010-05-13%2021:06:01 The problem is that it contains mix of DOS/Unix end of lines. I removed two CRs in ja.po. Regards, --- Takahiro Itagaki NTT Open Source Software Center -- Sent

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

2010-05-14 Thread Kevin Grittner
[slight rearrangement] Florian Pflug wrote: I'm very exited about the work you're doing Always nice to hear. :-) I view my proposal as pretty orthogonal to that work. My proposal allows for simple FK-like constraints to be implemented at user-level that are correct for all

Re: [HACKERS] Synchronous replication patch built on SR

2010-05-14 Thread Fujii Masao
2010/4/29 Boszormenyi Zoltan z...@cybertec.at: attached is a patch that does $SUBJECT, we are submitting it for 9.1. I have updated it to today's CVS after the wal_level GUC went in. I'm planning to create the synchronous replication patch for 9.0, too. My design is outlined in the wiki. Let's

Re: [HACKERS] How to know killed by pg_terminate_backend

2010-05-14 Thread Robert Haas
On Thu, May 13, 2010 at 8:20 PM, Tatsuo Ishii is...@postgresql.org wrote: Maybe we could make PostgreSQL a little bit smarter so that it returns a different code than 57P01 when killed by pg_terminate_backend(). Seems reasonable. Does the victim backend currently know why it has been

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

2010-05-14 Thread Florian Pflug
On May 14, 2010, at 12:56 , Kevin Grittner wrote: True serializable transaction are much more powerful than what I proposed, but at a much higher price too, due to the necessity of SIREAD locks. I think that SIREAD locks will generally be cheaper than SELECT FOR UPDATE, since the former

Re: [HACKERS] Japanies translation breaks solaris build

2010-05-14 Thread Zdenek Kotala
Takahiro Itagaki píše v pá 14. 05. 2010 v 19:38 +0900: Zdenek Kotala zdenek.kot...@sun.com wrote: http://www.pgbuildfarm.org/cgi-bin/show_log.pl?nm=comet_mothdt=2010-05-13%2021:06:01 The problem is that it contains mix of DOS/Unix end of lines. I removed two CRs in ja.po. Thanks. Gothic

Re: [HACKERS] Synchronous replication patch built on SR

2010-05-14 Thread Boszormenyi Zoltan
Fujii Masao írta: 2010/4/29 Boszormenyi Zoltan z...@cybertec.at: attached is a patch that does $SUBJECT, we are submitting it for 9.1. I have updated it to today's CVS after the wal_level GUC went in. I'm planning to create the synchronous replication patch for 9.0, too. My design

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

2010-05-14 Thread Kevin Grittner
Florian Pflug f...@phlo.org wrote: On May 14, 2010, at 12:56 , Kevin Grittner wrote: I think that SIREAD locks will generally be cheaper than SELECT FOR UPDATE, since the former don't require any disk I/O and the latter do. I can see how a single SIREAD lock can potentially be cheaper

Re: [HACKERS] List traffic

2010-05-14 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 ... is there a reason why, other the fact that we don't do now, that we can't just put in a restriction against cross posting altogether? Because that would be shooting ourselves in the foot. Cross-posting is often desirable. If we had a

Re: [HACKERS] List traffic

2010-05-14 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 There is no reason why advocacy can't happen on general. Theoretically www could be on hackers (although I do see the point of a separate list). I don't feel as strong about -advocacy being removed, but we certainly can fold in -sql and

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

2010-05-14 Thread Florian Pflug
On May 14, 2010, at 15:54 , Kevin Grittner wrote: Florian Pflug f...@phlo.org wrote: On May 14, 2010, at 12:56 , Kevin Grittner wrote: unless your patch completely removes support for snapshot isolation (what is current called SERIALIZABLE) Both SERIALIZABLE and REPEATABLE READ currently

Re: [HACKERS] List traffic

2010-05-14 Thread Kevin Grittner
Greg Sabino Mullane g...@turnstep.com wrote: Would anyone argue against rolling those two (sql and admin) into -general as a first step? At the risk of repeating myself, I won't be able to keep up with the traffic of the combined list; so rather than read 100% of the messages from a smaller

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

2010-05-14 Thread Kevin Grittner
Florian Pflug f...@phlo.org wrote: I must admit that I wasn't able to find an explicit reference to Oracle's behavior in their docs, so I had to resort to experiments. They do have examples showing how to do FK-like constraints with triggers, and those don't contain any warning whatsoever

Re: [HACKERS] List traffic

2010-05-14 Thread Marc G. Fournier
On Fri, 14 May 2010, Greg Sabino Mullane wrote: -BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 ... is there a reason why, other the fact that we don't do now, that we can't just put in a restriction against cross posting altogether? Because that would be shooting ourselves in the

Re: [HACKERS] List traffic

2010-05-14 Thread Marc G. Fournier
On Fri, 14 May 2010, Greg Sabino Mullane wrote: -BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 There is no reason why advocacy can't happen on general. Theoretically www could be on hackers (although I do see the point of a separate list). I don't feel as strong about -advocacy being

Re: [HACKERS] List traffic

2010-05-14 Thread Marc G. Fournier
On Fri, 14 May 2010, Kevin Grittner wrote: Greg Sabino Mullane g...@turnstep.com wrote: Would anyone argue against rolling those two (sql and admin) into -general as a first step? At the risk of repeating myself, I won't be able to keep up with the traffic of the combined list; so rather

Re: [HACKERS] List traffic

2010-05-14 Thread Kevin Grittner
Marc G. Fournier scra...@hub.org wrote: -sql : how to write a query -performance : how to improve performance of my queries -admin : how to admin the server -novice : I'm a new user -odbc : how to use ... -php : php related interface questions -interfaces : more general then -odbc why

Re: [HACKERS] List traffic

2010-05-14 Thread Tom Lane
Marc G. Fournier scra...@hub.org writes: why not close down -general so that ppl *have* to use better pick where to post their question ... I can't imagine that there's not going to need to be a catchall list for problems that don't fit into any of the subcategories. More generally, we

Re: [HACKERS] HS/SR Assert server crash

2010-05-14 Thread Bruce Momjian
Bruce Momjian wrote: I was able to easily crash the standby server today just by starting it and connecting to it via psql. The master was idle. The failure was: LOG: streaming replication successfully connected to primary TRAP: FailedAssertion(!(((xmax) = ((TransactionId)

Re: [HACKERS] JSON manipulation functions

2010-05-14 Thread Bruce Momjian
Joseph Adams wrote: == array/object conversion == The json_object function converts a tuple to a JSON object. If there are duplicate column names, there will be duplicate keys in the resulting JSON object. json_object([content [AS name] [, ...]]) returns json Likewise, the json_array

Re: [HACKERS] List traffic

2010-05-14 Thread Marc G. Fournier
On Fri, 14 May 2010, Yeb Havinga wrote: Marc G. Fournier wrote: On Thu, 13 May 2010, Alvaro Herrera wrote: Excerpts from Yeb Havinga's message of jue may 13 15:06:53 -0400 2010: My $0.02 - I like the whole 'don't sort, search' (or how did they call it?) just let the inbox fill up, google

[HACKERS] [PATCH] Add SIGCHLD catch to psql

2010-05-14 Thread Stephen Frost
Greetings, Toying around with FETCH_COUNT today, I discovered that it didn't do the #1 thing I really wanted to use it for- query large tables without having to worry about LIMIT to see the first couple hundred records. The reason is simple- psql ignores $PAGER exiting, which means that

Re: [HACKERS] JSON manipulation functions

2010-05-14 Thread Pavel Stehule
2010/5/14 Bruce Momjian br...@momjian.us: Joseph Adams wrote: == array/object conversion == The json_object function converts a tuple to a JSON object.  If there are duplicate column names, there will be duplicate keys in the resulting JSON object. json_object([content [AS name] [, ...]])

Re: [HACKERS] List traffic

2010-05-14 Thread Kevin Grittner
Tom Lane t...@sss.pgh.pa.us wrote: I can't imagine that there's not going to need to be a catchall list for problems that don't fit into any of the subcategories. More generally, we already have most of the lists that you suggest, and we already know that people frequently don't find the

Re: [HACKERS] List traffic

2010-05-14 Thread Josh Berkus
There is no reason why advocacy can't happen on general. Theoretically www could be on hackers (although I do see the point of a separate list). First off, this is absolutely the wrong list to be discussing management of PostgreSQL lists. That belongs on pgsql-www. And, I'll point out,

Re: [HACKERS] List traffic

2010-05-14 Thread Yeb Havinga
Marc G. Fournier wrote: On Fri, 14 May 2010, Yeb Havinga wrote: Marc G. Fournier wrote: On Thu, 13 May 2010, Alvaro Herrera wrote: Excerpts from Yeb Havinga's message of jue may 13 15:06:53 -0400 2010: My $0.02 - I like the whole 'don't sort, search' (or how did they call it?) just let

Re: [HACKERS] JSON manipulation functions

2010-05-14 Thread Robert Haas
On Thu, May 13, 2010 at 9:47 PM, Joseph Adams joeyadams3.14...@gmail.com wrote: The following function returns the type of any JSON value. json_type as enum ('null', 'string', 'number', 'boolean', 'object', 'array') json_type(json) returns json_type Seems reasonable. Would it be a bad idea

Re: [HACKERS] List traffic

2010-05-14 Thread Marc G. Fournier
On Fri, 14 May 2010, Kevin Grittner wrote: Well, redoubling our current efforts to direct people to more specific lists would accomplish nothing, since doubling zero leaves you with zero. The description of -general includes: Agreed ... Given that, the fact that -admin, -novice, -sql, and

Re: [HACKERS] JSON manipulation functions

2010-05-14 Thread Mike Rylander
On Fri, May 14, 2010 at 1:15 PM, Robert Haas robertmh...@gmail.com wrote: On Thu, May 13, 2010 at 9:47 PM, Joseph Adams joeyadams3.14...@gmail.com wrote: [snip] == array/object conversion == The json_object function converts a tuple to a JSON object.  If there are duplicate column names,

[HACKERS] recovery consistent != hot standby

2010-05-14 Thread Robert Haas
While looking through postmaster.c and xlog.c I discovered that we're being a little bit loose about our use of terminology. Maybe this was right when committed (I think, at that point, Hot Standby was always on) but it's not right any more. It appears that we only enter the

[HACKERS] fillfactor gets set to zero for toast tables

2010-05-14 Thread Tom Lane
I've been able to reproduce the problem described here: http://archives.postgresql.org/pgsql-bugs/2010-05/msg00100.php Do this: create table foo(f1 text); alter table foo set (toast.autovacuum_enabled = false); insert into foo values(repeat('xyzzy',10)); vacuum verbose foo; Notice that the

Re: [HACKERS] recovery getting interrupted is not so unusual as it used to be

2010-05-14 Thread Robert Haas
On Thu, May 13, 2010 at 1:28 AM, Fujii Masao masao.fu...@gmail.com wrote: On Thu, May 13, 2010 at 12:10 PM, Robert Haas robertmh...@gmail.com wrote: Hmm, it seems this is my night to rediscover the wisdom of your previous proposals.  I think that state would only be appropriate when we

Re: [HACKERS] Generalized Inverted Generalized Search Tree

2010-05-14 Thread Robert Haas
On Fri, May 14, 2010 at 12:03 AM, Takahiro Itagaki itagaki.takah...@oss.ntt.co.jp wrote: We can index multiple scalar values per row with GIN access method, and also can index single vector value per row with GiST AM. Is it worth having a new AM to index multiple vector values per row? It

Re: [HACKERS] fillfactor gets set to zero for toast tables

2010-05-14 Thread Alvaro Herrera
Excerpts from Tom Lane's message of vie may 14 14:19:30 -0400 2010: The problem is that if any reloption is set for the toast table, we build a StdRdOptions struct in which fillfactor is zero, and then all the code that actually uses fillfactor honors that. And the reason fillfactor gets left

[HACKERS] Generating Lots of PKs with nextval(): A Feature Proposal

2010-05-14 Thread Peter Crabtree
Recently, in preparation for migrating an application to postgres, I got to this part of the manual (which is *excellent* so far, by the way): http://www.postgresql.org/docs/8.4/interactive/functions-sequence.html A quick check with the folks on #postgresql confirmed my understanding, which was

Re: [HACKERS] fillfactor gets set to zero for toast tables

2010-05-14 Thread Tom Lane
Alvaro Herrera alvhe...@commandprompt.com writes: Excerpts from Tom Lane's message of vie may 14 14:19:30 -0400 2010: What seems more rational is to provide toast.fillfactor but give it min/max/default = 100. Adding an entry to intRelOpts should be enough to fix this bug, correct? I think

Re: [HACKERS] Generating Lots of PKs with nextval(): A Feature Proposal

2010-05-14 Thread Kenneth Marshall
Hi Peter, All you need to do is define your own sequence with an increment of 500. Look at: http://www.postgresql.org/docs/8.4/static/sql-createsequence.html Regards, Ken On Fri, May 14, 2010 at 02:56:18PM -0400, Peter Crabtree wrote: Recently, in preparation for migrating an application to

Re: [HACKERS] JSON manipulation functions

2010-05-14 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Thu, May 13, 2010 at 9:47 PM, Joseph Adams joeyadams3.14...@gmail.com wrote: [] retrieves a value of a JSON array/object by (one-based) index.  In other words, value[n] is equivalent to selecting the nth row of json_values(value) (provided value is

Re: [HACKERS] List traffic

2010-05-14 Thread Marc G. Fournier
On Fri, 14 May 2010, Josh Berkus wrote: First off, this is absolutely the wrong list to be discussing management of PostgreSQL lists. That belongs on pgsql-www. Actually, this is as good a list as any ... -www is for WWW related issues, not mailing list ... be as inappropriate there as it

Re: [HACKERS] List traffic

2010-05-14 Thread Selena Deckelmann
On Fri, May 14, 2010 at 9:51 AM, Josh Berkus j...@agliodbs.com wrote: Second, regarding advocacy: no, absolutely not.  -advocacy is a working list and not a virtual water cooler. +1. I would find it very difficult to manage having -advocacy thrown into -general. If folks think that

Re: [HACKERS] Synchronous replication patch built on SR

2010-05-14 Thread Robert Haas
On Fri, May 14, 2010 at 9:33 AM, Boszormenyi Zoltan z...@cybertec.at wrote: If  min_sync_replication_clients == 0, then the replication is async. If  min_sync_replication_clients == max_wal_senders then the replication is fully synchronous. If 0 min_sync_replication_clients max_wal_senders

Re: [HACKERS] List traffic

2010-05-14 Thread Bruce Momjian
Kevin Grittner wrote: Tom Lane t...@sss.pgh.pa.us wrote: I can't imagine that there's not going to need to be a catchall list for problems that don't fit into any of the subcategories. More generally, we already have most of the lists that you suggest, and we already know that

Re: [HACKERS] List traffic

2010-05-14 Thread Marc G. Fournier
On Fri, 14 May 2010, Bruce Momjian wrote: FYI, I usually email new people privately that cross-posting a question can cause the question to be ignored. They usually respond positively and avoid it in the future. We all have our own methods ... for instance, I just CC'd this to -chat with a

Re: [HACKERS] [PATCH] Add SIGCHLD catch to psql

2010-05-14 Thread Bruce Momjian
Stephen Frost wrote: -- Start of PGP signed section. Greetings, Toying around with FETCH_COUNT today, I discovered that it didn't do the #1 thing I really wanted to use it for- query large tables without having to worry about LIMIT to see the first couple hundred records. The reason

Re: [HACKERS] List traffic

2010-05-14 Thread Greg Smith
Tom Lane wrote: I can see the need for small tightly-focused special lists. How about a list devoted to discussions about reorganizing the lists? It would get plenty of traffic, and then I could not subscribe to that and have that many less messages to read. There is only one viable

Re: [HACKERS] List traffic

2010-05-14 Thread Greg Stark
On Fri, May 14, 2010 at 4:39 AM, Greg Smith g...@2ndquadrant.com wrote: Is it helpful to novices that they can subscribe to a list when they won't be overwhelmed by traffic, and can ask questions without being too concerned about being harassed for being newbies?  Probably. Only if they

Re: [HACKERS] List traffic

2010-05-14 Thread Marc G. Fournier
On Fri, 14 May 2010, Greg Stark wrote: On Fri, May 14, 2010 at 4:39 AM, Greg Smith g...@2ndquadrant.com wrote: Is it helpful to novices that they can subscribe to a list when they won't be overwhelmed by traffic, and can ask questions without being too concerned about being harassed for being

Re: [HACKERS] List traffic

2010-05-14 Thread Robert Haas
On Thu, May 13, 2010 at 11:39 PM, Greg Smith g...@2ndquadrant.com wrote: The only real argument to keep some more targeted lists is for the benefit of the people who subscribe to them, not we the faithful, so that they can have something that isn't a firehose of messages to sort through.  Is it

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

2010-05-14 Thread Robert Haas
On Thu, May 13, 2010 at 5:39 PM, Tom Lane t...@sss.pgh.pa.us wrote: Florian Pflug f...@phlo.org writes: All in all, I believe that SHARE and UPDATE row-level locks should be changed to cause concurrent UPDATEs to fail with a serialization error. I don't see an argument for doing that for FOR

Re: [HACKERS] Generating Lots of PKs with nextval(): A Feature Proposal

2010-05-14 Thread hubert depesz lubaczewski
On Fri, May 14, 2010 at 02:07:27PM -0500, Kenneth Marshall wrote: Hi Peter, All you need to do is define your own sequence with an increment of 500. Look at: http://www.postgresql.org/docs/8.4/static/sql-createsequence.html This is often not enough. For example - I want standard increment

Re: [HACKERS] List traffic

2010-05-14 Thread Kevin Grittner
Greg Stark gsst...@mit.edu wrote: If they're interested in performance topics and they're not subscribed to -general then they're missing *most* of what they're interested in which doesn't take place on -performance. Well, I for one can't currently suck the end of the fire hose which is

Re: [HACKERS] Parameter oddness; was HS/SR Assert server crash

2010-05-14 Thread Bruce Momjian
bruce wrote: and my slave recovery.conf was: restore_command = 'cp /u/pg/archive/%f %p' # e.g. 'cp /mnt/server/archivedir/%f %p' standby_mode = 'on' primary_conninfo = 'host=localhost port=5432' # e.g. 'host=localhost port=5432' Let me know

Re: [HACKERS] Parameter oddness; was HS/SR Assert server crash

2010-05-14 Thread Kevin Grittner
Bruce Momjian br...@momjian.us wrote: One odd thing is we have two paramters that mention hot_standby --- on the master we have to do in postgresql.conf: wal_level = hot_standby and on the slave we do in postgresql.conf: hot_standby = on That is a little confusing.

Re: [HACKERS] recovery consistent != hot standby

2010-05-14 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: PM_RECOVERY_CONSISTENT - PM_HOT_STANDBY PMSIGNAL_RECOVERY_CONSISTENT - PMSIGNAL_BEGIN_HOT_STANDBY +1. From the point of view of the postmaster, whether the state transition happens immediately upon reaching consistency, or at a later time, or perhaps

Re: [HACKERS] Generating Lots of PKs with nextval(): A Feature Proposal

2010-05-14 Thread Tom Lane
Peter Crabtree peter.crabt...@gmail.com writes: Now, I was reminded that I could simply do this: SELECT nextval('my_seq') FROM generate_series(1, 500); But of course then I would have no guarantee that I would get a contiguous block of ids, The existing cache behavior will already handle

Re: [HACKERS] Generating Lots of PKs with nextval(): A Feature Proposal

2010-05-14 Thread Robert Haas
On Fri, May 14, 2010 at 5:04 PM, hubert depesz lubaczewski dep...@depesz.com wrote: On Fri, May 14, 2010 at 02:07:27PM -0500, Kenneth Marshall wrote: Hi Peter, All you need to do is define your own sequence with an increment of 500. Look at:

Re: [HACKERS] max_standby_delay considered harmful

2010-05-14 Thread Robert Haas
On Thu, May 13, 2010 at 1:12 PM, Josh Berkus j...@agliodbs.com wrote: On 5/12/10 8:07 PM, Robert Haas wrote: I think that would be a good thing to check (it'll confirm whether this is the same bug), but I'm not convinced we should actually fix it that way.  Prior to 8.4, we handled a smart

Re: [HACKERS] max_standby_delay considered harmful

2010-05-14 Thread Josh Berkus
This would be OK as long as we document it well. We patched the shutdown the way we did specifically because Fujii thought it would be an easy fix; if it's complicated, we should revert it and document the issue for DBAs. I don't understand this comment. In other words, I'm saying that

Re: [HACKERS] Generating Lots of PKs with nextval(): A Feature Proposal

2010-05-14 Thread Peter Crabtree
On Fri, May 14, 2010 at 5:27 PM, Tom Lane t...@sss.pgh.pa.us wrote: Peter Crabtree peter.crabt...@gmail.com writes: Now, I was reminded that I could simply do this: SELECT nextval('my_seq') FROM generate_series(1, 500); But of course then I would have no guarantee that I would get a

Re: [HACKERS] Generating Lots of PKs with nextval(): A Feature Proposal

2010-05-14 Thread Peter Crabtree
On Fri, May 14, 2010 at 5:29 PM, Robert Haas robertmh...@gmail.com wrote: On Fri, May 14, 2010 at 5:04 PM, hubert depesz lubaczewski dep...@depesz.com wrote: On Fri, May 14, 2010 at 02:07:27PM -0500, Kenneth Marshall wrote: Hi Peter, All you need to do is define your own sequence with an

Re: [HACKERS] Generating Lots of PKs with nextval(): A Feature Proposal

2010-05-14 Thread Tom Lane
Peter Crabtree peter.crabt...@gmail.com writes: On Fri, May 14, 2010 at 5:29 PM, Robert Haas robertmh...@gmail.com wrote: If we do this, I'm inclined to think that the extra argument to nextval() should be treated as overriding the base increment rather than specifying a multiplier for it.  

Re: [HACKERS] max_standby_delay considered harmful

2010-05-14 Thread Robert Haas
On Fri, May 14, 2010 at 5:51 PM, Josh Berkus j...@agliodbs.com wrote: This would be OK as long as we document it well.  We patched the shutdown the way we did specifically because Fujii thought it would be an easy fix; if it's complicated, we should revert it and document the issue for DBAs.

Re: [HACKERS] Generating Lots of PKs with nextval(): A Feature Proposal

2010-05-14 Thread Robert Haas
On Fri, May 14, 2010 at 6:11 PM, Tom Lane t...@sss.pgh.pa.us wrote: Peter Crabtree peter.crabt...@gmail.com writes: On Fri, May 14, 2010 at 5:29 PM, Robert Haas robertmh...@gmail.com wrote: If we do this, I'm inclined to think that the extra argument to nextval() should be treated as

Re: [HACKERS] Parameter oddness; was HS/SR Assert server crash

2010-05-14 Thread Bruce Momjian
Kevin Grittner wrote: Bruce Momjian br...@momjian.us wrote: One odd thing is we have two paramters that mention hot_standby --- on the master we have to do in postgresql.conf: wal_level = hot_standby and on the slave we do in postgresql.conf: hot_standby = on

[HACKERS] underscore split to alias

2010-05-14 Thread Erik Rijkers
I am not sure this is a bug, but I was surprised by the following behaviour in HEAD and 8.4.4 (instances built today, 2010.05.14): Invalid (?) values like 123_456 are split before the underscore and interpreted as 123 as 456: $ psql -p 6591 -d testdb -c select 123_456,

Re: [HACKERS] underscore split to alias

2010-05-14 Thread Tom Lane
Erik Rijkers e...@xs4all.nl writes: I am not sure this is a bug, but I was surprised by the following behaviour in HEAD and 8.4.4 (instances built today, 2010.05.14): Invalid (?) values like 123_456 are split before the underscore and interpreted as 123 as 456: All versions of postgres

Re: [HACKERS] JSON manipulation functions

2010-05-14 Thread Joseph Adams
On Fri, May 14, 2010 at 11:33 AM, Bruce Momjian br...@momjian.us wrote: Joseph Adams wrote: == array/object conversion == The json_object function converts a tuple to a JSON object.  If there are duplicate column names, there will be duplicate keys in the resulting JSON object.

Re: [HACKERS] JSON manipulation functions

2010-05-14 Thread Robert Haas
On Fri, May 14, 2010 at 10:35 PM, Joseph Adams joeyadams3.14...@gmail.com wrote: By the way, I'm considering making it so JSON arrays will be treated like objects when it comes to - and the json_keys function.  Thus, json_keys('[1,4,9,16,25]') would yield '{1,2,3,4,5}', and

Re: [HACKERS] List traffic

2010-05-14 Thread Marc G. Fournier
[moved to -chat] On Fri, 14 May 2010, Kevin Grittner wrote: I think that's exactly backwards -- we shouldn't have any traffic on -general for issues which could reasonably happen in another list. You can always configure your email to combine lists into a common folder upon receipt.

Re: [HACKERS] JSON manipulation functions

2010-05-14 Thread Pavel Stehule
2010/5/14 Tom Lane t...@sss.pgh.pa.us: Robert Haas robertmh...@gmail.com writes: On Thu, May 13, 2010 at 9:47 PM, Joseph Adams joeyadams3.14...@gmail.com wrote: [] retrieves a value of a JSON array/object by (one-based) index.  In other words, value[n] is equivalent to selecting the nth row

[HACKERS] predefined macros for various BSD-based systems?

2010-05-14 Thread Tom Lane
The recently added contrib/pg_upgrade code contains this bit: /* * scandir() is originally from BSD 4.3, which had the third argument as * non-const. Linux and other C libraries have updated it to use a const. *

Re: [HACKERS] predefined macros for various BSD-based systems?

2010-05-14 Thread Robert Haas
On Sat, May 15, 2010 at 12:15 AM, Tom Lane t...@sss.pgh.pa.us wrote: I'm not even too sure what bsdi is, but I'm suspicious of that branch too.  A search of our code finds It's a commercial distribution of BSD. I remember it being pretty nice when I used it 10+ years ago, but it sounds like

Re: [HACKERS] predefined macros for various BSD-based systems?

2010-05-14 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Sat, May 15, 2010 at 12:15 AM, Tom Lane t...@sss.pgh.pa.us wrote: I'm not even too sure what bsdi is, but I'm suspicious of that branch too.  A search of our code finds It's a commercial distribution of BSD. I remember it being pretty nice when I

Re: [HACKERS] predefined macros for various BSD-based systems?

2010-05-14 Thread Robert Haas
On Sat, May 15, 2010 at 12:37 AM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Sat, May 15, 2010 at 12:15 AM, Tom Lane t...@sss.pgh.pa.us wrote: I'm not even too sure what bsdi is, but I'm suspicious of that branch too.  A search of our code finds It's a

Re: [HACKERS] List traffic

2010-05-14 Thread Jaime Casanova
On Fri, May 14, 2010 at 8:39 AM, Marc G. Fournier scra...@hub.org wrote: And IMHO, that is as much a fault of the 'old timers' on the lists as the newbies ... if nobody redirects / loosely enforces the mandates of the various lists, newbies aren't going to learn to post to more appropriate

Re: [HACKERS] Synchronous replication patch built on SR

2010-05-14 Thread Boszormenyi Zoltan
Robert Haas írta: On Fri, May 14, 2010 at 9:33 AM, Boszormenyi Zoltan z...@cybertec.at wrote: If min_sync_replication_clients == 0, then the replication is async. If min_sync_replication_clients == max_wal_senders then the replication is fully synchronous. If 0

Re: [HACKERS] Japanies translation breaks solaris build

2010-05-14 Thread Peter Eisentraut
On fre, 2010-05-14 at 15:04 +0200, Zdenek Kotala wrote: Takahiro Itagaki píše v pá 14. 05. 2010 v 19:38 +0900: Zdenek Kotala zdenek.kot...@sun.com wrote: http://www.pgbuildfarm.org/cgi-bin/show_log.pl?nm=comet_mothdt=2010-05-13%2021:06:01 The problem is that it contains mix of DOS/Unix

Re: [HACKERS] predefined macros for various BSD-based systems?

2010-05-14 Thread Peter Eisentraut
On lör, 2010-05-15 at 00:15 -0400, Tom Lane wrote: I suppose that at least some of the *BSD herd really do predefine some of the symbols being attributed to them here, but I would like to see something authoritative about which and what.

Re: [HACKERS] predefined macros for various BSD-based systems?

2010-05-14 Thread Peter Eisentraut
On lör, 2010-05-15 at 00:23 -0400, Robert Haas wrote: It's a commercial distribution of BSD. I remember it being pretty nice when I used it 10+ years ago, but it sounds like it's dead now. BSDI is the company that produced BSD/OS, which was Bruce's main development environment at some point,

Re: [HACKERS] Japanies translation breaks solaris build

2010-05-14 Thread Tom Lane
Peter Eisentraut pete...@gmx.net writes: On fre, 2010-05-14 at 15:04 +0200, Zdenek Kotala wrote: The problem is that it contains mix of DOS/Unix end of lines. I have added a check to the admin scripts to prevent this in the future. I wonder if we shouldn't be trying to prevent this at the