Re: [HACKERS] Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-04-03 Thread Amit Kapila
On Tuesday, April 02, 2013 9:49 PM Peter Eisentraut wrote: I'm going to ignore most of the discussion that led up to this and give this patch a fresh look. Thank you. + screen + SET PERSISTENT max_connections To 10; + /screen The To should probably be capitalized. Okay, shall fix it.

Re: [HACKERS] Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-04-03 Thread Amit Kapila
On Wednesday, April 03, 2013 2:23 AM Greg Smith wrote: On 4/1/13 5:44 AM, Amit Kapila wrote: I think in that case we can have 3 separate patches 1. Memory growth defect fix 2. Default postgresql.conf to include config directory and SET Persistent into single file implementation 3.

Re: [HACKERS] spoonbill vs. -HEAD

2013-04-03 Thread Stefan Kaltenbrunner
On 04/03/2013 12:59 AM, Tom Lane wrote: I wrote: I think the simplest fix is to insert PG_SETMASK(UnBlockSig) into StatementCancelHandler() and any other handlers that might exit via longjmp. I'm a bit inclined to only do this on platforms where a problem is demonstrable, which so far is

Re: [HACKERS] WIP: index support for regexp search

2013-04-03 Thread Erikjan Rijkers
21286.804 ms Not exactly negligible, and ideally those regressions would be removed but with the huge advantages for other cases I'd say it's worth it. hth, Erik Rijkers re-head-13-15-20130403-0708.txt.bz2 Description: BZip2 compressed data -- Sent via pgsql-hackers mailing list (pgsql-hackers

Re: [HACKERS] WIP: index support for regexp search

2013-04-03 Thread Alexander Korotkov
On Wed, Apr 3, 2013 at 11:10 AM, Erikjan Rijkers e...@xs4all.nl wrote: On Tue, April 2, 2013 23:54, Alexander Korotkov wrote: [trgm-regexp-0.15.patch.gz] Yes, it does look good now; Attached a list of measurements. Most of the searches that I put in that test-program are now speeded up

Re: [HACKERS] regression test failed when enabling checksum

2013-04-03 Thread Andres Freund
On 2013-04-01 19:51:19 -0700, Jeff Janes wrote: On Mon, Apr 1, 2013 at 10:37 AM, Jeff Janes jeff.ja...@gmail.com wrote: On Tue, Mar 26, 2013 at 4:23 PM, Jeff Davis pg...@j-davis.com wrote: Patch attached. Only brief testing done, so I might have missed something. I will look more

Re: [HACKERS] CREATE EXTENSION BLOCKS

2013-04-03 Thread Albe Laurenz
David E. Wheeler wrote: I am working on scripts to copy data from Oracle via oracle_fdw. They each do something like this: CREATE SCHEMA migrate_stuff; SET search_path TO migrate_stuff,public; CREATE EXTENSION oracle_fdw SCHEMA migrate_rules; [...] Then I run them in

Re: [HACKERS] Extra security measures for next week's releases

2013-04-03 Thread roadrunner6
Am 28.03.2013 18:03, schrieb Tom Lane: The core committee has decided that one of the security issues due to be fixed next week is sufficiently bad that we need to take extra measures to prevent it from becoming public before packages containing the fix are available. (This is a scenario we've

Re: [HACKERS] Extra security measures for next week's releases

2013-04-03 Thread Magnus Hagander
On Wed, Apr 3, 2013 at 12:09 PM, roadrunn...@gmx.at wrote: Am 28.03.2013 18:03, schrieb Tom Lane: The core committee has decided that one of the security issues due to be fixed next week is sufficiently bad that we need to take extra measures to prevent it from becoming public before

Re: [PATCH] Exorcise zero-dimensional arrays (Was: Re: [HACKERS] Should array_length() Return NULL)

2013-04-03 Thread Florian Pflug
On Apr1, 2013, at 13:43 , Robert Haas robertmh...@gmail.com wrote: I don't think the current behavior is broken. I found it counterintuitive at first, but then I got used to it. It's reasonably self-consistent: arrays can't have empty dimensions, therefore the empty array is unique and

[HACKERS] Typo in documentation for function to_json

2013-04-03 Thread Michael Paquier
Hi all, While reading some documentation about json functions, I found a typo with the example used with function to_json. A bracket was missing. Please find attached the patch correcting that. Regards, -- Michael 20120403_to_json_typo.patch Description: Binary data -- Sent via

Re: [HACKERS] in-catalog Extension Scripts and Control parameters (templates?)

2013-04-03 Thread Dimitri Fontaine
Hi, Dimitri Fontaine dimi...@2ndquadrant.fr writes: Documentation doesn't build, multiple errors. In addition to the reference pages, there should be a section in the main docs about these templates. I'm now working on that, setting up the documentation tool set. Fixed in the attached

Re: [PATCH] Exorcise zero-dimensional arrays (Was: Re: [HACKERS] Should array_length() Return NULL)

2013-04-03 Thread Andrew Dunstan
On 04/02/2013 02:46 PM, Florian Pflug wrote: On Apr1, 2013, at 13:43 , Robert Haas robertmh...@gmail.com wrote: I don't think the current behavior is broken. I found it counterintuitive at first, but then I got used to it. It's reasonably self-consistent: arrays can't have empty dimensions,

Re: [HACKERS] Typo in documentation for function to_json

2013-04-03 Thread Andrew Dunstan
On 04/03/2013 09:22 AM, Michael Paquier wrote: Hi all, While reading some documentation about json functions, I found a typo with the example used with function to_json. A bracket was missing. Please find attached the patch correcting that. I have a patch for this and other docs errors

Re: [HACKERS] Typo in documentation for function to_json

2013-04-03 Thread Michael Paquier
On Wed, Apr 3, 2013 at 10:32 PM, Andrew Dunstan and...@dunslane.net wrote: I have a patch for this and other docs errors waiting in the wings. I will commit it when the current hiatus is done, some time tomorrow. OK thanks. -- Michael

[HACKERS] Typo in FDW documentation

2013-04-03 Thread Albe Laurenz
I found a small typo, patch attached. Yours, Laurenz Albe fdw-doc.patch Description: fdw-doc.patch -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Page replacement algorithm in buffer cache

2013-04-03 Thread Robert Haas
On Tue, Apr 2, 2013 at 1:20 PM, Andres Freund and...@2ndquadrant.com wrote: On 2013-04-02 12:56:56 -0400, Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: On 2013-04-02 12:22:03 -0400, Tom Lane wrote: I agree in general, though I'm not sure the bgwriter process can reasonably

Re: [PATCH] Exorcise zero-dimensional arrays (Was: Re: [HACKERS] Should array_length() Return NULL)

2013-04-03 Thread Florian Pflug
On Apr3, 2013, at 15:30 , Andrew Dunstan and...@dunslane.net wrote: On 04/02/2013 02:46 PM, Florian Pflug wrote: If we're going to break compatibility, we should IMHO get rid of non-zero lower bounds all together. My guess is that the number of affected users wouldn't be much higher than for

Re: [PATCH] Exorcise zero-dimensional arrays (Was: Re: [HACKERS] Should array_length() Return NULL)

2013-04-03 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: On 04/02/2013 02:46 PM, Florian Pflug wrote: If we're going to break compatibility, we should IMHO get rid of non-zero lower bounds all together. My guess is that the number of affected users wouldn't be much higher than for the proposed patch, and

Re: [HACKERS] Typo in documentation for function to_json

2013-04-03 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: I have a patch for this and other docs errors waiting in the wings. I will commit it when the current hiatus is done, some time tomorrow. There's no reason not to commit now. The blockage is on propagation to the anongit mirror, not on what

Re: [HACKERS] Typo in documentation for function to_json

2013-04-03 Thread Andrew Dunstan
On 04/03/2013 10:11 AM, Tom Lane wrote: Andrew Dunstan and...@dunslane.net writes: I have a patch for this and other docs errors waiting in the wings. I will commit it when the current hiatus is done, some time tomorrow. There's no reason not to commit now. The blockage is on propagation to

Re: [HACKERS] Typo in FDW documentation

2013-04-03 Thread Tom Lane
Albe Laurenz laurenz.a...@wien.gv.at writes: I found a small typo, patch attached. Drat, thought I'd fixed that before, but obviously not. Done now, thanks. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to

Re: [HACKERS] Drastic performance loss in assert-enabled build in HEAD

2013-04-03 Thread Tom Lane
[ sorry for being slow to respond, things are crazy this week ] Kevin Grittner kgri...@ymail.com writes: Tom Lane t...@sss.pgh.pa.us wrote: Anyway, the immediate takeaway is that this represents a horribly expensive way for pg_dump to find out which matviews aren't scannable. The cheap way

[HACKERS] Regex with 32k different chars causes a backend crash

2013-04-03 Thread Heikki Linnakangas
While playing with Alexander's pg_trgm regexp patch, I noticed that the regexp library trips an assertion (if enabled) or crashes, when passed an input string that contains more than 32k different characters: select 'foo' ~ (select string_agg(chr(x),'') from generate_series(100, 35000) x) as

Re: [HACKERS] Regex with 32k different chars causes a backend crash

2013-04-03 Thread Tom Lane
Heikki Linnakangas hlinnakan...@vmware.com writes: A regex with that many different colors is an extreme case, so I think it's enough to turn the assertion in newcolor() into a run-time check, and throw a too many colors in regexp error. Alternatively, we could expand 'color' from short to

Re: [HACKERS] Regex with 32k different chars causes a backend crash

2013-04-03 Thread Heikki Linnakangas
On 03.04.2013 18:21, Tom Lane wrote: Heikki Linnakangashlinnakan...@vmware.com writes: A regex with that many different colors is an extreme case, so I think it's enough to turn the assertion in newcolor() into a run-time check, and throw a too many colors in regexp error. Alternatively, we

[HACKERS] c language functions

2013-04-03 Thread Rodrigo Barboza
Hello. I'm trying to create a generic add function. I have defined a type my_uint and it needs a '+' operator. This operator should work like normal int + int operation. The function is defined expecting arguments (my_uint, anyelement). I'm confused in retrieving the anyelement type, value and

Re: [PATCH] Exorcise zero-dimensional arrays (Was: Re: [HACKERS] Should array_length() Return NULL)

2013-04-03 Thread Gavin Flower
On 04/04/13 03:02, Florian Pflug wrote: On Apr3, 2013, at 15:30 , Andrew Dunstan and...@dunslane.net wrote: On 04/02/2013 02:46 PM, Florian Pflug wrote: If we're going to break compatibility, we should IMHO get rid of non-zero lower bounds all together. My guess is that the number of affected

Re: [HACKERS] Regex with 32k different chars causes a backend crash

2013-04-03 Thread Tom Lane
Heikki Linnakangas hlinnakan...@vmware.com writes: On 03.04.2013 18:21, Tom Lane wrote: Obviously Henry didn't think that far ahead. I agree that throwing an error is the best solution, and that widening color is probably not what we want to do. You want to fix that, or shall I? I can do

Re: [HACKERS] commit dfda6ebaec67 versus wal_keep_segments

2013-04-03 Thread Jeff Janes
On Tue, Apr 2, 2013 at 10:08 PM, Jeff Janes jeff.ja...@gmail.com wrote: This commit introduced a problem with wal_keep_segments: commit dfda6ebaec6763090fb78b458a979b558c50b39b The problem seems to be that the underflow warned about is happening, because the check to guard it was checking

Re: [PATCH] Exorcise zero-dimensional arrays (Was: Re: [HACKERS] Should array_length() Return NULL)

2013-04-03 Thread Pavel Stehule
2013/4/3 Gavin Flower gavinflo...@archidevsys.co.nz On 04/04/13 03:02, Florian Pflug wrote: On Apr3, 2013, at 15:30 , Andrew Dunstan and...@dunslane.net wrote: On 04/02/2013 02:46 PM, Florian Pflug wrote: If we're going to break compatibility, we should IMHO get rid of non-zero lower

[HACKERS] track_activities is mostly broken

2013-04-03 Thread Tom Lane
The point of turning off pgstat_track_activities is, IMO, to eliminate the overhead of updating one's PgBackendStatus entry in main memory. Commit 4f42b546 broke this, however, because it confused getting into the reporting disabled state with what should happen once already in the state. If you

Re: [HACKERS] CREATE EXTENSION BLOCKS

2013-04-03 Thread David E. Wheeler
On Apr 3, 2013, at 2:37 AM, Albe Laurenz laurenz.a...@wien.gv.at wrote: I'd expect one of the CREATE EXTENSION commands to succeed and the others to block until the transaction is committed, then to fail with 'extension oracle_fdw already exists'. If that is what happens, it's what I'd

Re: [PATCH] Exorcise zero-dimensional arrays (Was: Re: [HACKERS] Should array_length() Return NULL)

2013-04-03 Thread Gavin Flower
On 04/04/13 04:58, Pavel Stehule wrote: 2013/4/3 Gavin Flower gavinflo...@archidevsys.co.nz mailto:gavinflo...@archidevsys.co.nz On 04/04/13 03:02, Florian Pflug wrote: On Apr3, 2013, at 15:30 , Andrew Dunstan and...@dunslane.net mailto:and...@dunslane.net wrote:

Re: [PATCH] Exorcise zero-dimensional arrays (Was: Re: [HACKERS] Should array_length() Return NULL)

2013-04-03 Thread Pavel Stehule
2013/4/3 Gavin Flower gavinflo...@archidevsys.co.nz On 04/04/13 04:58, Pavel Stehule wrote: 2013/4/3 Gavin Flower gavinflo...@archidevsys.co.nz On 04/04/13 03:02, Florian Pflug wrote: On Apr3, 2013, at 15:30 , Andrew Dunstan and...@dunslane.net wrote: On 04/02/2013 02:46 PM, Florian

Re: [PATCH] Exorcise zero-dimensional arrays (Was: Re: [HACKERS] Should array_length() Return NULL)

2013-04-03 Thread Pavel Stehule
Pavel ALOGOL 60 was zero based by default, as I remember deliberately setting the lower bound to 1, I managed to avoid PASCAL and I only glanced at ADA. http://en.wikipedia.org/wiki/Comparison_of_programming_languages_%28array%29 In Pascal and similar languages (Wirth family) is

Re: [PATCH] Exorcise zero-dimensional arrays (Was: Re: [HACKERS] Should array_length() Return NULL)

2013-04-03 Thread Tom Lane
Zero as the default lower bound is consistent with most languages (especially the common ones like C, C++, Java, Python), in fact I don't remember any language where that is not the case (ignoring SQL) - and I've written programs in about 20 languages. Fortran ... Basic ... actually I'd have

Re: [HACKERS] Drastic performance loss in assert-enabled build in HEAD

2013-04-03 Thread Robert Haas
On Wed, Apr 3, 2013 at 10:59 AM, Tom Lane t...@sss.pgh.pa.us wrote: In fact, I'm going to go further and say that I do not like the entire concept of scannability, either as to design or implementation, and I think we should just plain rip it out. This has been my feeling from the beginning,

Re: [PATCH] Exorcise zero-dimensional arrays (Was: Re: [HACKERS] Should array_length() Return NULL)

2013-04-03 Thread David E. Wheeler
On Apr 3, 2013, at 9:30 AM, Tom Lane t...@sss.pgh.pa.us wrote: Fortran ... Basic ... actually I'd have thought that zero was a minority position. Fashions change I guess. I say we turn the default lower bound up to 11. David -- Sent via pgsql-hackers mailing list

Re: [HACKERS] [sepgsql 2/3] Add db_schema:search permission checks

2013-04-03 Thread Robert Haas
On Tue, Apr 2, 2013 at 2:22 PM, Kohei KaiGai kai...@kaigai.gr.jp wrote: OK, please check the attached ones. Thanks. I reviewed the schema-search patch and I think it looks reasonable, but shouldn't we be calling the event OAT_NAMESPACE_SEARCH rather than OAT_SCHEMA_SEARCH? And, similarly,

Re: [PATCH] Exorcise zero-dimensional arrays (Was: Re: [HACKERS] Should array_length() Return NULL)

2013-04-03 Thread Andrew Dunstan
On 04/03/2013 11:34 AM, Gavin Flower wrote: Zero as the default lower bound is consistent with most languages (especially the common ones like C, C++, Java, Python), in fact I don't remember any language where that is not the case (ignoring SQL) - and I've written programs in about 20

Re: [HACKERS] regression test failed when enabling checksum

2013-04-03 Thread Jeff Janes
On Wed, Apr 3, 2013 at 2:31 AM, Andres Freund and...@2ndquadrant.comwrote: I just checked and unfortunately your dump doesn't contain all that much valid WAL: ... So just two checkpoint records. Unfortunately I fear that won't be enough to diagnose the problem, could you reproduce it

Re: [PATCH] Exorcise zero-dimensional arrays (Was: Re: [HACKERS] Should array_length() Return NULL)

2013-04-03 Thread Robert Haas
On Wed, Apr 3, 2013 at 12:36 PM, David E. Wheeler da...@kineticode.com wrote: On Apr 3, 2013, at 9:30 AM, Tom Lane t...@sss.pgh.pa.us wrote: Fortran ... Basic ... actually I'd have thought that zero was a minority position. Fashions change I guess. I say we turn the default lower bound up to

Re: [HACKERS] regression test failed when enabling checksum

2013-04-03 Thread Andres Freund
On 2013-04-03 09:48:54 -0700, Jeff Janes wrote: On Wed, Apr 3, 2013 at 2:31 AM, Andres Freund and...@2ndquadrant.comwrote: I just checked and unfortunately your dump doesn't contain all that much valid WAL: ... So just two checkpoint records. Unfortunately I fear that

Re: [HACKERS] Regex with 32k different chars causes a backend crash

2013-04-03 Thread Heikki Linnakangas
On 03.04.2013 18:41, Tom Lane wrote: Heikki Linnakangashlinnakan...@vmware.com writes: On 03.04.2013 18:21, Tom Lane wrote: Obviously Henry didn't think that far ahead. I agree that throwing an error is the best solution, and that widening color is probably not what we want to do. You want

Re: [HACKERS] Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-04-03 Thread Robert Haas
On Tue, Apr 2, 2013 at 12:19 PM, Peter Eisentraut pete...@gmx.net wrote: It's weird that SET LOCAL and SET SESSION actually *set* the value, and the second key word determines how long the setting will last. SET PERSISTENT doesn't actually set the value. I predict that this will be a new

Re: [HACKERS] c language functions

2013-04-03 Thread Robert Haas
On Wed, Apr 3, 2013 at 11:26 AM, Rodrigo Barboza rodrigombu...@gmail.com wrote: Hello. I'm trying to create a generic add function. I have defined a type my_uint and it needs a '+' operator. This operator should work like normal int + int operation. The function is defined expecting arguments

Re: [HACKERS] Drastic performance loss in assert-enabled build in HEAD

2013-04-03 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Wed, Apr 3, 2013 at 10:59 AM, Tom Lane t...@sss.pgh.pa.us wrote: In fact, I'm going to go further and say that I do not like the entire concept of scannability, either as to design or implementation, and I think we should just plain rip it out.

Re: [HACKERS] c language functions

2013-04-03 Thread Rodrigo Barboza
Why not useful? If I don't make it receive anyelement, I will have to create an add function for each type. Correct me if I'm wrong. On Wed, Apr 3, 2013 at 2:27 PM, Robert Haas robertmh...@gmail.com wrote: On Wed, Apr 3, 2013 at 11:26 AM, Rodrigo Barboza rodrigombu...@gmail.com wrote:

Re: [HACKERS] Regex with 32k different chars causes a backend crash

2013-04-03 Thread Tom Lane
Heikki Linnakangas hlinnakan...@vmware.com writes: Attached is a patch to add the overflow check. I used the error message too many distinct characters in regex. That's not totally accurate, because there isn't a limit on distinct characters per se, but on the number of colors. Conceivably,

Re: [HACKERS] commit dfda6ebaec67 versus wal_keep_segments

2013-04-03 Thread Heikki Linnakangas
On 03.04.2013 18:58, Jeff Janes wrote: On Tue, Apr 2, 2013 at 10:08 PM, Jeff Janesjeff.ja...@gmail.com wrote: This commit introduced a problem with wal_keep_segments: commit dfda6ebaec6763090fb78b458a979b558c50b39b The problem seems to be that the underflow warned about is happening,

Re: [PATCH] Exorcise zero-dimensional arrays (Was: Re: [HACKERS] Should array_length() Return NULL)

2013-04-03 Thread Dean Rasheed
On 3 April 2013 15:10, Tom Lane t...@sss.pgh.pa.us wrote: I think though that the upthread argument that we'd have multiple interpretations of the same thing is bogus. To me, the core idea that's being suggested here is that '{}' should mean a zero-length 1-D array, not a zero-D array as

Re: [HACKERS] regression test failed when enabling checksum

2013-04-03 Thread Jeff Davis
On Wed, 2013-04-03 at 09:48 -0700, Jeff Janes wrote: And why did those uninitialized pages trigger warnings when they were autovacced, but not when they were seq scanned in a query? A scan won't trigger that warning. Empty pages are sometimes the expected result of a crash when the file is

Re: [PATCH] Exorcise zero-dimensional arrays (Was: Re: [HACKERS] Should array_length() Return NULL)

2013-04-03 Thread Kevin Grittner
Tom Lane t...@sss.pgh.pa.us wrote: Fortran ... Basic ... actually I'd have thought that zero was a minority position.  Fashions change I guess. When I started programming the top four languages for business programming were COBOL, BASIC, RPG II, and assembly language. (Pascal and C came later,

Re: [HACKERS] c language functions

2013-04-03 Thread Tom Lane
Rodrigo Barboza rodrigombu...@gmail.com writes: Why not useful? If I don't make it receive anyelement, I will have to create an add function for each type. If you make it anyelement, then you're contracting to be able to add any datatype whatsoever to a my_uint. This is nonsensical. You'd be

Re: [HACKERS] CREATE EXTENSION BLOCKS

2013-04-03 Thread Alvaro Herrera
David E. Wheeler wrote: On Apr 3, 2013, at 2:37 AM, Albe Laurenz laurenz.a...@wien.gv.at wrote: I'd expect one of the CREATE EXTENSION commands to succeed and the others to block until the transaction is committed, then to fail with 'extension oracle_fdw already exists'. If that is

Re: [PATCH] Exorcise zero-dimensional arrays (Was: Re: [HACKERS] Should array_length() Return NULL)

2013-04-03 Thread Gavin Flower
On 04/04/13 05:21, Pavel Stehule wrote: Pavel ALOGOL 60 was zero based by default, as I remember deliberately setting the lower bound to 1, I managed to avoid PASCAL and I only glanced at ADA.

Re: [PATCH] Exorcise zero-dimensional arrays (Was: Re: [HACKERS] Should array_length() Return NULL)

2013-04-03 Thread Andres Freund
On 2013-04-04 07:42:36 +1300, Gavin Flower wrote: On 04/04/13 05:21, Pavel Stehule wrote: Pavel ALOGOL 60 was zero based by default, as I remember deliberately setting the lower bound to 1, I managed to avoid PASCAL and I only glanced at ADA.

Re: [PATCH] Exorcise zero-dimensional arrays (Was: Re: [HACKERS] Should array_length() Return NULL)

2013-04-03 Thread Gavin Flower
On 04/04/13 05:30, Tom Lane wrote: Zero as the default lower bound is consistent with most languages (especially the common ones like C, C++, Java, Python), in fact I don't remember any language where that is not the case (ignoring SQL) - and I've written programs in about 20 languages.

Re: [HACKERS] Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-04-03 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Tue, Apr 2, 2013 at 12:19 PM, Peter Eisentraut pete...@gmx.net wrote: It's weird that SET LOCAL and SET SESSION actually *set* the value, and the second key word determines how long the setting will last. SET PERSISTENT doesn't actually set the

Re: [PATCH] Exorcise zero-dimensional arrays (Was: Re: [HACKERS] Should array_length() Return NULL)

2013-04-03 Thread Kevin Grittner
Gavin Flower gavinflo...@archidevsys.co.nz wrote: Anyhow, I think we should standardise on zero as the initial index to be as consistent as practicable. If you want to suggest a default of zero for the first subscript of an array in SQL, please don't confuse the issue by using any form of the

Re: [PATCH] Exorcise zero-dimensional arrays (Was: Re: [HACKERS] Should array_length() Return NULL)

2013-04-03 Thread Gavin Flower
On 04/04/13 05:36, David E. Wheeler wrote: On Apr 3, 2013, at 9:30 AM, Tom Lane t...@sss.pgh.pa.us wrote: Fortran ... Basic ... actually I'd have thought that zero was a minority position. Fashions change I guess. I say we turn the default lower bound up to 11. David In keeping with the

Re: [PATCH] Exorcise zero-dimensional arrays (Was: Re: [HACKERS] Should array_length() Return NULL)

2013-04-03 Thread Gavin Flower
On 04/04/13 07:58, Kevin Grittner wrote: Gavin Flower gavinflo...@archidevsys.co.nz wrote: Anyhow, I think we should standardise on zero as the initial index to be as consistent as practicable. If you want to suggest a default of zero for the first subscript of an array in SQL, please don't

Re: [HACKERS] regression test failed when enabling checksum

2013-04-03 Thread Jeff Davis
On Mon, 2013-04-01 at 19:51 -0700, Jeff Janes wrote: I've reproduced the problem, this time in block 74 of relation base/16384/4931589, and a tarball of the data directory is here: https://docs.google.com/file/d/0Bzqrh1SO9FcELS1majlFcTZsR0k/edit?usp=sharing (the table is in database

Re: [HACKERS] c language functions

2013-04-03 Thread Rodrigo Barboza
Well, I was checking inside my function the type of the second argument and switching between the allowed types. This way kind of does the same thing of many functions, doesn't it? On Wed, Apr 3, 2013 at 3:39 PM, Tom Lane t...@sss.pgh.pa.us wrote: Rodrigo Barboza rodrigombu...@gmail.com

Re: [PATCH] Exorcise zero-dimensional arrays (Was: Re: [HACKERS] Should array_length() Return NULL)

2013-04-03 Thread Andres Freund
On 2013-04-04 08:03:03 +1300, Gavin Flower wrote: On 04/04/13 07:58, Kevin Grittner wrote: Gavin Flower gavinflo...@archidevsys.co.nz wrote: Anyhow, I think we should standardise on zero as the initial index to be as consistent as practicable. If you want to suggest a default of zero for

Re: [HACKERS] commit dfda6ebaec67 versus wal_keep_segments

2013-04-03 Thread Jeff Janes
On Wed, Apr 3, 2013 at 11:14 AM, Heikki Linnakangas hlinnakan...@vmware.com wrote: On 03.04.2013 18:58, Jeff Janes wrote: On Tue, Apr 2, 2013 at 10:08 PM, Jeff Janesjeff.ja...@gmail.com wrote: This commit introduced a problem with wal_keep_segments: commit

Re: [HACKERS] Drastic performance loss in assert-enabled build in HEAD

2013-04-03 Thread Kevin Grittner
Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: Tom Lane t...@sss.pgh.pa.us wrote: In fact, I'm going to go further and say that I do not like the entire concept of scannability, either as to design or implementation, and I think we should just plain rip it out.

Re: [HACKERS] c language functions

2013-04-03 Thread Robert Haas
On Wed, Apr 3, 2013 at 3:25 PM, Rodrigo Barboza rodrigombu...@gmail.com wrote: Well, I was checking inside my function the type of the second argument and switching between the allowed types. This way kind of does the same thing of many functions, doesn't it? Sure, except that it will also

Re: [HACKERS] Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-04-03 Thread Robert Haas
On Wed, Apr 3, 2013 at 2:54 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Tue, Apr 2, 2013 at 12:19 PM, Peter Eisentraut pete...@gmx.net wrote: It's weird that SET LOCAL and SET SESSION actually *set* the value, and the second key word determines how long

Re: [HACKERS] c language functions

2013-04-03 Thread Rodrigo Barboza
I see, that's true. I'm returning unknown type, there is a little more overhead. But it's working now. =] Thanks for the help guys! On Wed, Apr 3, 2013 at 6:17 PM, Robert Haas robertmh...@gmail.com wrote: On Wed, Apr 3, 2013 at 3:25 PM, Rodrigo Barboza rodrigombu...@gmail.com wrote: Well, I

Re: [HACKERS] Drastic performance loss in assert-enabled build in HEAD

2013-04-03 Thread Tom Lane
Kevin Grittner kgri...@ymail.com writes: Tom Lane t...@sss.pgh.pa.us wrote: In fact, I'm going to go further and say that I do not like the entire concept of scannability, either as to design or implementation, and I think we should just plain rip it out. To be honest, I don't think I've

[HACKERS] Clang compiler warning on 9.3 HEAD

2013-04-03 Thread Will Leinweber
On ref 8507907 when compiling with clang on os x, I got this warning which seems like a possible bug. I thought to report this because I imagine clang isn't frequently used day-to-day by most. dependency.c:213:36: warning: implicit conversion from enumeration type 'ObjectClass' (aka 'enum

Re: [PATCH] Exorcise zero-dimensional arrays (Was: Re: [HACKERS] Should array_length() Return NULL)

2013-04-03 Thread Jim Nasby
On 4/3/13 10:34 AM, Gavin Flower wrote: Maybe we should adopt the famous compromise of '0.5'? +0.5. ;P -- Jim C. Nasby, Data Architect j...@nasby.net 512.569.9461 (cell) http://jim.nasby.net -- Sent via pgsql-hackers mailing list

[HACKERS] corrupt pages detected by enabling checksums

2013-04-03 Thread Jeff Janes
I've changed the subject from regression test failed when enabling checksum because I now know they are totally unrelated. My test case didn't need to depend on archiving being on, and so with a simple tweak I rendered the two issues orthogonal. On Wed, Apr 3, 2013 at 12:15 PM, Jeff Davis

Re: [HACKERS] Clang compiler warning on 9.3 HEAD

2013-04-03 Thread Peter Geoghegan
On Wed, Apr 3, 2013 at 11:52 PM, Will Leinweber w...@heroku.com wrote: On ref 8507907 when compiling with clang on os x, I got this warning which seems like a possible bug. I thought to report this because I imagine clang isn't frequently used day-to-day by most. I actually reported a bug

Re: [HACKERS] CREATE EXTENSION BLOCKS

2013-04-03 Thread David E. Wheeler
On Apr 3, 2013, at 11:41 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Oh, they are not unique per-schema? I guess they are global to the database but then their objects are in the specified schema, then. Right -- an extension is not considered to live within a schema, they are

Re: [HACKERS] Page replacement algorithm in buffer cache

2013-04-03 Thread Greg Stark
On Wed, Apr 3, 2013 at 3:00 PM, Robert Haas robertmh...@gmail.com wrote: The main hesitation I've had about actually implementing such a scheme is that I find it a bit unappealing to have a background process dedicated to just this. But maybe it could be combined with some of the other ideas

Re: [HACKERS] corrupt pages detected by enabling checksums

2013-04-03 Thread Andres Freund
On 2013-04-03 15:57:49 -0700, Jeff Janes wrote: I've changed the subject from regression test failed when enabling checksum because I now know they are totally unrelated. My test case didn't need to depend on archiving being on, and so with a simple tweak I rendered the two issues

Re: [PATCH] Exorcise zero-dimensional arrays (Was: Re: [HACKERS] Should array_length() Return NULL)

2013-04-03 Thread Gavin Flower
On 04/04/13 11:55, Jim Nasby wrote: On 4/3/13 10:34 AM, Gavin Flower wrote: Maybe we should adopt the famous compromise of '0.5'? +0.5. ;P Far too positive for our grim world! How about '-0,5' instead? :-) I notice you call yourself a 'Data Architect' - never too sure If I should call

Re: [HACKERS] patch to add \watch to psql

2013-04-03 Thread Will Leinweber
Here is an updated patch that addresses several of the points brought up so far, such as the sleep, internationalization banner, and zero wait check, and it removes the premature input check. Unfortunately rl_clear_screen() is not included at all in libedit, causing compilation to fail, and I was

Re: [HACKERS] spoonbill vs. -HEAD

2013-04-03 Thread Tom Lane
Stefan Kaltenbrunner ste...@kaltenbrunner.cc writes: On 04/03/2013 12:59 AM, Tom Lane wrote: BTW, on further thought it seems like maybe this is an OpenBSD bug, at least in part: what is evidently happening is that the temporary blockage of SIGINT during the handler persists even after we've

Re: [HACKERS] patch to add \watch to psql

2013-04-03 Thread Dickson S. Guedes
2013/4/3 Will Leinweber w...@heroku.com: Here is an updated patch that addresses several of the points brought up so far, such as the sleep, internationalization banner, and zero wait check, and it removes the premature input check. Unfortunately rl_clear_screen() is not included at all in

Re: [HACKERS] corrupt pages detected by enabling checksums

2013-04-03 Thread Andres Freund
On 2013-04-04 01:52:41 +0200, Andres Freund wrote: On 2013-04-03 15:57:49 -0700, Jeff Janes wrote: I've changed the subject from regression test failed when enabling checksum because I now know they are totally unrelated. My test case didn't need to depend on archiving being on, and so

Re: [HACKERS] corrupt pages detected by enabling checksums

2013-04-03 Thread Jeff Davis
On Wed, 2013-04-03 at 15:57 -0700, Jeff Janes wrote: You don't know that the cluster is in the bad state until after it goes through recovery because most crashes recover perfectly fine. So it would have to make a side-copy of the cluster after the crash, then recover the original and see

Re: [HACKERS] Regex with 32k different chars causes a backend crash

2013-04-03 Thread Noah Misch
On Wed, Apr 03, 2013 at 08:09:15PM +0300, Heikki Linnakangas wrote: --- a/src/include/regex/regguts.h +++ b/src/include/regex/regguts.h @@ -148,6 +148,7 @@ typedef short color; /* colors of characters */ typedef int pcolor; /* what color promotes to

Re: [HACKERS] corrupt pages detected by enabling checksums

2013-04-03 Thread Andres Freund
On 2013-04-04 02:28:32 +0200, Andres Freund wrote: On 2013-04-04 01:52:41 +0200, Andres Freund wrote: On 2013-04-03 15:57:49 -0700, Jeff Janes wrote: I've changed the subject from regression test failed when enabling checksum because I now know they are totally unrelated. My test

Re: [HACKERS] Page replacement algorithm in buffer cache

2013-04-03 Thread Tom Lane
Greg Stark st...@mit.edu writes: I'm still skeptical about the idea of a freelist. That just seems like a terrible point of contention. However perhaps that's because I'm picturing an LRU linked list. Perhaps the right thing is to maintain a pool of buffers in some less contention-prone data

Re: [HACKERS] corrupt pages detected by enabling checksums

2013-04-03 Thread Tom Lane
and...@anarazel.de (Andres Freund) writes: Looking at the page lsn's with dd I noticed something peculiar: page 0: 01 00 00 00 18 c2 00 31 = 1/3100C218 page 1: 01 00 00 00 80 44 01 31 = 1/31014480 page 10: 01 00 00 00 60 ce 05 31 = 1/3105ce60 page 43: 01 00 00 00 58 7a 16 31 = 1/31167a58

Re: [HACKERS] corrupt pages detected by enabling checksums

2013-04-03 Thread Andres Freund
On 2013-04-03 20:45:51 -0400, Tom Lane wrote: and...@anarazel.de (Andres Freund) writes: Looking at the page lsn's with dd I noticed something peculiar: page 0: 01 00 00 00 18 c2 00 31 = 1/3100C218 page 1: 01 00 00 00 80 44 01 31 = 1/31014480 page 10: 01 00 00 00 60 ce 05 31 =

[HACKERS] Minor erratum for 9.2.4 release notes

2013-04-03 Thread Ian Lawrence Barwick
I guess the 9.2.4 release notes haven't been finalized yet; apologies if this is already addressed, but following sentence: para Also, if you are upgrading from a version earlier than 9.2.2, see the release notes for 9.2.2. /para should read: para Also, if you are upgrading

Re: [HACKERS] Interesting post-mortem on a near disaster with git

2013-04-03 Thread Jim Nasby
On 3/26/13 6:42 AM, Cédric Villemain wrote: Le lundi 25 mars 2013 19:35:12, Daniel Farina a écrit : On Mon, Mar 25, 2013 at 11:07 AM, Stefan Kaltenbrunner ste...@kaltenbrunner.cc wrote: Back when we used CVS for quite a few years I kept 7 day rolling snapshots of the CVS repo,

Re: [HACKERS] Minor erratum for 9.2.4 release notes

2013-04-03 Thread Tom Lane
Ian Lawrence Barwick barw...@gmail.com writes: I guess the 9.2.4 release notes haven't been finalized yet; apologies if this is already addressed, but following sentence: para Also, if you are upgrading from a version earlier than 9.2.2, see the release notes for 9.2.2. /para

Re: [HACKERS] Minor erratum for 9.2.4 release notes

2013-04-03 Thread Ian Lawrence Barwick
2013/4/4 Tom Lane t...@sss.pgh.pa.us: Ian Lawrence Barwick barw...@gmail.com writes: I guess the 9.2.4 release notes haven't been finalized yet; apologies if this is already addressed, but following sentence: para Also, if you are upgrading from a version earlier than 9.2.2, see

Re: [PATCH] Exorcise zero-dimensional arrays (Was: Re: [HACKERS] Should array_length() Return NULL)

2013-04-03 Thread Brendan Jurd
On 4 April 2013 01:10, Tom Lane t...@sss.pgh.pa.us wrote: I think though that the upthread argument that we'd have multiple interpretations of the same thing is bogus. To me, the core idea that's being suggested here is that '{}' should mean a zero-length 1-D array, not a zero-D array as

Re: [HACKERS] Interesting post-mortem on a near disaster with git

2013-04-03 Thread Daniel Farina
On Wed, Apr 3, 2013 at 6:18 PM, Jim Nasby j...@nasby.net wrote: What about rdiff-backup? I've set it up for personal use years ago (via the handy open source bash script backupninja) years ago and it has a pretty nice no-frills point-in-time, self-expiring, file-based automatic

Re: [HACKERS] Page replacement algorithm in buffer cache

2013-04-03 Thread Ants Aasma
On Thu, Apr 4, 2013 at 3:41 AM, Tom Lane t...@sss.pgh.pa.us wrote: I think the original vision of the clock sweep algorithm included the idea that different backends could be running the sweep over different parts of the buffer ring concurrently. If we could get rid of the need to serialize

Re: [HACKERS] corrupt pages detected by enabling checksums

2013-04-03 Thread Andres Freund
On 2013-04-04 02:58:43 +0200, Andres Freund wrote: On 2013-04-03 20:45:51 -0400, Tom Lane wrote: and...@anarazel.de (Andres Freund) writes: Looking at the page lsn's with dd I noticed something peculiar: page 0: 01 00 00 00 18 c2 00 31 = 1/3100C218 page 1: 01 00 00 00 80 44 01

Re: [HACKERS] Multi-pass planner

2013-04-03 Thread Greg Stark
On Fri, Aug 21, 2009 at 6:54 PM, decibel deci...@decibel.org wrote: Would it? Risk seems like it would just be something along the lines of the high-end of our estimate. I don't think confidence should be that hard either. IE: hard-coded guesses have a low confidence. Something pulled right

Re: [HACKERS] Page replacement algorithm in buffer cache

2013-04-03 Thread Greg Smith
On 4/2/13 11:54 AM, Robert Haas wrote: But, having said that, I still think the best idea is what Andres proposed, which pretty much matches my own thoughts: the bgwriter needs to populate the free list, so that buffer allocations don't have to wait for linear scans of the buffer array. I was

  1   2   >