Re: Initial Review: JSON contrib modul was: Re: [HACKERS] Another swing at JSON

2011-07-19 Thread Joey Adams
On Wed, Jul 20, 2011 at 12:32 AM, Robert Haas wrote: >> Thanks for the input.  I'm leaning in this direction too.  However, it >> will be a tad tricky to implement the conversions efficiently, ... > > I'm a bit confused, because I thought what I was talking about was not > doing any conversions in

Re: Initial Review: JSON contrib modul was: Re: [HACKERS] Another swing at JSON

2011-07-19 Thread Robert Haas
On Tue, Jul 19, 2011 at 9:03 PM, Joey Adams wrote: > On Mon, Jul 18, 2011 at 7:36 PM, Florian Pflug wrote: >> On Jul19, 2011, at 00:17 , Joey Adams wrote: >>> I suppose a simple solution would be to convert all escapes and >>> outright ban escapes of characters not in the database encoding. >> >>

Re: [HACKERS] proposal: new contrib module plpgsql's embeded sql validator

2011-07-19 Thread Pavel Stehule
2011/7/20 Tom Lane : > =?ISO-8859-1?Q?Petr_Jel=EDnek?= writes: >> But, I think we should add valitation hook to plpgsql plugin structure >> so that you don't have to actually execute the function to check it - >> curretly there are only executing hooks which is why the plugin only >> works when yo

Re: [HACKERS] Another issue with invalid XML values

2011-07-19 Thread Tom Lane
[ resend due to mail server hiccup ] Alvaro Herrera writes: > Excerpts from Tom Lane's message of mar jul 19 19:42:54 -0400 2011: >> Now the risk factor if we do that is that if someone misses a >> pg_xml_done call, we leave an error handler installed with a context >> argument that's probably po

Re: Fwd: Initial Review: JSON contrib modul was: Re: [HACKERS] Another swing at JSON

2011-07-19 Thread Bruce Momjian
Bruce Momjian wrote: > Joey Adams wrote: > > Forwarding because the mailing list rejected the original message. > > Yes, I am seeing email failures to the 'core' email list. Marc says it is now fixed. --- > > > > > -

Re: Fwd: Initial Review: JSON contrib modul was: Re: [HACKERS] Another swing at JSON

2011-07-19 Thread Bruce Momjian
Joey Adams wrote: > Forwarding because the mailing list rejected the original message. Yes, I am seeing email failures to the 'core' email list. --- > > -- Forwarded message -- > From: Joey Adams > Date: T

Fwd: Initial Review: JSON contrib modul was: Re: [HACKERS] Another swing at JSON

2011-07-19 Thread Joey Adams
Forwarding because the mailing list rejected the original message. -- Forwarded message -- From: Joey Adams Date: Tue, Jul 19, 2011 at 11:23 PM Subject: Re: Initial Review: JSON contrib modul was: Re: [HACKERS] Another swing at JSON To: Alvaro Herrera Cc: Florian Pflug , Tom Lane

Re: [HACKERS] range types and ip4r

