Re: [HACKERS] DO ... RETURNING

2013-06-11 Thread Hannu Krosing
On 06/11/2013 06:17 AM, Pavel Stehule wrote: 2013/6/10 Hannu Krosing ha...@2ndquadrant.com: On 06/10/2013 09:45 PM, Pavel Stehule wrote: 2013/6/10 David Fetter da...@fetter.org: On Mon, Jun 10, 2013 at 09:23:19PM +0200, Pavel Stehule wrote: 2013/6/10 Hannu Krosing ha...@2ndquadrant.com:

Re: [HACKERS] Parallell Optimizer

2013-06-11 Thread Simon Riggs
On 11 June 2013 01:45, Tatsuo Ishii is...@postgresql.org wrote: On Sat, Jun 8, 2013 at 5:04 AM, Simon Riggs si...@2ndquadrant.com wrote: On 7 June 2013 20:23, Tom Lane t...@sss.pgh.pa.us wrote: As for other databases, I suspect that ones that have parallel execution are probably doing it

Re: [HACKERS] Proposal for CSN based snapshots

2013-06-11 Thread Markus Wanner
Ants, the more I think about this, the more I start to like it. On 06/07/2013 02:50 PM, Ants Aasma wrote: On Fri, Jun 7, 2013 at 2:59 PM, Markus Wanner mar...@bluegap.ch wrote: Agreed. Postgres-R uses a CommitOrderId, which is very similar in concept, for example. Do you think having this

Re: [HACKERS] how to find out whether a view is updatable

2013-06-11 Thread Dean Rasheed
On 11 June 2013 01:03, Michael Paquier michael.paqu...@gmail.com wrote: Sorry for my late reply. On Sun, Jun 9, 2013 at 6:45 PM, Dean Rasheed dean.a.rash...@gmail.com wrote: I called it updatable rather than writable or read-only because it might perhaps be extended in the future with

Re: [HACKERS] Parallell Optimizer

2013-06-11 Thread Hannu Krosing
On 06/10/2013 10:37 PM, FredDaniPandoraAquiles wrote: Hi, I asked a while ago in this group about the possibility to implement a parallel planner in a multithread way, and the replies were that the proposed approach couldn't be implemented, because the postgres

Re: [HACKERS] DO ... RETURNING

2013-06-11 Thread Pavel Stehule
Hello The current situation is akin to not being able to use queries directly but always requiring you to create a view first and then do select ... from myview ok probably we can allow using DO in CTE without impact on other SQL statements, and for this purpose we need to know returned

Re: [HACKERS] DO ... RETURNING

2013-06-11 Thread David Fetter
On Tue, Jun 11, 2013 at 09:30:32AM +0200, Pavel Stehule wrote: Hello The current situation is akin to not being able to use queries directly but always requiring you to create a view first and then do select ... from myview ok probably we can allow using DO in CTE without impact

Re: [HACKERS] Batch API for After Triggers

2013-06-11 Thread Simon Riggs
On 10 June 2013 22:50, Robert Haas robertmh...@gmail.com wrote: On Sat, Jun 8, 2013 at 5:00 PM, Simon Riggs si...@2ndquadrant.com wrote: While fiddling with FK tuning, Noah suggested batching trigger executions together to avoid execution overhead. It turns out there is no easy way to write

Re: [HACKERS] DO ... RETURNING

2013-06-11 Thread Pavel Stehule
2013/6/11 David Fetter da...@fetter.org: On Tue, Jun 11, 2013 at 09:30:32AM +0200, Pavel Stehule wrote: Hello The current situation is akin to not being able to use queries directly but always requiring you to create a view first and then do select ... from myview ok probably we

Re: [HACKERS] erroneous restore into pg_catalog schema

2013-06-11 Thread Dimitri Fontaine
Stephen Frost sfr...@snowman.net writes: What happens with the default settings when you try to install two extensions that have overlapping function signatures..? I can't imagine it 'just works'.. And then what? Is there a way that an admin can set up search paths for individual users

Re: [HACKERS] erroneous restore into pg_catalog schema

2013-06-11 Thread Andres Freund
On 2013-06-11 10:33:29 +0200, Dimitri Fontaine wrote: That entirely depends on how the extension script is written. Making it possible to have two versions concurrently installed require a non trivial amount of efforts, but I don't think the extension facility gets in the way at all,

Re: [HACKERS] JSON and unicode surrogate pairs

2013-06-11 Thread Andres Freund
On 2013-06-10 13:01:29 -0400, Andrew Dunstan wrote: It's legal, is it not, to just write the equivalent Unicode character in the JSON string and not use the escapes? If so I would think that that would be the most common usage. If someone's writing an escape, they probably had a reason for

Re: [HACKERS] DO ... RETURNING

2013-06-11 Thread Dimitri Fontaine
Hi, That topic apparently raises each year and rehash the same points. Pavel Stehule pavel.steh...@gmail.com writes: probably we can allow using DO in CTE without impact on other SQL statements, and for this purpose we need to know returned TupleDescriptor early. I still think that DO being

