Re: [HACKERS] pg_sleep() doesn't work well with recovery conflict interrupts.

2014-06-01 Thread Amit Kapila
On Sun, Jun 1, 2014 at 1:05 PM, Andres Freund wrote: > On 2014-05-30 10:30:42 +0530, Amit Kapila wrote: > > On Wed, May 28, 2014 at 8:53 PM, Andres Freund > > > Since a64ca63e59c11d8fe6db24eee3d82b61db7c2c83 pg_sleep() uses > > > WaitLatch() to wait. That's fine in itself. But > > > procsignal_si

Re: [HACKERS] jsonb access operators inefficiency

2014-06-01 Thread Andrew Dunstan
On 05/30/2014 01:41 PM, Tom Lane wrote: Andrew Dunstan writes: If we're going to construct varlena objects inside a StringInfo, maybe we need a proper API for it. Isn't there a danger that data member of the StringInfo won't be properly aligned to allow us to do this? In any case, we should ge

Re: [HACKERS] Extended Prefetching using Asynchronous IO - proposal and patch

2014-06-01 Thread Heikki Linnakangas
On 06/01/2014 03:44 AM, johnlumby wrote: If you look at the new patch, you'll see that for the different-pid case, I still call aio_suspend with a timeout. As you or Claudio pointed out earlier,it could just as well sleep for the same timeout, but the small advantage of calling aio_suspend i

[HACKERS] Documenting the Frontend/Backend Protocol update criteria

2014-06-01 Thread Mikko Tiihonen
Hi, Currently the criteria on updating the F/B protocol is undefined. This makes it hard to update the protocol going forward. It makes it also hard to write library/driver/application implementations that will be more future proof to future server versions. Ideally the documentation for 9.4 (

Re: plpython_unicode test (was Re: [HACKERS] buildfarm / handling (undefined) locales)

2014-06-01 Thread Andrew Dunstan
On 06/01/2014 05:35 PM, Tom Lane wrote: I wrote: 3. Try to select some "more portable" non-ASCII character, perhaps U+00A0 (non breaking space) or U+00E1 (a-acute). I think this would probably work for most encodings but it might still fail in the Far East. Another objection is that the expec

Re: plpython_unicode test (was Re: [HACKERS] buildfarm / handling (undefined) locales)

2014-06-01 Thread Tom Lane
I wrote: > 3. Try to select some "more portable" non-ASCII character, perhaps U+00A0 > (non breaking space) or U+00E1 (a-acute). I think this would probably > work for most encodings but it might still fail in the Far East. Another > objection is that the expected/plpython_unicode.out file would

plpython_unicode test (was Re: [HACKERS] buildfarm / handling (undefined) locales)

2014-06-01 Thread Tom Lane
Tomas Vondra writes: > On 13.5.2014 20:58, Tom Lane wrote: >> Tomas Vondra writes: >>> Yeah, not really what we were shooting for. I've fixed this by >>> defining the missing locales, and indeed - magpie now fails in >>> plpython tests. >> I saw that earlier today (tho right now the buildfarm se

Re: [HACKERS] [GSoC] Clustering in MADlib - status update

2014-06-01 Thread Maxence Ahlouche
Hi all! I've pushed my report for this week on my repo [0]. Here is a copy! Attached is the patch containing my work for this week. Week 2 - 2014/01/01 This week, I have worked on the beginning of the kmedoids module. Unfortunately, I was supposed to have something working for last Wednesday, and

Re: [HACKERS] Changeset Extraction v7.6.1

2014-06-01 Thread Jim Nasby
On 6/1/14, 10:49 AM, Euler Taveira wrote: On 01-06-2014 02:57, Andres Freund wrote: On 2014-06-01 00:50:58 -0500, Jim Nasby wrote: On 5/31/14, 9:11 AM, Andres Freund wrote: On 2014-02-21 15:14:15 -0600, Jim Nasby wrote: On 2/17/14, 7:31 PM, Robert Haas wrote: But do you really want to keep t

Re: [HACKERS] pg_sleep() doesn't work well with recovery conflict interrupts.

2014-06-01 Thread Tom Lane
Andres Freund writes: > I am pretty sure by now that the sane fix for this is to add a > SetLatch() call to RecoveryConflictInterrupt(). All the signal handlers > that deal with query cancelation et al. do so, so it seems right that > RecoveryConflictInterrupt() does so as well. +1

Re: [HACKERS] teaching Var about NOT NULL

2014-06-01 Thread Tom Lane
David Rowley writes: > I quickly put together the attached patch which adds a "knownnotnull" bool > field to Var which we can set to true when we're completely sure that the > Var cannot contain any NULL values. This is utterly the wrong way to go about it. How will you update views containing s

Re: [HACKERS] Changeset Extraction v7.6.1

2014-06-01 Thread Euler Taveira
On 01-06-2014 02:57, Andres Freund wrote: > On 2014-06-01 00:50:58 -0500, Jim Nasby wrote: >> On 5/31/14, 9:11 AM, Andres Freund wrote: >>> On 2014-02-21 15:14:15 -0600, Jim Nasby wrote: On 2/17/14, 7:31 PM, Robert Haas wrote: > But do you really want to keep that snapshot around long enou

[HACKERS] teaching Var about NOT NULL

2014-06-01 Thread David Rowley
Hi, While hacking away at implementing join removal support for ANTI-JOINs I realised that I couldn't just replace the join with a WHERE false condition... Let me explain... With a query such as: SELECT * FROM a WHERE NOT EXISTS(SELECT 1 FROM b WHERE a.b_id = b.id); Where a.b_id has a foreign k

Re: [HACKERS] "pivot aggregation" with a patched intarray

2014-06-01 Thread Marc Mamin
>On Sat, May 31, 2014 at 12:31 AM, Marc Mamin wrote: >> I have patched intarray with 3 additional functions in order to >> count[distinct] event IDs >> into arrays, whereas the array position correspond to the integer values. >> (mimic column oriented storage) > >I didn't look at the feature it

Re: [HACKERS] "pivot aggregation" with a patched intarray

2014-06-01 Thread Michael Paquier
On Sat, May 31, 2014 at 12:31 AM, Marc Mamin wrote: > I have patched intarray with 3 additional functions in order to > count[distinct] event IDs > into arrays, whereas the array position correspond to the integer values. > (mimic column oriented storage) I didn't look at the feature itself, bu

Re: [HACKERS] pg_sleep() doesn't work well with recovery conflict interrupts.

2014-06-01 Thread Andres Freund
On 2014-05-30 10:30:42 +0530, Amit Kapila wrote: > On Wed, May 28, 2014 at 8:53 PM, Andres Freund > wrote: > > Hi, > > > > Since a64ca63e59c11d8fe6db24eee3d82b61db7c2c83 pg_sleep() uses > > WaitLatch() to wait. That's fine in itself. But > > procsignal_sigusr1_handler, which is used e.g. when reso

Re: [HACKERS] avoiding tuple copying in btree index builds

2014-06-01 Thread Amit Kapila
On Tue, May 6, 2014 at 12:04 AM, Robert Haas wrote: > On Mon, May 5, 2014 at 2:13 PM, Andres Freund wrote: > > On 2014-05-05 13:52:39 -0400, Robert Haas wrote: > >> Today, I discovered that when building a btree index, the btree code > >> uses index_form_tuple() to create an index tuple from the