2011-07-19 Thread Jeff Davis
On Tue, 2011-07-19 at 09:38 +0300, Peter Eisentraut wrote: > Just wondering, will the planned range type functionality also be able > to absorb the functionality of the ip4r type as a range of the ip4 type > (http://pgfoundry.org/projects/ip4r)? Maybe it's trivial, but since the > ip types also ha

Re: Initial Review: JSON contrib modul was: Re: [HACKERS] Another swing at JSON

2011-07-19 Thread Alvaro Herrera
Excerpts from Joey Adams's message of mar jul 19 21:03:15 -0400 2011: > On Mon, Jul 18, 2011 at 7:36 PM, Florian Pflug wrote: > > On Jul19, 2011, at 00:17 , Joey Adams wrote: > >> I suppose a simple solution would be to convert all escapes and > >> outright ban escapes of characters not in the dat

Re: [HACKERS] Another issue with invalid XML values

2011-07-19 Thread Alvaro Herrera
Excerpts from Tom Lane's message of mar jul 19 19:42:54 -0400 2011: > Now the risk factor if we do that is that if someone misses a > pg_xml_done call, we leave an error handler installed with a context > argument that's probably pointing at garbage, and if someone then tries > to use libxml witho

Re: Initial Review: JSON contrib modul was: Re: [HACKERS] Another swing at JSON

2011-07-19 Thread Joey Adams
On Mon, Jul 18, 2011 at 7:36 PM, Florian Pflug wrote: > On Jul19, 2011, at 00:17 , Joey Adams wrote: >> I suppose a simple solution would be to convert all escapes and >> outright ban escapes of characters not in the database encoding. > > +1. Making JSON work like TEXT when it comes to encoding i

Re: [HACKERS] A few user-level questions on Streaming Replication and pg_upgrade

2011-07-19 Thread Bruce Momjian
Gurjeet Singh wrote: > Hi, > > Here are a few questions that were asked by a customer, who are trying > to assess the pros and cons of using Postgres and its SR feature. I would > like to get an opinion of someone more involved with the community than me. > > .) Will Postgres support Streamin

Re: [HACKERS] Another issue with invalid XML values

2011-07-19 Thread Tom Lane
Florian Pflug writes: > Updated patch attached. Do you think this is "Ready for Committer"? I've been looking through this patch. While it's mostly good, I'm pretty unhappy with the way that the pg_xml_init/pg_xml_done code is deliberately designed to be non-reentrant (ie, throw an Assert if pg_

[HACKERS] PgWest CFP closes in two weeks

2011-07-19 Thread Joshua D. Drake
Hey folks, As a reminder, PgWest is in a few months and the CFP closes in two weeks. Get those talks in! https://www.postgresqlconference.org/talk_types Sincerely, Joshua D. Drake -- Command Prompt, Inc. - http://www.commandprompt.com/ PostgreSQL Support, Training, Professional Services and

Re: [HACKERS] storing TZ along timestamps

2011-07-19 Thread David E. Wheeler
On Jul 19, 2011, at 2:06 PM, Josh Berkus wrote: > I am strongly in favor of having a *timezone* data type and some system > whereby we can uniquely identify timezones in the Zic database. CREATE OR REPLACE FUNCTION is_timezone( tz CITEXT ) RETURNS BOOLEAN LANGUAGE plpgsql STABLE AS $$ BEGIN

Re: [HACKERS] storing TZ along timestamps

2011-07-19 Thread Josh Berkus
Alvaro, Kevin, >> In a builtin data type, which of those three would you pick? Only the >> application knows. > > I think this whole discussion is built on the assumption that the client > timezone and the application timezone are one thing and the same; and > the server timezone is not relevant

Re: [HACKERS] [v9.1] sepgsql - userspace access vector cache

2011-07-19 Thread Yeb Havinga
On 2011-07-19 22:39, Heikki Linnakangas wrote: On 19.07.2011 12:28, Yeb Havinga wrote: On 2011-07-18 22:21, Kohei KaiGai wrote: The Scientific Linux 6 is not suitable, because its libselinux version is a bit older than this patch expects (libselinux-2.0.99 or later). My recommendation is Fedora

Re: [HACKERS] [COMMITTERS] pgsql: Remove O(N^2) performance issue with multiple SAVEPOINTs.

2011-07-19 Thread Simon Riggs
On Tue, Jul 19, 2011 at 9:24 PM, Heikki Linnakangas wrote: >> You might persuade me to do it another way, but I can't see how to >> make that way work. Your case seems a stretch. > > You get coincidences with memory allocations surprisingly often, because > things tend to get allocated and free'd

Re: [HACKERS] [v9.1] sepgsql - userspace access vector cache

2011-07-19 Thread Heikki Linnakangas
On 19.07.2011 12:28, Yeb Havinga wrote: On 2011-07-18 22:21, Kohei KaiGai wrote: The Scientific Linux 6 is not suitable, because its libselinux version is a bit older than this patch expects (libselinux-2.0.99 or later). My recommendation is Fedora 15, instead. Installing right now, thanks for