Re: [HACKERS] DO ... RETURNING

2013-06-11 Thread Pavel Stehule
2013/6/11 Dimitri Fontaine dimi...@2ndquadrant.fr: Hi, That topic apparently raises each year and rehash the same points. Pavel Stehule pavel.steh...@gmail.com writes: probably we can allow using DO in CTE without impact on other SQL statements, and for this purpose we need to know returned

Re: [HACKERS] DO ... RETURNING

2013-06-11 Thread Dimitri Fontaine
Pavel Stehule pavel.steh...@gmail.com writes: FOR r IN pg_databases LOOP CONNECT r.dbname; Do you mean that you want to run this DO block on the client side? -- Dimitri Fontaine http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support -- Sent via pgsql-hackers

Re: [HACKERS] DO ... RETURNING

2013-06-11 Thread Hannu Krosing
On 06/11/2013 11:30 AM, Pavel Stehule wrote: 2013/6/11 Dimitri Fontaine dimi...@2ndquadrant.fr: Hi, That topic apparently raises each year and rehash the same points. Pavel Stehule pavel.steh...@gmail.com writes: probably we can allow using DO in CTE without impact on other SQL statements,

Re: [HACKERS] JSON and unicode surrogate pairs

2013-06-11 Thread Hannu Krosing
On 06/11/2013 10:47 AM, Andres Freund wrote: On 2013-06-10 13:01:29 -0400, Andrew Dunstan wrote: It's legal, is it not, to just write the equivalent Unicode character in the JSON string and not use the escapes? If so I would think that that would be the most common usage. If someone's

Re: [HACKERS] DO ... RETURNING

2013-06-11 Thread Pavel Stehule
2013/6/11 Dimitri Fontaine dimi...@2ndquadrant.fr: Pavel Stehule pavel.steh...@gmail.com writes: FOR r IN pg_databases LOOP CONNECT r.dbname; Do you mean that you want to run this DO block on the client side? no, really no. I am thinking about some outer server side process, where

[HACKERS] Current CLOBBER_CACHE_ALWAYS failures

2013-06-11 Thread Christian Ullrich
The CLOBBER_CACHE_ALWAYS animals (friarbird and jaguarundi) have been failing persistently for about 36 hours now. The error is in a test added by Tom's recent commit a4424c5: Expected: -- Check row comparisons with IN select * from int8_tbl i8 where i8 in (row(123,456)); -- fail, type

Re: [HACKERS] erroneous restore into pg_catalog schema

2013-06-11 Thread Stephen Frost
* Dimitri Fontaine (dimi...@2ndquadrant.fr) wrote: Stephen Frost sfr...@snowman.net writes: What happens with the default settings when you try to install two extensions that have overlapping function signatures..? I can't imagine it 'just works'.. And then what? Is there a way that an

Re: [HACKERS] Server side lo-funcs name

2013-06-11 Thread Robert Haas
On Tue, Jun 11, 2013 at 1:32 AM, Tatsuo Ishii is...@postgresql.org wrote: Recently we got a complain about server side large object function names described in the doc: http://www.postgresql.org/message-id/51b2413f.8010...@gmail.com In the doc:

Re: [HACKERS] JSON and unicode surrogate pairs

2013-06-11 Thread Andrew Dunstan
On 06/11/2013 06:53 AM, Hannu Krosing wrote: On 06/11/2013 10:47 AM, Andres Freund wrote: On 2013-06-10 13:01:29 -0400, Andrew Dunstan wrote: It's legal, is it not, to just write the equivalent Unicode character in the JSON string and not use the escapes? If so I would think that that would

Re: [HACKERS] JSON and unicode surrogate pairs

2013-06-11 Thread Stefan Drees
On 2013-06-11 12:53 CEST, Hannu Krosing wrote: On 06/11/2013 10:47 AM, Andres Freund wrote: On 2013-06-10 13:01:29 -0400, Andrew Dunstan wrote: It's legal, is it not, to just write the equivalent Unicode character in the JSON string and not use the escapes? If so I would think that that would

Re: [HACKERS] JSON and unicode surrogate pairs

2013-06-11 Thread Hannu Krosing
On 06/11/2013 02:41 PM, Andrew Dunstan wrote: On 06/11/2013 06:53 AM, Hannu Krosing wrote: On 06/11/2013 10:47 AM, Andres Freund wrote: On 2013-06-10 13:01:29 -0400, Andrew Dunstan wrote: It's legal, is it not, to just write the equivalent Unicode character in the JSON string and not use

Re: [HACKERS] JSON and unicode surrogate pairs

2013-06-11 Thread Hannu Krosing
On 06/11/2013 03:08 PM, Stefan Drees wrote: quiring preserving original text in json data field is Not Good! I fully expect '{a:1, a:none, a:true, a:b}'::json to come out as '{a:b}' ahem, do you mean instead to give (none - null and missing '' inserted in answer): yeah, mixed up none and

