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 wrote: > Sorry for my late reply. > > On Sun, Jun 9, 2013 at 6:45 PM, Dean Rasheed > wrote: >> >> I called it updatable rather than "writable" or "read-only" because it >> might perhaps be extended in the future with separate options for >> "insertable" and

Re: [HACKERS] Parallell Optimizer

2013-06-11 Thread Hannu Krosing
On 06/10/2013 10:37 PM, Fred&Dani&Pandora&Aquiles 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

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 return

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

Re: [HACKERS] Batch API for After Triggers

2013-06-11 Thread Simon Riggs
On 10 June 2013 22:50, Robert Haas wrote: > On Sat, Jun 8, 2013 at 5:00 PM, Simon Riggs 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 triggers that can take >> advantage

Re: [HACKERS] DO ... RETURNING

2013-06-11 Thread Pavel Stehule
2013/6/11 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 >> >> pro

Re: [HACKERS] erroneous restore into pg_catalog schema

2013-06-11 Thread Dimitri Fontaine
Stephen Frost 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 which provide the '

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, curren

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 reaso

Re: [HACKERS] DO ... RETURNING

2013-06-11 Thread Dimitri Fontaine
Hi, That topic apparently raises each year and rehash the same points. Pavel Stehule 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 a utility statement,

Re: [HACKERS] DO ... RETURNING

2013-06-11 Thread Pavel Stehule
2013/6/11 Dimitri Fontaine : > Hi, > > That topic apparently raises each year and rehash the same points. > > Pavel Stehule 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 stil

Re: [HACKERS] DO ... RETURNING