[HACKERS] Re: [COMMITTERS] pgsql: Remove O(N^2) performance issue with multiple SAVEPOINTs.

2011-07-19 Thread Heikki Linnakangas
On 19.07.2011 23:08, Simon Riggs wrote: On Tue, Jul 19, 2011 at 8:49 PM, Heikki Linnakangas wrote: On 19.07.2011 19:22, Simon Riggs wrote: Remove O(N^2) performance issue with multiple SAVEPOINTs. Subtransaction locks now released en masse at main commit, rather than repeatedly re-scanning f

Re: [HACKERS] [COMMITTERS] pgsql: Remove O(N^2) performance issue with multiple SAVEPOINTs.

2011-07-19 Thread Simon Riggs
On Tue, Jul 19, 2011 at 8:49 PM, Heikki Linnakangas wrote: > On 19.07.2011 19:22, Simon Riggs wrote: >> >> Remove O(N^2) performance issue with multiple SAVEPOINTs. >> Subtransaction locks now released en masse at main commit, rather than >> repeatedly re-scanning for locks as we ascend the nested

[HACKERS] Re: [COMMITTERS] pgsql: Remove O(N^2) performance issue with multiple SAVEPOINTs.

2011-07-19 Thread Heikki Linnakangas
On 19.07.2011 19:22, Simon Riggs wrote: Remove O(N^2) performance issue with multiple SAVEPOINTs. Subtransaction locks now released en masse at main commit, rather than repeatedly re-scanning for locks as we ascend the nested transaction tree. Split transaction state TBLOCK_SUBEND into two states

Re: [HACKERS] proposal: new contrib module plpgsql's embeded sql validator

2011-07-19 Thread Pavel Stehule
Dne 19. července 2011 21:15 Petr Jelínek napsal(a): > On 07/17/2011 10:31 PM, Jim Nasby wrote: >> >> On Jul 7, 2011, at 11:31 PM, Pavel Stehule wrote: >>> >>> a lazy deep SQL validation inside plpgsq functions is interesting >>> attribute. It allows to work with temporary tables and it make testin

Re: [HACKERS] proposal: new contrib module plpgsql's embeded sql validator

2011-07-19 Thread Petr Jelínek
On 07/17/2011 10:31 PM, Jim Nasby wrote: On Jul 7, 2011, at 11:31 PM, Pavel Stehule wrote: a lazy deep SQL validation inside plpgsq functions is interesting attribute. It allows to work with temporary tables and it make testing and debugging harder, because lot of errors in embedded queries are

[HACKERS] A few user-level questions on Streaming Replication and pg_upgrade

2011-07-19 Thread Gurjeet Singh
Hi, Here are a few questions that were asked by a customer, who are trying to assess the pros and cons of using Postgres and its SR feature. I would like to get an opinion of someone more involved with the community than me. .) Will Postgres support Streaming Replication from 9.0.x to 9.1.x;

Re: [HACKERS] pg_upgrade and log file output on Windows

2011-07-19 Thread Andrew Dunstan
On 07/19/2011 01:25 PM, Bruce Momjian wrote: Andrew Dunstan wrote: I can't figure out of there is something odd about this user's setup or if there is a bug in pg_upgrade with -l on Windows. The Windows file system seems to have some asynchronicity regarding what files are locked. For that

Re: [HACKERS] FOR KEY LOCK foreign keys

2011-07-19 Thread Alvaro Herrera
Excerpts from Noah Misch's message of sáb jul 16 13:11:49 -0400 2011: > In any event, I have attached a patch that fixes the problems I have described > here. To ignore autovacuum, it only recognizes a wait when one of the > backends under test holds a conflicting lock. (It occurs to me that per

Re: [HACKERS] include host names in hba error messages

2011-07-19 Thread Robert Haas
On Tue, Jul 19, 2011 at 2:18 AM, Peter Eisentraut wrote: > Since we are accepting host names in pg_hba.conf now, I figured it could > be useful to also show the host names in error message, e.g., > >    no pg_hba.conf entry for host "localhost" (127.0.0.1), user "x", database > "y" > > Attached i

