Re: [HACKERS] about EDITOR_LINENUMBER_SWITCH

2011-07-19 Thread Peter Eisentraut
Here's a patch to fix what has been discussed: * Change EDITOR_LINENUMBER_SWITCH to environment variable. * I also changed switch to arg because switch is a bit of a sloppy term. * So the environment variable is called PSQL_EDITOR_LINENUMBER_ARG. * Set + as

[HACKERS] include host names in hba error messages

2011-07-19 Thread Peter Eisentraut
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 is an example patch. The question might be what criterion to use for when

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

2011-07-19 Thread Fujii Masao
On Tue, Jul 19, 2011 at 11:44 AM, Simon Riggs si...@2ndquadrant.com 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 pass data. Fully updated docs, including

[HACKERS] range types and ip4r

2011-07-19 Thread Peter Eisentraut
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 have a kind of hierarchical structure, I figured I'd point it out in

[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 masao.fu...@gmail.com wrote: On Tue, Jul 19, 2011 at 11:44 AM, Simon Riggs si...@2ndquadrant.com wrote: Cascading replication feature for streaming log-based replication. Standby servers can now have WALSender processes, which can work with either

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

2011-07-19 Thread Peter Geoghegan
On 18 July 2011 20:06, Heikki Linnakangas heikki.linnakan...@enterprisedb.com 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

[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 pasma...@gmail.com 2011-07-19 10:27:50 Committer: pasman pasma...@gmail.com 2011-07-19 10:27:50 Parent: 6307fff3586294214e3f256035b82bbba9a9054a (Fix typo) Branch: master Follows:

Re: [HACKERS] Cascade replication

2011-07-19 Thread Simon Riggs
On Mon, Jul 11, 2011 at 7:28 AM, Fujii Masao masao.fu...@gmail.com 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,

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!

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 should mention

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

Re: [HACKERS] Cascade replication

2011-07-19 Thread Fujii Masao
On Tue, Jul 19, 2011 at 5:58 PM, Simon Riggs si...@2ndquadrant.com wrote: On Mon, Jul 11, 2011 at 7:28 AM, Fujii Masao masao.fu...@gmail.com 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

[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 Simon Riggs
On Tue, Jul 19, 2011 at 12:19 PM, Fujii Masao masao.fu...@gmail.com 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

Re: [HACKERS] Cascade replication

2011-07-19 Thread Fujii Masao
On Tue, Jul 19, 2011 at 9:09 PM, Simon Riggs si...@2ndquadrant.com wrote: On Tue, Jul 19, 2011 at 12:19 PM, Fujii Masao masao.fu...@gmail.com 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?

Re: [HACKERS] Cascade replication

2011-07-19 Thread Simon Riggs
On Tue, Jul 19, 2011 at 1:38 PM, Fujii Masao masao.fu...@gmail.com wrote: On Tue, Jul 19, 2011 at 9:09 PM, Simon Riggs si...@2ndquadrant.com wrote: On Tue, Jul 19, 2011 at 12:19 PM, Fujii Masao masao.fu...@gmail.com wrote: So we would still have some code to change. Sigh, yes, of course.

Re: [HACKERS] storing TZ along timestamps

2011-07-19 Thread Kevin Grittner
Josh Berkus j...@agliodbs.com 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

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 pete...@gmx.net 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

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

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

2011-07-19 Thread Tom Lane
=?ISO-8859-2?Q?pasman_pasma=F1ski?= pasma...@gmail.com 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

Re: [HACKERS] storing TZ along timestamps

2011-07-19 Thread Tom Lane
Kevin Grittner kevin.gritt...@wicourts.gov writes: Josh Berkus j...@agliodbs.com 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,

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

2011-07-19 Thread Tom Lane
Peter Eisentraut pete...@gmx.net 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

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

2011-07-19 Thread Tom Lane
Josh Berkus j...@agliodbs.com 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.

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 si...@2ndquadrant.com 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

Re: [HACKERS] Commitfest Status: Sudden Death Overtime

2011-07-19 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Mon, Jul 18, 2011 at 4:19 PM, Tom Lane t...@sss.pgh.pa.us 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

Re: [HACKERS] storing TZ along timestamps

2011-07-19 Thread Kevin Grittner
Tom Lane t...@sss.pgh.pa.us wrote: Kevin Grittner kevin.gritt...@wicourts.gov writes: Josh Berkus j...@agliodbs.com 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

Re: [HACKERS] storing TZ along timestamps

2011-07-19 Thread Ian Caulfield
On 19 July 2011 17:11, Kevin Grittner kevin.gritt...@wicourts.gov wrote: Tom Lane t...@sss.pgh.pa.us wrote: Kevin Grittner kevin.gritt...@wicourts.gov writes: Josh Berkus j...@agliodbs.com wrote: The timestamp and the timezone in which that timestamp was entered are two separate pieces of

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 robertmh...@gmail.com writes: On Mon, Jul 18, 2011 at 4:19 PM, Tom Lane t...@sss.pgh.pa.us wrote: If you mean the business about allowing GUCs in postgresql.conf to be applied even if there are semantic errors

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 'read

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 long had

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] FOR KEY LOCK foreign keys

2011-07-19 Thread Kevin Grittner
Alvaro Herrera alvhe...@commandprompt.com 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

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 alvhe...@commandprompt.com 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

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 pete...@gmx.net 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

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

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

[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] 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

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 pjmo...@pjmodos.net 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

[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

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 heikki.linnakan...@enterprisedb.com 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

[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 heikki.linnakan...@enterprisedb.com 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,

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

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 heikki.linnakan...@enterprisedb.com 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

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

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 at

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

[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] Another issue with invalid XML values

2011-07-19 Thread Tom Lane
Florian Pflug f...@phlo.org 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

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 Streaming

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 f...@phlo.org 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

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 without

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 f...@phlo.org 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

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 have

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 joeyadams3.14...@gmail.com 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

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

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: [HACKERS] Another issue with invalid XML values

2011-07-19 Thread Tom Lane
[ resend due to mail server hiccup ] Alvaro Herrera alvhe...@commandprompt.com 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

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

2011-07-19 Thread Pavel Stehule
2011/7/20 Tom Lane t...@sss.pgh.pa.us: =?ISO-8859-1?Q?Petr_Jel=EDnek?= pjmo...@pjmodos.net 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

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 joeyadams3.14...@gmail.com wrote: On Mon, Jul 18, 2011 at 7:36 PM, Florian Pflug f...@phlo.org 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

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 robertmh...@gmail.com 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