Re: [HACKERS] Index-only scans with btree_gist

2015-03-28 Thread Andreas Karlsson
On 03/29/2015 03:25 AM, Andreas Karlsson wrote: On 03/28/2015 09:36 PM, Andreas Karlsson wrote: Thanks! Do you know if it is possible to add index-only scan support to range indexes? I have never looked at those and do not know if they are lossy. Seems like range types are not compressed at al

Re: [HACKERS] Index-only scans with btree_gist

2015-03-28 Thread Andreas Karlsson
On 03/28/2015 09:36 PM, Andreas Karlsson wrote: Thanks! Do you know if it is possible to add index-only scan support to range indexes? I have never looked at those and do not know if they are lossy. Seems like range types are not compressed at all so implementing index-only scans was trivial.

Re: [HACKERS] Rounding to even for numeric data type

2015-03-28 Thread Gavin Flower
On 29/03/15 13:07, David G. Johnston wrote: On Sat, Mar 28, 2015 at 3:59 PM, Michael Paquier mailto:michael.paqu...@gmail.com>>wrote: On Sun, Mar 29, 2015 at 5:34 AM, Gavin Flower mailto:gavinflo...@archidevsys.co.nz>> wrote: > On 28/03/15 21:58, Dean Rasheed wrote: > [...]

Re: [HACKERS] Rounding to even for numeric data type

2015-03-28 Thread David G. Johnston
On Sat, Mar 28, 2015 at 3:59 PM, Michael Paquier wrote: > On Sun, Mar 29, 2015 at 5:34 AM, Gavin Flower > wrote: > > On 28/03/15 21:58, Dean Rasheed wrote: > > [...] > >> > >> > >> Andrew mentioned that there have been complaints from people doing > >> calculations with monetary data that we don

Re: [HACKERS] compute_index_stats is missing a CHECK_FOR_INTERRUPTS

2015-03-28 Thread Jeff Janes
On Sat, Mar 28, 2015 at 3:37 PM, Tom Lane wrote: > Jeff Janes writes: > > Analyze on functional indexes cannot be interrupted very easily. > > ... > > The attached patch fixes it, but don't vouch for its safety. > > Hm. The other per-sample-row loops in analyze.c use vacuum_delay_point() > rath

Re: [HACKERS] Rounding to even for numeric data type

2015-03-28 Thread Michael Paquier
On Sun, Mar 29, 2015 at 5:34 AM, Gavin Flower wrote: > On 28/03/15 21:58, Dean Rasheed wrote: > [...] >> >> >> Andrew mentioned that there have been complaints from people doing >> calculations with monetary data that we don't implement >> round-to-nearest-even (Banker's) rounding. It's actually t

Re: [HACKERS] How about to have relnamespace and relrole?

2015-03-28 Thread Andrew Dunstan
On 03/10/2015 04:42 AM, Kyotaro HORIGUCHI wrote: Thank you for the correction. At Wed, 4 Mar 2015 01:01:48 -0600, Jim Nasby wrote in <54f6addc.8030...@bluetreble.com> On 3/3/15 8:04 PM, Kyotaro HORIGUCHI wrote: Note: The OID alias types don't sctrictly comply the transaction isolation ru

Re: [HACKERS] proposal: row_to_array function