Re: [HACKERS] FOR KEY LOCK foreign keys

2011-07-19 Thread Alvaro Herrera
Excerpts from Kevin Grittner's message of mar jul 19 13:49:53 -0400 2011: > Alvaro Herrera wrote: > > Excerpts from Kevin Grittner's message: > >> Noah Misch wrote: > >> > >>> With this patch in its final form, I have completed 180+ suite > >>> runs without a failure. > >> > >> The attached

Re: [HACKERS] FOR KEY LOCK foreign keys

2011-07-19 Thread Kevin Grittner
Alvaro Herrera wrote: > Excerpts from Kevin Grittner's message: >> Noah Misch wrote: >> >>> With this patch in its final form, I have completed 180+ suite >>> runs without a failure. >> >> The attached patch allows the tests to pass when >> default_transaction_isolation is stricter than 're

Re: [HACKERS] Function argument names in pg_catalog

2011-07-19 Thread Alvaro Herrera
Excerpts from Mike Toews's message of mar jul 19 07:23:24 -0400 2011: > Hi hackers, > > I'm curios why argument names (argname) are not used in the DDL for > functions in pg_catalog, while they are are used throughout the > documentation. For example, the documentation for pg_read_file in > Table

Re: [HACKERS] pg_upgrade and log file output on Windows

2011-07-19 Thread Bruce Momjian
Andrew Dunstan wrote: > > I can't figure out of there is something odd about this user's setup or > > if there is a bug in pg_upgrade with -l on Windows. > > > > > The Windows file system seems to have some asynchronicity regarding what > files are locked. For that reason, the buildfarm code has

Re: [HACKERS] FOR KEY LOCK foreign keys

2011-07-19 Thread Alvaro Herrera
Excerpts from Kevin Grittner's message of sáb jul 16 14:03:31 -0400 2011: > Noah Misch wrote: > > > With this patch in its final form, I have completed 180+ suite runs > > without a failure. > > The attached patch allows the tests to pass when > default_transaction_isolation is stricter than

Re: [HACKERS] Commitfest Status: Sudden Death Overtime

2011-07-19 Thread Alvaro Herrera
Excerpts from Tom Lane's message of mar jul 19 12:09:24 -0400 2011: > Robert Haas writes: > > On Mon, Jul 18, 2011 at 4:19 PM, Tom Lane wrote: > >> If you mean the business about allowing GUCs in postgresql.conf to be > >> applied even if there are semantic errors elsewhere, I'm just as happy > >

Re: [HACKERS] storing TZ along timestamps

2011-07-19 Thread Ian Caulfield
On 19 July 2011 17:11, Kevin Grittner wrote: > Tom Lane wrote: >> "Kevin Grittner" writes: >>> Josh Berkus wrote: The timestamp and the timezone in which that timestamp was entered are two separate pieces of data and *ought* to be in two separate fields. >> >>> So, if you're grab

Re: [HACKERS] storing TZ along timestamps

2011-07-19 Thread Kevin Grittner
Tom Lane wrote: > "Kevin Grittner" writes: >> Josh Berkus wrote: >>> The timestamp and the timezone in which that timestamp was >>> entered are two separate pieces of data and *ought* to be in two >>> separate fields. > >> So, if you're grabbing a timestamp and the time zone for it, how >> do

Re: [HACKERS] Commitfest Status: Sudden Death Overtime

2011-07-19 Thread Tom Lane
Robert Haas writes: > On Mon, Jul 18, 2011 at 4:19 PM, Tom Lane wrote: >> If you mean the business about allowing GUCs in postgresql.conf to be >> applied even if there are semantic errors elsewhere, I'm just as happy >> to let Alexey or Florian have a go at it first, if they want.  The real >> q

Re: [HACKERS] Single pass vacuum - take 1

