Re: [HACKERS] PATCH: index-only scans with partial indexes

2015-07-11 Thread Tomas Vondra
Hi, On 07/10/2015 10:43 PM, Tom Lane wrote: Tomas Vondra writes: currently partial indexes end up not using index only scans in most cases, because check_index_only() is overly conservative, as explained in this comment: ... I've done a bunch of tests, and I do see small (hardly noticeable)

Re: [HACKERS] Re: Removing SSL renegotiation (Was: Should we back-patch SSL renegotiation fixes?)

2015-07-11 Thread Michael Paquier
On Fri, Jul 10, 2015 at 7:47 PM, Andres Freund wrote: > On 2015-07-01 23:32:23 -0400, Noah Misch wrote: > > We'd need to be triply confident that we know better than the DBA before > > removing flexibility in back branches. > > +1 for just changing the default. > > I think we do. But I also think

Re: [HACKERS] Re: Removing SSL renegotiation (Was: Should we back-patch SSL renegotiation fixes?)

2015-07-11 Thread Andres Freund
On 2015-07-11 21:09:05 +0900, Michael Paquier wrote: > Something like the patches attached Thanks for that! > could be considered, one is for master > and REL9_5_STABLE to remove ssl_renegotiation_limit, the second one for > ~REL9_4_STABLE to change the default to 0. > diff --git a/doc/src/sgml/

[HACKERS] strange plan with bitmap heap scan and multiple partial indexes

2015-07-11 Thread Tomas Vondra
Hi, While working on the "IOS with partial indexes" patch, I've noticed a bit strange plan. It's unrelated to that particular patch (reproducible on master), so I'm starting a new thread for it. To reproduce it, all you have to do is this (on a new cluster, all settings on default): CREA

Re: [HACKERS] strange plan with bitmap heap scan and multiple partial indexes

2015-07-11 Thread Andres Freund
On 2015-07-11 14:31:25 +0200, Tomas Vondra wrote: > While working on the "IOS with partial indexes" patch, I've noticed a bit > strange plan. It's unrelated to that particular patch (reproducible on > master), so I'm starting a new thread for it. > > To reproduce it, all you have to do is this (on

Re: [HACKERS] [PATCH] Generalized JSON output functions

2015-07-11 Thread Shulgin, Oleksandr
On Fri, Jul 10, 2015 at 5:16 PM, Pavel Stehule wrote: > >> Well, one could call it premature pessimization due to dynamic call >> overhead. >> >> IMO, the fact that json_out_init_context() sets the value callback to >> json_out_value is an implementation detail, the other parts of code should >>

Re: [HACKERS] [PATCH] Generalized JSON output functions

2015-07-11 Thread Pavel Stehule
2015-07-11 18:02 GMT+02:00 Shulgin, Oleksandr : > On Fri, Jul 10, 2015 at 5:16 PM, Pavel Stehule > wrote: > >> >>> Well, one could call it premature pessimization due to dynamic call >>> overhead. >>> >>> IMO, the fact that json_out_init_context() sets the value callback to >>> json_out_value is

Re: [HACKERS] strange plan with bitmap heap scan and multiple partial indexes

2015-07-11 Thread Tom Lane
Andres Freund writes: > On 2015-07-11 14:31:25 +0200, Tomas Vondra wrote: >> While working on the "IOS with partial indexes" patch, I've noticed a bit >> strange plan. It's unrelated to that particular patch (reproducible on >> master), so I'm starting a new thread for it. > It's indeed interesti

Re: [HACKERS] [PATCH] Generalized JSON output functions

2015-07-11 Thread Shulgin, Oleksandr
On Jul 11, 2015 6:19 PM, "Pavel Stehule" wrote: > > > > 2015-07-11 18:02 GMT+02:00 Shulgin, Oleksandr < oleksandr.shul...@zalando.de>: >> >> On Fri, Jul 10, 2015 at 5:16 PM, Pavel Stehule wrote: Well, one could call it premature pessimization due to dynamic call overhead.

Re: [HACKERS] [PATCH] Generalized JSON output functions

2015-07-11 Thread Pavel Stehule
2015-07-11 19:57 GMT+02:00 Shulgin, Oleksandr : > On Jul 11, 2015 6:19 PM, "Pavel Stehule" wrote: > > > > > > > > 2015-07-11 18:02 GMT+02:00 Shulgin, Oleksandr < > oleksandr.shul...@zalando.de>: > >> > >> On Fri, Jul 10, 2015 at 5:16 PM, Pavel Stehule > wrote: > > > Well, one cou

[HACKERS] TABLESAMPLE patch is really in pretty sad shape

2015-07-11 Thread Tom Lane
The two contrib modules this patch added are nowhere near fit for public consumption. They cannot clean up after themselves when dropped: regression=# create extension tsm_system_rows; CREATE EXTENSION regression=# create table big as select i, random() as x from generate_series(1,100) i; SE

Re: [HACKERS] strange plan with bitmap heap scan and multiple partial indexes

2015-07-11 Thread Tomas Vondra
On 07/11/2015 06:32 PM, Tom Lane wrote: ... Presumably, this is happening because the numbers of rows actually satisfying the index predicates are so small that it's a matter of luck whether any of them are included in ANALYZE's sample. Given this bad data for the index sizes, it's not totally

Re: [HACKERS] more RLS oversights

2015-07-11 Thread Joe Conway
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/10/2015 06:15 PM, Noah Misch wrote: > On Fri, Jul 10, 2015 at 03:08:53PM -0700, Joe Conway wrote: >> On 07/03/2015 10:03 AM, Noah Misch wrote: >>> (1) CreatePolicy() and AlterPolicy() omit to call >>> assign_expr_collations() on the node trees. >

Re: [HACKERS] strange plan with bitmap heap scan and multiple partial indexes

2015-07-11 Thread Tom Lane
Tomas Vondra writes: > So I think the predicate proofing is a better approach, but of course > the planning cost may be an issue. But maybe we can make this cheaper by > some clever tricks? For example, given two predicates A and B, it seems > that if A => B, then selectivity(A) <= selectivity(

Re: [HACKERS] strange plan with bitmap heap scan and multiple partial indexes

2015-07-11 Thread Tomas Vondra
Hi, On 07/11/2015 11:40 PM, Tom Lane wrote: Tomas Vondra writes: So I think the predicate proofing is a better approach, but of course the planning cost may be an issue. But maybe we can make this cheaper by some clever tricks? For example, given two predicates A and B, it seems that if A => B

Re: [HACKERS] RFC: replace pg_stat_activity.waiting with something more descriptive

2015-07-11 Thread Amit Kapila
On Fri, Jul 10, 2015 at 10:03 PM, Alexander Korotkov < a.korot...@postgrespro.ru> wrote: > > On Fri, Jun 26, 2015 at 6:39 AM, Robert Haas wrote: >> >> On Thu, Jun 25, 2015 at 9:23 AM, Peter Eisentraut wrote: >> > On 6/22/15 1:37 PM, Robert Haas wrote: >> >> Currently, the only time we report a pr