2013-06-11 Thread Dimitri Fontaine
Pavel Stehule 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 mailing list (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 : >> Hi, >> >> That topic apparently raises each year and rehash the same points. >> >> Pavel Stehule writes: >>> probably we can allow using DO in CTE without impact on other SQL >>> statements, and for this purpose we need

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

Re: [HACKERS] DO ... RETURNING

2013-06-11 Thread Pavel Stehule
2013/6/11 Dimitri Fontaine : > Pavel Stehule 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 these scripts will be executed. Maybe

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

Re: [HACKERS] erroneous restore into pg_catalog schema

2013-06-11 Thread Stephen Frost
* Dimitri Fontaine (dimi...@2ndquadrant.fr) wrote: > Stephen Frost 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

Re: [HACKERS] Server side lo-funcs name

2013-06-11 Thread Robert Haas
On Tue, Jun 11, 2013 at 1:32 AM, Tatsuo Ishii 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: >> http://www.postgresql.org/docs/9.3/static/lo-funcs.html

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 b

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

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")

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 extract

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

2013-06-11 Thread Tom Lane
Dean Rasheed writes: > On 11 June 2013 01:03, Michael Paquier 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 --- I'm planning to look at this in the next few

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 s

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 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: >>> http://www.postgresql.org/docs/9.3/static/lo-fun

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

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

Re: [HACKERS] DO ... RETURNING

2013-06-11 Thread Merlin Moncure
On Tue, Jun 11, 2013 at 6:07 AM, Pavel Stehule wrote: > 2013/6/11 Dimitri Fontaine : >> Pavel Stehule 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 o

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 wrote: >>> On Sat, Jun 8, 2013 at 5:04 AM, Simon Riggs wrote: >>> On 7 June 2013 20:23, 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 m

Re: [HACKERS] Parallell Optimizer

2013-06-11 Thread Tatsuo Ishii
> On Tue, Jun 11, 2013 at 9:45 AM, Tatsuo Ishii wrote: > >> > On Sat, Jun 8, 2013 at 5:04 AM, Simon Riggs >> wrote: >> > >> >> On 7 June 2013 20:23, Tom Lane wrote: >> >> >> >> > As for other databases, I suspect that ones that have parallel >> execution >> >> > are probably doing it with a thr

Re: [HACKERS] DO ... RETURNING

2013-06-11 Thread Pavel Stehule
2013/6/11 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 abou

Re: [HACKERS] DO ... RETURNING

2013-06-11 Thread Pavel Stehule
2013/6/11 Pavel Stehule : > 2013/6/11 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 work

Re: [HACKERS] DO ... RETURNING

2013-06-11 Thread Merlin Moncure
On Tue, Jun 11, 2013 at 9:45 AM, Stephen Frost 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 spi worker

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 posix_fallocate

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 c

Re: [HACKERS] DO ... RETURNING

2013-06-11 Thread Stephen Frost
* Pavel Stehule (pavel.steh...@gmail.com) wrote: > 2013/6/11 Stephen Frost : > > 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 able to

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 (usua

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 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 patch i

Re: [HACKERS] DO ... RETURNING

2013-06-11 Thread Pavel Stehule
2013/6/11 Stephen Frost : > * Pavel Stehule (pavel.steh...@gmail.com) wrote: >> 2013/6/11 Stephen Frost : >> > 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 t

Re: [HACKERS] DO ... RETURNING

2013-06-11 Thread Merlin Moncure
On Tue, Jun 11, 2013 at 11:00 AM, Stephen Frost wrote: > * Pavel Stehule (pavel.steh...@gmail.com) wrote: >> 2013/6/11 Stephen Frost : >> > 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:26 AM, Pavel Stehule wrote: > 2013/6/11 Stephen Frost : >> * Pavel Stehule (pavel.steh...@gmail.com) wrote: >>> 2013/6/11 Stephen Frost : >>> > And this still has next-to-nothing to do with the specific proposal that >>> > was put forward. >>> > >>> > I'd like actual pro

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

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 cha

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 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 >>> uti

Re: [HACKERS] DO ... RETURNING

2013-06-11 Thread Merlin Moncure
On Tue, Jun 11, 2013 at 12:01 PM, Hannu Krosing 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: http://farrago.sourceforge.net/design/UserDefinedTypesAndRout

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 wrote: > 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 functions, but I am not s

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 m

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 2ndQuadran

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 inste

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 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 pro

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 g

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 writes: After thinking about this some more I have come to the conclusion that we should only do any de-escaping of \u sequence

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

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: > http://www.postgresql.org/community/

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 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 the >> p

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 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 rel

Re: [HACKERS] JSON and unicode surrogate pairs

2013-06-11 Thread Tom Lane
Andrew Dunstan 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 definition for JSON,

[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 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? There's still p

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

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 mo

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, Fred&Dani&Pandora&Aquiles 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

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 wrote: On Sat, Jun 8, 2013 at 5:04 AM, Simon Riggs wrote: > On 7 June 2013 20:23, Tom Lane wrote: > >> As for other databases, I suspect that ones that have parallel execution >> are prob

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 poi

Re: [HACKERS] Current CLOBBER_CACHE_ALWAYS failures

2013-06-11 Thread Tom Lane
Christian Ullrich 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, thanks for the repo

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 Herrerahttp://www.2n

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 thre

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 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 seen on our mailin

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

2013-06-11 Thread Tom Lane
Dean Rasheed 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, >include_triggers boolean) > RETURN

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 > wrote: >> Liming Hu escribió: >> >>> I have implemented the code according to Joe's suggestion, and >>> put the code at: >>> https://github.com/liminghu/fu

Re: [HACKERS] request a new feature in fuzzystrmatch

2013-06-11 Thread Kevin Grittner
Liming Hu 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 Patch" that you shoul

[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 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 replacing them with 1-D

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 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 >> wrote: >>> Liming Hu escribió: >>> I have implemented the code according to Joe's suggestion

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 writes: > After thinking about this some more I have

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

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 instan

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 sol

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 wrote: > Dean Rasheed 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 >> re

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

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

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

2013-06-11 Thread Tom Lane
Craig Ringer 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 / NUMERIC perform

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 ac

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

2013-06-11 Thread Tom Dunstan
Hi Josh On 11 June 2013 04:37, Josh Berkus 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 well as public o

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

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 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 the first dim

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 goo

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 c

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 rec

Re: [HACKERS] Parallell Optimizer

2013-06-11 Thread Craig Ringer
On 06/12/2013 07: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 sol

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

2013-06-11 Thread Craig Ringer
On 06/12/2013 08:52 AM, Tom Dunstan wrote: > Hi Josh > > On 11 June 2013 04:37, Josh Berkus 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 application

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

2013-06-11 Thread Pavel Stehule
Hello I worked with gdc' _Decimal* types last week https://github.com/okbob/pgDecimal I tested it, and should to say, so implementation in gcc is not good - lack of lot of functionality, and our Money type is little bit faster :( Tomas Vondra play with own implementation, but I don't know any pe

  1   2   >