2011-07-19 Thread Alvaro Herrera
Excerpts from Pavan Deolasee's message of lun jul 18 14:50:03 -0400 2011: > On Mon, Jul 18, 2011 at 3:14 AM, Simon Riggs wrote: > > I will be happy to remove it again when we have shown there are no > > bugs getting this wrong is a data loss issue. > > Though I understand the fear for data lo

Re: [HACKERS] proposal: a validator for configuration files

2011-07-19 Thread Tom Lane
Josh Berkus writes: > Hmmm. As someone who often deploys pg.conf changes as part of a > production code rollout, I actually like the "atomic" nature of updating > postgresql.conf -- that is, all your changes succeed, or they all fail. If we actually *had* that, I'd agree with you. The problem i

Re: [HACKERS] proposal: a validator for configuration files

2011-07-19 Thread Tom Lane
Peter Eisentraut writes: > On sön, 2011-07-17 at 00:59 -0400, Tom Lane wrote: >> Well, we *do* have a C API for that, of a sort. The problem is, what >> do you do in processes that have not loaded the relevant extension? > Those processes that have the extension loaded check the parameter > set

Re: [HACKERS] storing TZ along timestamps

2011-07-19 Thread Tom Lane
"Kevin Grittner" writes: > Josh Berkus wrote: >> The timestamp and the timezone in which that timestamp was entered >> are two separate pieces of data and *ought* to be in two separate >> fields. > So, if you're grabbing a timestamp and the time zone for it, how do > you ensure you've done that

Re: [HACKERS] Exclude core dumps from project - example patch

2011-07-19 Thread Tom Lane
=?ISO-8859-2?Q?pasman_pasma=F1ski?= writes: > I am learn the git. For test my skills, here is patch to exclude core > dumps from git tree. This doesn't seem like a particularly good idea. The project policy is to exclude only files that would normally appear during a build, and not cruft that mi

Re: [HACKERS] Commitfest Status: Sudden Death Overtime

2011-07-19 Thread Yeb Havinga
On 2011-07-18 21:59, Robert Haas wrote: There are only two patches left and I think we really ought to try to take a crack at doing something with them. Yeb is working on the userspace access vector cache patch, which I think is going drag on longer than we want keep the CommitFest open, but I'm

Re: [HACKERS] Avoid index rebuilds for no-rewrite ALTER TABLE ALTER TYPE

2011-07-19 Thread Robert Haas
On Tue, Jul 19, 2011 at 12:24 AM, Peter Eisentraut wrote: > Please review and fix this compiler warning: > > indexcmds.c: In function ‘CheckIndexCompatible’: > indexcmds.c:126:15: warning: variable ‘amoptions’ set but not used > [-Wunused-but-set-variable] I have removed the offending variable.

Re: [HACKERS] storing TZ along timestamps

2011-07-19 Thread Kevin Grittner
Josh Berkus wrote: > The timestamp and the timezone in which that timestamp was entered > are two separate pieces of data and *ought* to be in two separate > fields. So, if you're grabbing a timestamp and the time zone for it, how do you ensure you've done that atomically if you're at the boun

Re: [HACKERS] Cascade replication

2011-07-19 Thread Simon Riggs
On Tue, Jul 19, 2011 at 1:38 PM, Fujii Masao wrote: > On Tue, Jul 19, 2011 at 9:09 PM, Simon Riggs wrote: >> On Tue, Jul 19, 2011 at 12:19 PM, Fujii Masao >> wrote: >> >>> So we would still have some code to change. >> >> Sigh, yes, of course. >> >> The question was whether there is any reason w

Re: [HACKERS] Cascade replication

2011-07-19 Thread Fujii Masao
On Tue, Jul 19, 2011 at 9:09 PM, Simon Riggs wrote: > On Tue, Jul 19, 2011 at 12:19 PM, Fujii Masao wrote: > >> So we would still have some code to change. > > Sigh, yes, of course. > > The question was whether there is any reason we need to disallow cascading? No, at least I have no clear reaso

Re: [HACKERS] Cascade replication