Re: [HACKERS] JSON and unicode surrogate pairs

2013-06-11 Thread Andrew Dunstan
On 06/11/2013 09:16 AM, Hannu Krosing wrote: It's a pity that we don't have a non-error producing conversion function (or if we do that I haven't found it). Then we might adopt a rule for processing unicode escapes that said convert unicode escapes to the database encoding only when

Re: [HACKERS] how to find out whether a view is updatable

2013-06-11 Thread Tom Lane
Dean Rasheed dean.a.rash...@gmail.com writes: On 11 June 2013 01:03, Michael Paquier michael.paqu...@gmail.com wrote: Yes this is definitely material for 9.4. You should add this patch to the Thanks. Arguably though, the API changes are something that should be sorted out in 9.3, I agree ---

Re: [HACKERS] JSON and unicode surrogate pairs

2013-06-11 Thread Andrew Dunstan
On 06/11/2013 09:23 AM, Hannu Krosing wrote: I can see no possible JavaScript structure which could produce duplicate key when serialised. And I don't think that any standard JSON reader supports this either. You are quite wrong. This was discussed quite recently on -hackers, too. V8 will

Re: [HACKERS] JSON and unicode surrogate pairs

2013-06-11 Thread Hannu Krosing
On 06/11/2013 03:42 PM, Andrew Dunstan wrote: On 06/11/2013 09:16 AM, Hannu Krosing wrote: It's a pity that we don't have a non-error producing conversion function (or if we do that I haven't found it). Then we might adopt a rule for processing unicode escapes that said convert unicode

Re: [HACKERS] JSON and unicode surrogate pairs

2013-06-11 Thread Stefan Drees
On 2013-06-11 15:23 CEST, Hannu Krosing wrote: On 06/11/2013 03:08 PM, Stefan Drees wrote: ... What about this: =# SELECT '{measure:seconds, measure:42}'::json; json -- {measure:42} I presume people being used to store metadata in

Re: [HACKERS] Server side lo-funcs name

2013-06-11 Thread Tatsuo Ishii
On Tue, Jun 11, 2013 at 1:32 AM, Tatsuo Ishii is...@postgresql.org wrote: Recently we got a complain about server side large object function names described in the doc: http://www.postgresql.org/message-id/51b2413f.8010...@gmail.com In the doc:

Re: [HACKERS] JSON and unicode surrogate pairs

2013-06-11 Thread Hannu Krosing
On 06/11/2013 03:54 PM, Andrew Dunstan wrote: On 06/11/2013 09:23 AM, Hannu Krosing wrote: I can see no possible JavaScript structure which could produce duplicate key when serialised. And I don't think that any standard JSON reader supports this either. You are quite wrong. This was

Re: [HACKERS] JSON and unicode surrogate pairs

2013-06-11 Thread Hannu Krosing
On 06/11/2013 04:04 PM, Stefan Drees wrote: On 2013-06-11 15:23 CEST, Hannu Krosing wrote: On 06/11/2013 03:08 PM, Stefan Drees wrote: ... What about this: =# SELECT '{measure:seconds, measure:42}'::json; json -- {measure:42} I

Re: [HACKERS] DO ... RETURNING

2013-06-11 Thread Merlin Moncure
On Tue, Jun 11, 2013 at 6:07 AM, Pavel Stehule pavel.steh...@gmail.com wrote: 2013/6/11 Dimitri Fontaine dimi...@2ndquadrant.fr: Pavel Stehule pavel.steh...@gmail.com writes: FOR r IN pg_databases LOOP CONNECT r.dbname; Do you mean that you want to run this DO block on the client

Re: [HACKERS] DO ... RETURNING

2013-06-11 Thread Stephen Frost
* Merlin Moncure (mmonc...@gmail.com) wrote: I agree with all your comments pretty much down the line. Need top level CALL that supports parameterization and multiple sets that utilizes background worker (we have example spi worker that gives some hints about how pl/pgsql could be made to

Re: [HACKERS] Parallell Optimizer

2013-06-11 Thread Tatsuo Ishii
On 11 June 2013 01:45, Tatsuo Ishii is...@postgresql.org wrote: On Sat, Jun 8, 2013 at 5:04 AM, Simon Riggs si...@2ndquadrant.com wrote: On 7 June 2013 20:23, Tom Lane t...@sss.pgh.pa.us wrote: As for other databases, I suspect that ones that have parallel execution are probably doing it

Re: [HACKERS] Parallell Optimizer

2013-06-11 Thread Tatsuo Ishii
On Tue, Jun 11, 2013 at 9:45 AM, Tatsuo Ishii is...@postgresql.org wrote: On Sat, Jun 8, 2013 at 5:04 AM, Simon Riggs si...@2ndquadrant.com wrote: On 7 June 2013 20:23, Tom Lane t...@sss.pgh.pa.us wrote: As for other databases, I suspect that ones that have parallel execution

Re: [HACKERS] DO ... RETURNING

2013-06-11 Thread Pavel Stehule
2013/6/11 Stephen Frost sfr...@snowman.net: * Merlin Moncure (mmonc...@gmail.com) wrote: I agree with all your comments pretty much down the line. Need top level CALL that supports parameterization and multiple sets that utilizes background worker (we have example spi worker that gives some

Re: [HACKERS] DO ... RETURNING

2013-06-11 Thread Pavel Stehule
2013/6/11 Pavel Stehule pavel.steh...@gmail.com: 2013/6/11 Stephen Frost sfr...@snowman.net: * Merlin Moncure (mmonc...@gmail.com) wrote: I agree with all your comments pretty much down the line. Need top level CALL that supports parameterization and multiple sets that utilizes background

Re: [HACKERS] DO ... RETURNING

2013-06-11 Thread Merlin Moncure
On Tue, Jun 11, 2013 at 9:45 AM, Stephen Frost sfr...@snowman.net wrote: * Merlin Moncure (mmonc...@gmail.com) wrote: I agree with all your comments pretty much down the line. Need top level CALL that supports parameterization and multiple sets that utilizes background worker (we have example

Re: [HACKERS] fallocate / posix_fallocate for new WAL file creation (etc...)

2013-06-11 Thread Jon Nelson
There hasn't been much activity here recently. I'm curious, then, if there are questions that I can answer. It may be useful to summarize some things here: - the purpose of the patch is to use posix_fallocate when creating new WAL files, because it's (usually) much quicker - using

Re: [HACKERS] [PATCH] pgbench --throttle (submission 7 - with lag measurement)

2013-06-11 Thread Greg Smith
On 6/10/13 6:02 PM, Fabien COELHO wrote: - the tps is global, with a mutex to share the global stochastic process - there is an adaptation for the fork emulation - I do not know wheter this works with Win32 pthread stuff. Instead of this complexity, can we just split the TPS input per

Re: [HACKERS] DO ... RETURNING

2013-06-11 Thread Stephen Frost
* Pavel Stehule (pavel.steh...@gmail.com) wrote: 2013/6/11 Stephen Frost sfr...@snowman.net: And this still has next-to-nothing to do with the specific proposal that was put forward. I'd like actual procedures too, but it's a completely different and distinct thing from making DO blocks

Re: [HACKERS] fallocate / posix_fallocate for new WAL file creation (etc...)

2013-06-11 Thread Stefan Drees
On 2013-11.06 17:28, Jon Nelson wrote: There hasn't been much activity here recently. I'm curious, then, if there are questions that I can answer. It may be useful to summarize some things here: - the purpose of the patch is to use posix_fallocate when creating new WAL files, because it's

Re: [HACKERS] fallocate / posix_fallocate for new WAL file creation (etc...)

2013-06-11 Thread Merlin Moncure
On Tue, Jun 11, 2013 at 11:08 AM, Stefan Drees ste...@drees.name wrote: On 2013-11.06 17:28, Jon Nelson wrote: There hasn't been much activity here recently. I'm curious, then, if there are questions that I can answer. It may be useful to summarize some things here: - the purpose of the

Re: [HACKERS] DO ... RETURNING

2013-06-11 Thread Pavel Stehule
2013/6/11 Stephen Frost sfr...@snowman.net: * Pavel Stehule (pavel.steh...@gmail.com) wrote: 2013/6/11 Stephen Frost sfr...@snowman.net: And this still has next-to-nothing to do with the specific proposal that was put forward. I'd like actual procedures too, but it's a completely

Re: [HACKERS] DO ... RETURNING

2013-06-11 Thread Merlin Moncure
On Tue, Jun 11, 2013 at 11:00 AM, Stephen Frost sfr...@snowman.net wrote: * Pavel Stehule (pavel.steh...@gmail.com) wrote: 2013/6/11 Stephen Frost sfr...@snowman.net: And this still has next-to-nothing to do with the specific proposal that was put forward. I'd like actual procedures too,

Re: [HACKERS] DO ... RETURNING

2013-06-11 Thread Merlin Moncure
On Tue, Jun 11, 2013 at 11:26 AM, Pavel Stehule pavel.steh...@gmail.com wrote: 2013/6/11 Stephen Frost sfr...@snowman.net: * Pavel Stehule (pavel.steh...@gmail.com) wrote: 2013/6/11 Stephen Frost sfr...@snowman.net: And this still has next-to-nothing to do with the specific proposal that

Re: [HACKERS] DO ... RETURNING

2013-06-11 Thread Stephen Frost
On Tuesday, June 11, 2013, Pavel Stehule wrote: I don't believe there's any intent to ever have DO used for stored procedures. Not only are stored procedures deserving of their own top-level command (eg: CALL, as has been discussed before..), but I believe they would necessairly have

Re: [HACKERS] fallocate / posix_fallocate for new WAL file creation (etc...)

2013-06-11 Thread Stephen Frost
* Merlin Moncure (mmonc...@gmail.com) wrote: It's understood that posix_fallocate is faster at this -- the question on the table is 'does this matter in context of postgres?'. Personally I think this patch should go in regardless -- the concerns made IMNSHO are specious. I've not had a chance

Re: [HACKERS] DO ... RETURNING

2013-06-11 Thread Hannu Krosing
On 06/11/2013 05:27 PM, Merlin Moncure wrote: On Tue, Jun 11, 2013 at 9:45 AM, Stephen Frost sfr...@snowman.net wrote: * Merlin Moncure (mmonc...@gmail.com) wrote: I agree with all your comments pretty much down the line. Need top level CALL that supports parameterization and multiple sets

Re: [HACKERS] DO ... RETURNING

2013-06-11 Thread Merlin Moncure
On Tue, Jun 11, 2013 at 12:01 PM, Hannu Krosing ha...@2ndquadrant.com wrote: Could you point to the ISO/ANSI SQL CALL definition ? I can't: no one can because the SQL standard is not available online. But you can look at various proxies, for example here:

Re: [HACKERS] how to find out whether a view is updatable

2013-06-11 Thread Michael Paquier
On Tue, Jun 11, 2013 at 4:07 PM, Dean Rasheed dean.a.rash...@gmail.comwrote: Thanks. Arguably though, the API changes are something that should be sorted out in 9.3, but I'm not sure how much of an appetite there is for that, or whether it's too late. I see, OK for the API changes on the

Re: [HACKERS] DO ... RETURNING

2013-06-11 Thread Stefan Drees
On 2013-06-11 19:01 CEST, Hannu Krosing wrote: On 06/11/2013 05:27 PM, Merlin Moncure wrote: On Tue, Jun 11, 2013 at 9:45 AM, Stephen Frost ... wrote: * Merlin Moncure ... wrote: I agree with all your comments pretty much down the line. Need top level CALL that supports parameterization and

Re: [HACKERS] fallocate / posix_fallocate for new WAL file creation (etc...)

2013-06-11 Thread Greg Smith
On 6/11/13 12:22 PM, Merlin Moncure wrote: Personally I think this patch should go in regardless -- the concerns made IMNSHO are specious. That's nice, but we have this process for validating whether features go in or not that relies on review instead of opinions. -- Greg Smith

Re: [HACKERS] fallocate / posix_fallocate for new WAL file creation (etc...)

2013-06-11 Thread Stefan Drees
On 2013-06-11 19:45 CEST, Greg Smith wrote: On 6/11/13 12:22 PM, Merlin Moncure wrote: Personally I think this patch should go in regardless -- the concerns made IMNSHO are specious. That's nice, but we have this process for validating whether features go in or not that relies on review

Re: [HACKERS] fallocate / posix_fallocate for new WAL file creation (etc...)

2013-06-11 Thread Jon Nelson
On Tue, Jun 11, 2013 at 12:49 PM, Stefan Drees ste...@drees.name wrote: On 2013-06-11 19:45 CEST, Greg Smith wrote: On 6/11/13 12:22 PM, Merlin Moncure wrote: Personally I think this patch should go in regardless -- the concerns made IMNSHO are specious. That's nice, but we have this

Re: [HACKERS] SPGist triple parity concept doesn't work

2013-06-11 Thread Teodor Sigaev
Anyway I now think that we might be better off with the other idea of abandoning an insertion and retrying if we get a lock conflict. That would at least not create any performance penalty for non-concurrent scenarios; and even in concurrent cases, I suspect you'd have to be rather unlucky to

Re: [HACKERS] JSON and unicode surrogate pairs

2013-06-11 Thread Andrew Dunstan
On 06/10/2013 11:22 PM, Noah Misch wrote: On Mon, Jun 10, 2013 at 11:20:13AM -0400, Andrew Dunstan wrote: On 06/10/2013 10:18 AM, Tom Lane wrote: Andrew Dunstan and...@dunslane.net writes: After thinking about this some more I have come to the conclusion that we should only do any

[HACKERS] 9.4 CF1 Starts Saturday: need patches, reviewers, asst. CFM

2013-06-11 Thread Josh Berkus
Hackers, As a reminder, the first 9.4 commitfest starts this Saturday. If you plan to submit patches for CF1, please make sure that they are mailed in and registered with the Commitfest app by Friday, June 14th. Patches added after midnight will be bounced to CF2. We already have 72 patches

Re: [HACKERS] 9.4 CF1 Starts Saturday: need patches, reviewers, asst. CFM

2013-06-11 Thread Stephen Frost
Josh, * Josh Berkus (j...@agliodbs.com) wrote: We already have 72 patches pending. Fun! If you are available to do CF reviews, and want to be assigned a patch instead of choosing one for yourself, then please join the pgsql-rrreviewers mailing list:

Re: [HACKERS] 9.4 CF1 Starts Saturday: need patches, reviewers, asst. CFM

2013-06-11 Thread Atri Sharma
On Tue, Jun 11, 2013 at 11:46 PM, Stephen Frost sfr...@snowman.net wrote: Josh, * Josh Berkus (j...@agliodbs.com) wrote: We already have 72 patches pending. Fun! If you are available to do CF reviews, and want to be assigned a patch instead of choosing one for yourself, then please join

Re: [HACKERS] fallocate / posix_fallocate for new WAL file creation (etc...)

2013-06-11 Thread Merlin Moncure
On Tue, Jun 11, 2013 at 12:45 PM, Greg Smith g...@2ndquadrant.com wrote: On 6/11/13 12:22 PM, Merlin Moncure wrote: Personally I think this patch should go in regardless -- the concerns made IMNSHO are specious. That's nice, but we have this process for validating whether features go in or

Re: [HACKERS] JSON and unicode surrogate pairs

2013-06-11 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: As a final counter example, let me note that Postgres itself handles Unicode escapes differently in UTF8 databases - in other databases it only accepts Unicode escapes up to U+007f, i.e. ASCII characters. Good point. What if we adopt that same

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

2013-06-11 Thread Josh Berkus
On 04/08/2013 07:16 PM, Brendan Jurd wrote: On 9 April 2013 09:24, Josh Berkus j...@agliodbs.com wrote: As much as I have a keen interest in this feature, it isn't (AFAIK) being considered for 9.3. Given that it's generated a fair amount of controversy, could we table it until 9.3 beta?

Re: [HACKERS] request a new feature in fuzzystrmatch

2013-06-11 Thread Liming Hu
On Sat, May 18, 2013 at 6:38 PM, David Fetter da...@fetter.org wrote: On Fri, May 17, 2013 at 05:50:38PM +0200, Cédric Villemain wrote: Hello Liming, Sounds interesting. How can we build this over our current implementation, or do we need to build it from scratch? I know how to

Re: [HACKERS] Parallell Optimizer

2013-06-11 Thread Jim Nasby
On 6/7/13 2:23 PM, Tom Lane wrote: As for other databases, I suspect that ones that have parallel execution are probably doing it with a thread model not a process model. Oracle 9i was multi-process, not multi-threaded. IIRC it actually had dedicated IO processes too; backends didn't do their

Re: [HACKERS] [PATCH] pgbench --throttle (submission 7 - with lag measurement)

2013-06-11 Thread Fabien COELHO
- the tps is global, with a mutex to share the global stochastic process - there is an adaptation for the fork emulation - I do not know wheter this works with Win32 pthread stuff. Instead of this complexity, Well, the mutex impact is very localized in the code. The complexity is

Re: [HACKERS] Parallell Optimizer

2013-06-11 Thread Gavin Flower
On 11/06/13 19:24, Hannu Krosing wrote: On 06/10/2013 10:37 PM, FredDaniPandoraAquiles wrote: Hi, I asked a while ago in this group about the possibility to implement a parallel planner in a multithread way, and the replies were that the proposed approach couldn't be

Re: [HACKERS] Parallell Optimizer

2013-06-11 Thread Hannu Krosing
On 06/11/2013 04:53 PM, Tatsuo Ishii wrote: On 11 June 2013 01:45, Tatsuo Ishii is...@postgresql.org wrote: On Sat, Jun 8, 2013 at 5:04 AM, Simon Riggs si...@2ndquadrant.com wrote: On 7 June 2013 20:23, Tom Lane t...@sss.pgh.pa.us wrote: As for other databases, I suspect that ones that have

Re: [HACKERS] [PATCH] pgbench --throttle (submission 7 - with lag measurement)

2013-06-11 Thread Fabien COELHO
Submission 10: - per thread throttling instead of a global process with a mutex. this avoids a mutex, and the process is shared between clients of a given thread. - ISTM that there thread start time should be initialized at the beginning of threadRun instead of in the loop *before*

Re: [HACKERS] [PATCH] pgbench --throttle (submission 7 - with lag measurement)

2013-06-11 Thread Greg Smith
On 6/11/13 4:11 PM, Fabien COELHO wrote: - ISTM that there thread start time should be initialized at the beginning of threadRun instead of in the loop *before* thread creation, otherwise the thread creation delays are incorporated in the performance measure, but ISTM that the

Re: [HACKERS] Current CLOBBER_CACHE_ALWAYS failures

2013-06-11 Thread Tom Lane
Christian Ullrich ch...@chrullrich.net writes: The CLOBBER_CACHE_ALWAYS animals (friarbird and jaguarundi) have been failing persistently for about 36 hours now. The error is in a test added by Tom's recent commit a4424c5: Huh ... this is a pre-existing bug in the typcache code. Will fix,

Re: [HACKERS] request a new feature in fuzzystrmatch

2013-06-11 Thread Alvaro Herrera
Liming Hu escribió: I have implemented the code according to Joe's suggestion, and put the code at: https://github.com/liminghu/fuzzystrmatch/tree/fuzzystrmatchv1.1 Please submit a proper patch so it can be seen on our mailing list archives. -- Álvaro Herrera

Re: [HACKERS] [PATCH] pgbench --throttle (submission 7 - with lag measurement)

2013-06-11 Thread Fabien COELHO
- ISTM that there thread start time should be initialized at the beginning of threadRun instead of in the loop *before* thread creation, otherwise the thread creation delays are incorporated in the performance measure, but ISTM that the point of pgbench is not to measure

Re: [HACKERS] request a new feature in fuzzystrmatch

2013-06-11 Thread Liming Hu
On Tue, Jun 11, 2013 at 1:57 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Liming Hu escribió: I have implemented the code according to Joe's suggestion, and put the code at: https://github.com/liminghu/fuzzystrmatch/tree/fuzzystrmatchv1.1 Please submit a proper patch so it can be

Re: [HACKERS] how to find out whether a view is updatable

2013-06-11 Thread Tom Lane
Dean Rasheed dean.a.rash...@gmail.com writes: Here's a more complete patch along those lines. It defines the following pair of functions to test for updatability from SQL: FUNCTION pg_catalog.pg_relation_is_updatable(reloid oid,

Re: [HACKERS] request a new feature in fuzzystrmatch

2013-06-11 Thread Joe Conway
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/11/2013 02:23 PM, Liming Hu wrote: On Tue, Jun 11, 2013 at 1:57 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Liming Hu escribió: I have implemented the code according to Joe's suggestion, and put the code at:

Re: [HACKERS] request a new feature in fuzzystrmatch

2013-06-11 Thread Kevin Grittner
Liming Hu dawnin...@gmail.com wrote: I am kind of new to the Postgresql hacker community, Can you please help me on submit the patch? You might want to read this page: http://wiki.postgresql.org/wiki/Developer_FAQ In particular, the Development Process section has a link to Submitting a

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

2013-06-11 Thread Brendan Jurd
On 12 June 2013 04:43, Josh Berkus j...@agliodbs.com wrote: What's the status on this patch and current approach to ZDA? Alright, it might be a good idea to have a quick recap. Last time, on Arrays Of Our Lives ... So I proposed and posted a patch aimed at deprecating zero-D arrays, and

Re: [HACKERS] request a new feature in fuzzystrmatch

2013-06-11 Thread Liming Hu
On Tue, Jun 11, 2013 at 2:56 PM, Joe Conway m...@joeconway.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/11/2013 02:23 PM, Liming Hu wrote: On Tue, Jun 11, 2013 at 1:57 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Liming Hu escribió: I have implemented the code

Re: [HACKERS] JSON and unicode surrogate pairs

2013-06-11 Thread Noah Misch
On Tue, Jun 11, 2013 at 02:10:45PM -0400, Andrew Dunstan wrote: On 06/10/2013 11:22 PM, Noah Misch wrote: On Mon, Jun 10, 2013 at 11:20:13AM -0400, Andrew Dunstan wrote: On 06/10/2013 10:18 AM, Tom Lane wrote: Andrew Dunstan and...@dunslane.net writes: After thinking about this some more I

[HACKERS] Clean switchover

2013-06-11 Thread Fujii Masao
Hi, In streaming replication, when we shutdown the master, walsender tries to send all the outstanding WAL records including the shutdown checkpoint record to the standby, and then to exit. This basically means that all the WAL records are fully synced between two servers after the clean shutdown

Re: [HACKERS] JSON and unicode surrogate pairs

2013-06-11 Thread Andrew Dunstan
On 06/11/2013 06:26 PM, Noah Misch wrote: As a final counter example, let me note that Postgres itself handles Unicode escapes differently in UTF8 databases - in other databases it only accepts Unicode escapes up to U+007f, i.e. ASCII characters. I don't see a counterexample there; every

Re: [HACKERS] Parallell Optimizer

2013-06-11 Thread Tatsuo Ishii
Please explain what you mean by the word true used here. In another word, eager replication. Do you mean something along these lines : Most synchronous or eager replication solutions do conflict prevention, while asynchronous solutions have to do conflict resolution. For instance, if a

Re: [HACKERS] Parallell Optimizer

2013-06-11 Thread Hannu Krosing
On 06/12/2013 01:01 AM, Tatsuo Ishii wrote: Please explain what you mean by the word true used here. In another word, eager replication. Do you mean something along these lines : Most synchronous or eager replication solutions do conflict prevention, while asynchronous solutions have to do

Re: [HACKERS] how to find out whether a view is updatable

2013-06-11 Thread Dean Rasheed
On 11 June 2013 22:53, Tom Lane t...@sss.pgh.pa.us wrote: Dean Rasheed dean.a.rash...@gmail.com writes: Here's a more complete patch along those lines. It defines the following pair of functions to test for updatability from SQL: FUNCTION pg_catalog.pg_relation_is_updatable(reloid oid,

Re: [HACKERS] Parallell Optimizer

2013-06-11 Thread Tatsuo Ishii
No, I'm not talking about conflict resolution. From http://www.cs.cmu.edu/~natassa/courses/15-823/F02/papers/replication.pdf: -- Eager or Lazy Replication? Eager replication: keep all replicas synchronized by updating all replicas in a

[HACKERS] Adding IEEE 754:2008 decimal floating point and hardware support for it

2013-06-11 Thread Craig Ringer
Hi all Currently DECIMAL is an alias for NUMERIC, Pg's built-in arbitrary precision and scale decimal type. I'd like to explore the possibility of using hardware decimal floating point support in newer processors, compilers and C libraries to enhance DECIMAL / NUMERIC performance. With the

Re: [HACKERS] JSON and unicode surrogate pairs

2013-06-11 Thread Noah Misch
On Tue, Jun 11, 2013 at 06:58:05PM -0400, Andrew Dunstan wrote: On 06/11/2013 06:26 PM, Noah Misch wrote: As a final counter example, let me note that Postgres itself handles Unicode escapes differently in UTF8 databases - in other databases it only accepts Unicode escapes up to U+007f, i.e.

Re: [HACKERS] Adding IEEE 754:2008 decimal floating point and hardware support for it

2013-06-11 Thread Tom Lane
Craig Ringer cr...@2ndquadrant.com writes: Currently DECIMAL is an alias for NUMERIC, Pg's built-in arbitrary precision and scale decimal type. I'd like to explore the possibility of using hardware decimal floating point support in newer processors, compilers and C libraries to enhance DECIMAL

Re: [HACKERS] JSON and unicode surrogate pairs

2013-06-11 Thread Andrew Dunstan
On 06/11/2013 08:18 PM, Noah Misch wrote: On Tue, Jun 11, 2013 at 06:58:05PM -0400, Andrew Dunstan wrote: On 06/11/2013 06:26 PM, Noah Misch wrote: As a final counter example, let me note that Postgres itself handles Unicode escapes differently in UTF8 databases - in other databases it only

Re: [HACKERS] Configurable location for extension .control files

2013-06-11 Thread Tom Dunstan
Hi Josh On 11 June 2013 04:37, Josh Berkus j...@agliodbs.com wrote: I don't personally see a reason for plural locations, but it would be nice if it recursed (that is, looked for .so's in subdirectories). My reason for this is that I work on applications which have in-house extensions as

Re: [HACKERS] Clean switchover

2013-06-11 Thread Stephen Frost
* Fujii Masao (masao.fu...@gmail.com) wrote: The attached patch fixes this problem. It just changes walsender so that it waits for all the outstanding WAL records to be replicated to the standby before closing the replication connection. Seems like a good idea to me.. Rather surprised that

Re: [HACKERS] JSON and unicode surrogate pairs

2013-06-11 Thread Noah Misch
On Tue, Jun 11, 2013 at 08:42:26PM -0400, Andrew Dunstan wrote: If we work by analogy to Postgres' own handling of Unicode escapes, we'll raise an error on any Unicode escape beyond ASCII (not on input for legacy reasons, but on trying to process such datums). I gather that would meet

Re: [HACKERS] Adding IEEE 754:2008 decimal floating point and hardware support for it

2013-06-11 Thread Craig Ringer
On 06/12/2013 08:35 AM, Tom Lane wrote: Craig Ringer cr...@2ndquadrant.com writes: Currently DECIMAL is an alias for NUMERIC, Pg's built-in arbitrary precision and scale decimal type. I'd like to explore the possibility of using hardware decimal floating point support in newer processors,

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

2013-06-11 Thread David E. Wheeler
On Jun 11, 2013, at 3:09 PM, Brendan Jurd dire...@gmail.com wrote: There have been attempts to add a cardinality function in the past, as it is required by the SQL spec, but these attempts have stalled when trying to decide how it should handle multidim arrays. Having it return the length of

Re: [HACKERS] Clean switchover

2013-06-11 Thread Mark Kirkwood
On 12/06/13 13:15, Stephen Frost wrote: * Fujii Masao (masao.fu...@gmail.com) wrote: The attached patch fixes this problem. It just changes walsender so that it waits for all the outstanding WAL records to be replicated to the standby before closing the replication connection. Seems like a

Re: [HACKERS] JSON and unicode surrogate pairs

2013-06-11 Thread Craig Ringer
On 06/12/2013 08:42 AM, Andrew Dunstan wrote: If we work by analogy to Postgres' own handling of Unicode escapes, we'll raise an error on any Unicode escape beyond ASCII (not on input for legacy reasons, but on trying to process such datums). I gather that would meet your objection. I could

Re: [HACKERS] Clean switchover

2013-06-11 Thread Amit Kapila
On Wednesday, June 12, 2013 4:23 AM Fujii Masao wrote: Hi, In streaming replication, when we shutdown the master, walsender tries to send all the outstanding WAL records including the shutdown checkpoint record to the standby, and then to exit. This basically means that all the WAL records

  1   2   >