2015-03-28 Thread Jeff Janes
On Tue, Jan 27, 2015 at 10:58 AM, Pavel Stehule wrote: > Hi > > 2015-01-27 11:41 GMT+01:00 Pavel Stehule : > >> >> >> 2015-01-26 21:44 GMT+01:00 Jim Nasby : >> >>> On 1/25/15 4:23 AM, Pavel Stehule wrote: >>> I tested a concept iteration over array in format [key1, value1, key2, va

Re: [HACKERS] PATCH: pgbench - merging transaction logs

2015-03-28 Thread Tomas Vondra
On 28.3.2015 11:21, Fabien COELHO wrote: > > Hello Tomas, > >> I do agree that fprintf is not cheap, actually when profiling pgbench >> it's often the #1 item, but the impact on the measurements is actually >> quite small. For example with a small database (scale 10) and read-only >> 30-second ru

Re: [HACKERS] Replication identifiers, take 4

2015-03-28 Thread Petr Jelinek
So I did some more in depth look, I do have couple of comments. I would really like to have something like "Logical Replication Infrastructure" doc section that would have both decoding and identifiers (and possibly even CommitTs) underneath. There is typo in docs: + + The optiona

Re: [HACKERS] compute_index_stats is missing a CHECK_FOR_INTERRUPTS

2015-03-28 Thread Tom Lane
Jeff Janes writes: > Analyze on functional indexes cannot be interrupted very easily. > ... > The attached patch fixes it, but don't vouch for its safety. Hm. The other per-sample-row loops in analyze.c use vacuum_delay_point() rather than CHECK_FOR_INTERRUPTS() directly. Ordinarily that wouldn

[HACKERS] compute_index_stats is missing a CHECK_FOR_INTERRUPTS

2015-03-28 Thread Jeff Janes
Analyze on functional indexes cannot be interrupted very easily. Example: create language plperl; create table foo1 as select x::text from generate_series(1,1000) foo (x); create table foo2 as select reverse(x) from foo1; --use a fast version to set up the demo, as we are impatient CREATE or repl

Re: [HACKERS] Index-only scans with btree_gist

2015-03-28 Thread Andreas Karlsson
On 03/28/2015 02:12 PM, Heikki Linnakangas wrote: Looks good to me. Committed, thanks. Thanks! Do you know if it is possible to add index-only scan support to range indexes? I have never looked at those and do not know if they are lossy. Andreas -- Sent via pgsql-hackers mailing list (pgs

Re: [HACKERS] Rounding to even for numeric data type

2015-03-28 Thread Gavin Flower
On 28/03/15 21:58, Dean Rasheed wrote: [...] Andrew mentioned that there have been complaints from people doing calculations with monetary data that we don't implement round-to-nearest-even (Banker's) rounding. It's actually the case that various different financial calculations demand different

Re: [HACKERS] INSERT ... ON CONFLICT IGNORE (and UPDATE) 3.0

2015-03-28 Thread Andres Freund
Hi, Just had a longer chat with Peter about this patch. * Not a fan of the heap flags usage, the reusage seems sketch to me * Explain should show the arbiter index in text as well * AddUniqueSpeculative is a bad name, it should refer IndexInfo * Work on the ExecInsert() comments * Let's remove th

Re: [HACKERS] Rounding to even for numeric data type

2015-03-28 Thread Kevin Grittner
Dean Rasheed wrote: > Sure, using round-to-nearest-even for intermediate rounding in > complex numeric methods would be a good way to reduce (but not > completely eliminate) rounding errors. But that's a somewhat > different proposition from changing the default for round(), > which is a much mor

Re: [HACKERS] Index-only scans with btree_gist

2015-03-28 Thread Heikki Linnakangas
On 03/28/2015 01:14 AM, Andreas Karlsson wrote: On 03/26/2015 10:31 PM, Heikki Linnakangas wrote: I've pushed Anastasia's patch to support index-only scans with GiST, and it's time to add opclasses support for all the opclasses that are not lossy. I think at least all the btree_gist opclasses ne

Re: [HACKERS] Rounding to even for numeric data type

2015-03-28 Thread Michael Paquier
On Sat, Mar 28, 2015 at 5:58 PM, Dean Rasheed wrote: > On 27 March 2015 at 23:26, Tom Lane wrote: >> I think the concern over backwards compatibility here is probably >> overblown; but if we're sufficiently worried about it, a possible >> compromise is to invent a numeric_rounding_mode GUC, so that

Re: [HACKERS] PATCH: pgbench - merging transaction logs

2015-03-28 Thread Fabien COELHO
Hello Tomas, I do agree that fprintf is not cheap, actually when profiling pgbench it's often the #1 item, but the impact on the measurements is actually quite small. For example with a small database (scale 10) and read-only 30-second runs (single client), I get this: no logging: 18672 1879

Re: [HACKERS] Rounding to even for numeric data type

2015-03-28 Thread Dean Rasheed
On 28 March 2015 at 05:16, Andrew Gierth wrote: >> "Tom" == Tom Lane writes: > > Tom> I think the concern over backwards compatibility here is probably > Tom> overblown; but if we're sufficiently worried about it, a possible > Tom> compromise is to invent a numeric_rounding_mode GUC, so th

Re: [HACKERS] Rounding to even for numeric data type

2015-03-28 Thread Dean Rasheed
On 27 March 2015 at 23:26, Tom Lane wrote: > Michael Paquier writes: >> It sounds appealing to switch the default behavior to something that >> is more IEEE-compliant, and not only for scale == 0. Now one can argue >> as well that changing the default is risky for existing applications, >> or the

Re: [HACKERS] Performance improvement for joins where outer side is unique

2015-03-28 Thread David Rowley
On 25 March 2015 at 01:11, Kyotaro HORIGUCHI < horiguchi.kyot...@lab.ntt.co.jp> wrote: > Hi, thanks for the new patch. > > I made an additional shrink from your last one. Do you have a > look on the attached? > > Thanks, for looking again. I'm not too sure I like the idea of relying on join remov