2011-07-19 Thread Simon Riggs
On Tue, Jul 19, 2011 at 12:19 PM, Fujii Masao wrote: > So we would still have some code to change. Sigh, yes, of course. The question was whether there is any reason we need to disallow cascading? --  Simon Riggs   http://www.2ndQuadrant.com/  PostgreSQL Development, 24x7 Supp

[HACKERS] Function argument names in pg_catalog

2011-07-19 Thread Mike Toews
Hi hackers, I'm curios why argument names (argname) are not used in the DDL for functions in pg_catalog, while they are are used throughout the documentation. For example, the documentation for pg_read_file in Table 9-60[1] has an "SQL prototype": pg_read_file(filename text, offset bigint, length

Re: [HACKERS] Cascade replication

2011-07-19 Thread Fujii Masao
On Tue, Jul 19, 2011 at 5:58 PM, Simon Riggs wrote: > On Mon, Jul 11, 2011 at 7:28 AM, Fujii Masao wrote: > >> Attached is the updated version which addresses all the issues raised by >> Simon. > > Is there any reason why we disallow cascading unless hot standby is enabled? > > ISTM we can just a

Re: [HACKERS] [v9.1] sepgsql - userspace access vector cache

2011-07-19 Thread Yeb Havinga
On 2011-07-19 12:10, Kohei Kaigai wrote: See the attached patch, that contains other 3 documentation updates. I looked at the patch and the additions look good, though I didn't actually apply it yet. thanks Yeb -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make ch

Re: [HACKERS] [v9.1] sepgsql - userspace access vector cache

2011-07-19 Thread Kohei Kaigai
> >> /etc/selinux/targeted/contexts/sepgsql_contexts: line 33 has invalid > >> object > >> type db_blobs > > It is not an error, but just a notification to inform users that > > sepgsql_contexts > > file contains invalid lines. It is harmless, so we can ignore them. > > I don't think sepgsql.sgml

Re: [HACKERS] [v9.1] sepgsql - userspace access vector cache

2011-07-19 Thread Yeb Havinga
On 2011-07-18 22:21, Kohei KaiGai wrote: The Scientific Linux 6 is not suitable, because its libselinux version is a bit older than this patch expects (libselinux-2.0.99 or later). My recommendation is Fedora 15, instead. Installing right now, thanks for the heads up! /etc/selinux/targeted/con

Re: [HACKERS] Cascade replication

2011-07-19 Thread Simon Riggs
On Mon, Jul 11, 2011 at 7:28 AM, Fujii Masao wrote: > Attached is the updated version which addresses all the issues raised by > Simon. Is there any reason why we disallow cascading unless hot standby is enabled? ISTM we can just alter the postmaster path for walsenders, patch attached. Some p

[HACKERS] Exclude core dumps from project - example patch

2011-07-19 Thread pasman pasmański
Hi. I am learn the git. For test my skills, here is patch to exclude core dumps from git tree. Author: pasman 2011-07-19 10:27:50 Committer: pasman 2011-07-19 10:27:50 Parent: 6307fff3586294214e3f256035b82bbba9a9054a (Fix typo) Branch: master Follows: REL9_1_BETA2 Precedes: Include cor

Re: [HACKERS] Reduced power consumption in autovacuum launcher process

2011-07-19 Thread Peter Geoghegan
On 18 July 2011 20:06, Heikki Linnakangas wrote: >> Hmm.  Well, it's not too late to rethink the WaitLatch API, if we think >> that that might be a significant limitation. > > Right, we can easily change the timeout argument to be in milliseconds > instead of microseconds. +1 -- Peter Geoghegan

[HACKERS] Re: [COMMITTERS] pgsql: Cascading replication feature for streaming log-based replicatio

2011-07-19 Thread Simon Riggs
On Tue, Jul 19, 2011 at 7:31 AM, Fujii Masao wrote: > On Tue, Jul 19, 2011 at 11:44 AM, Simon Riggs wrote: >> Cascading replication feature for streaming log-based replication. >> Standby servers can now have WALSender processes, which can work with >> either WALReceiver or archive_commands to pa