Re: [HACKERS] proposal: PL/Pythonu - function ereport

2015-12-07 Thread Catalin Iacob
On Thu, Dec 3, 2015 at 6:54 PM, Pavel Stehule wrote: > Don't understand - if Fatal has same behave as Error, then why it cannot be > inherited from Error? > > What can be broken? Existing code that did "except plpy.Error as exc" will now also be called if plpy.Fatal is

[HACKERS]

2015-12-07 Thread Michael Paquier
On Mon, Dec 7, 2015 at 11:37 PM, Fujii Masao wrote: > The latest patch has another problem; pg_receivexlog trying to connect to > the PostgreSQL >= 9.4 always reports the following message unexpectedly. > > could not identify system: got 1 rows and 4 fields, expected 1

Re: [HACKERS] [sqlsmith] Failed to generate plan on lateral subqueries

2015-12-07 Thread Andreas Seltenreich
I wrote: > Tom Lane writes: >> Andreas Seltenreich writes: >>> I've added new grammar rules to sqlsmith and improved some older ones. >>> This was rewarded with a return of "failed to generate plan" errors. >> >> I believe I've dealt with these cases now. Thanks for the

Re: [HACKERS]

2015-12-07 Thread Michael Paquier
On Tue, Dec 8, 2015 at 4:37 PM, Michael Paquier wrote: > The patch looks good. The top comment of RunIdentifySystem is incorrect > though. It should mention that a database name is returned and not a plugin > name. > I am not sure what happened here, gmail has

Re: [HACKERS] pg_receivexlog: spurious error message connecting to 9.3

2015-12-07 Thread Michael Paquier
On Mon, Dec 7, 2015 at 11:37 PM, Fujii Masao wrote: > The latest patch has another problem; pg_receivexlog trying to connect to > the PostgreSQL >= 9.4 always reports the following message unexpectedly. > > could not identify system: got 1 rows and 4 fields, expected 1

Re: [HACKERS] [PATCH] Equivalence Class Filters

2015-12-07 Thread Tom Lane
Jim Nasby writes: > On 12/6/15 10:38 AM, Tom Lane wrote: >> I said "in most cases". You can find example cases to support almost any >> weird planner optimization no matter how expensive and single-purpose; >> but that is the wrong way to think about it. What you have

Re: [HACKERS] pg_receivexlog: spurious error message connecting to 9.3

2015-12-07 Thread Fujii Masao
On Wed, Nov 25, 2015 at 11:34 AM, Robert Haas wrote: > On Tue, Nov 24, 2015 at 8:32 AM, Fujii Masao wrote: >> On Tue, Nov 24, 2015 at 7:00 PM, Marco Nenciarini >> wrote: >>> Hi Robert, >>> >>> On 17/11/15 20:10,

Re: [HACKERS] Cube extension kNN support

2015-12-07 Thread Stas Kelvich
Hello, fixed. cube_distances.diff Description: Binary data --- Stas Kelvich Postgres Professional: http://www.postgrespro.com Russian Postgres Company > On 01 Dec 2015, at 17:52, Teodor Sigaev wrote: > > Patch looks good, but there ara some review notices: > 1 gmake

Re: [HACKERS] [sqlsmith] Failed to generate plan on lateral subqueries

2015-12-07 Thread Tom Lane
Amit Langote writes: > On 2015/12/07 2:52, Andreas Seltenreich wrote: >> I've added new grammar rules to sqlsmith and improved some older ones. >> This was rewarded with a return of "failed to generate plan" errors. >> The failing queries all contain a lateral

Re: [HACKERS] [DOCS] max_worker_processes on the standby

2015-12-07 Thread Fujii Masao
On Sat, Dec 5, 2015 at 12:56 AM, Alvaro Herrera wrote: > Fujii Masao wrote: > >> Sorry for not reviewing the patch before you push it... >> >> In HEAD, I ran very simple test case: >> >> 1. enable track_commit_timestamp >> 2. start the server >> 3. run some transactions

Re: [HACKERS] [PATCH] Equivalence Class Filters

2015-12-07 Thread Jim Nasby
On 12/6/15 10:38 AM, Tom Lane wrote: I said "in most cases". You can find example cases to support almost any weird planner optimization no matter how expensive and single-purpose; but that is the wrong way to think about it. What you have to think about is average cases, and in particular,

Re: [HACKERS] Tsvector editing functions

2015-12-07 Thread Stas Kelvich
Hello. Done with the list of suggestions. Also heavily edit delete function. tsvector_ops.diff Description: Binary data --- Stas Kelvich Postgres Professional: http://www.postgrespro.com Russian Postgres Company > On 27 Nov 2015, at 15:13, Teodor Sigaev wrote: > > Hmm,

Re: [HACKERS] Using quicksort for every external sort run

2015-12-07 Thread Jeff Janes
On Wed, Dec 2, 2015 at 10:03 AM, Robert Haas wrote: > > While large sorts are uncommon in queries, they are much more common > in index builds. Therefore, I think we ought to be worrying more > about regressions at 64MB than at 4MB, because we ship with >

Re: [HACKERS] Foreign join pushdown vs EvalPlanQual

2015-12-07 Thread Robert Haas
On Mon, Dec 7, 2015 at 12:25 AM, Etsuro Fujita wrote: >> Instead, I think we should go the opposite direction and pass the >> outerplan to GetForeignPlan after all. I was lulled into a full sense >> of security by the realization that every FDW that uses this feature

Re: [HACKERS] jsonb_delete not documented

2015-12-07 Thread Andrew Dunstan
On 12/06/2015 10:49 PM, Tom Lane wrote: Peter Eisentraut writes: I see. The reference from pg_operator to pg_proc is by OID rather than function name, so I didn't find them. Is that because the function is overloaded? Yeah, I suppose so --- regproc can't resolve

Re: [HACKERS] [PATCH] Equivalence Class Filters

2015-12-07 Thread David G. Johnston
On Mon, Dec 7, 2015 at 8:35 AM, Jim Nasby wrote: > On 12/6/15 10:38 AM, Tom Lane wrote: > >> I said "in most cases". You can find example cases to support almost any >> weird planner optimization no matter how expensive and single-purpose; >> but that is the wrong way

Re: [HACKERS] [PATCH] Equivalence Class Filters

2015-12-07 Thread Jim Nasby
On 12/7/15 9:54 AM, Tom Lane wrote: Jim Nasby writes: >On 12/6/15 10:38 AM, Tom Lane wrote: >>I said "in most cases". You can find example cases to support almost any >>weird planner optimization no matter how expensive and single-purpose; >>but that is the wrong

Re: [HACKERS] [PATCH] Equivalence Class Filters

2015-12-07 Thread Jim Nasby
On 12/7/15 10:44 AM, Simon Riggs wrote: There are many optimizations we might adopt, yet planning time is a factor. It seems simple enough to ignore more complex optimizations if we have already achieved a threshold cost (say 10). Such a test would add nearly zero time for the common case. We

Re: [HACKERS] [PATCH] Equivalence Class Filters

2015-12-07 Thread Simon Riggs
On 6 December 2015 at 16:38, Tom Lane wrote: >> Lastly, in most cases knowing that t2.id <= 10 is just not worth all > >> that much; it's certainly far less useful than an equality condition. > > > I'd have thought that my link to a thread of a reported 1100 to 2200 > times >

Re: [HACKERS] Support of partial decompression for datums

2015-12-07 Thread Ildus Kurbangaliev
On Sat, 5 Dec 2015 06:14:07 +0900 Michael Paquier wrote: > On Sat, Dec 5, 2015 at 12:10 AM, Simon Riggs > wrote: > > On 4 December 2015 at 13:47, Ildus Kurbangaliev > > wrote: > > > >> > >> Attached patch adds

Re: [HACKERS] More stable query plans via more predictable column statistics

2015-12-07 Thread Shulgin, Oleksandr
On Fri, Dec 4, 2015 at 6:48 PM, Robert Haas wrote: > On Tue, Dec 1, 2015 at 10:21 AM, Shulgin, Oleksandr > wrote: > > > > What I have found is that in a significant percentage of instances, when > a > > duplicate sample value is *not* put

Re: [HACKERS] HINTing on UPDATE foo SET foo.bar = ..;

2015-12-07 Thread Michael Paquier
On Wed, Sep 2, 2015 at 6:19 AM, Marko Tiikkaja wrote: > Hopefully nobody minds if I slip this to the commit fest that started > today? The attached patch should address all the comments from the 9.5 > cycle. > All the previous comments have been addressed. Perhaps some regression

Re: [HACKERS] Some questions about the array.

2015-12-07 Thread YUriy Zhuravlev
On Friday 04 December 2015 16:52:48 Teodor Sigaev wrote: > Seems, omitting boundaries in insert/update isn't a good idea. I suggest to > allow omitting only in select subscripting. It was my last attempt to do so. So now I agree, the most simple is now disabled for insert and update. New patch

Re: [HACKERS] Using quicksort for every external sort run

2015-12-07 Thread Peter Geoghegan
On Mon, Dec 7, 2015 at 9:01 AM, Jeff Janes wrote: > So if this patch with this exact workload just happens to land on a > pre-existing infelicity, how big of a deal is that? It wouldn't be > creating a regression, just shoving the region that experiences the > problem

Re: [HACKERS] [sqlsmith] Failed to generate plan on lateral subqueries

2015-12-07 Thread Tom Lane
Andreas Seltenreich writes: > I've added new grammar rules to sqlsmith and improved some older ones. > This was rewarded with a return of "failed to generate plan" errors. I believe I've dealt with these cases now. Thanks for the report! regards, tom

Re: [HACKERS] Using quicksort for every external sort run

2015-12-07 Thread Greg Stark
​So incidentally I've been running some benchmarks myself. Mostly to understand the current scaling behaviour of sorting to better judge whether Peter's analysis of where the pain points are and why we should not worry about optimizing for the multiple merge pass case were on target. I haven't

Re: [HACKERS] [PATCH] Equivalence Class Filters

2015-12-07 Thread Gavin Flower
On 08/12/15 05:27, David G. Johnston wrote: On Mon, Dec 7, 2015 at 8:35 AM, Jim Nasby >wrote: On 12/6/15 10:38 AM, Tom Lane wrote: I said "in most cases". You can find example cases to support almost any

Re: [HACKERS] [PATCH] Equivalence Class Filters

2015-12-07 Thread Evgeniy Shishkin
> On 07 Dec 2015, at 22:27, Gavin Flower wrote: > > On 08/12/15 05:27, David G. Johnston wrote: >> On Mon, Dec 7, 2015 at 8:35 AM, Jim Nasby > >wrote: >> >>On 12/6/15 10:38 AM, Tom Lane wrote: >>

Re: [HACKERS] [PATCH] Equivalence Class Filters

2015-12-07 Thread Gavin Flower
On 08/12/15 08:34, Evgeniy Shishkin wrote: On 07 Dec 2015, at 22:27, Gavin Flower wrote: On 08/12/15 05:27, David G. Johnston wrote: On Mon, Dec 7, 2015 at 8:35 AM, Jim Nasby >wrote: On 12/6/15

Re: [HACKERS] Patch: Implement failover on libpq connect level.

2015-12-07 Thread Korry Douglas
I've tried to deal with some of these problems. My patch have support for following things: 1. Check whether database instance is in the recovery/standby mode and try to find another one if so. 2. Let cluster management software to have some time to promote one of the standbys to master. I.e.

Re: [HACKERS] Patch: Implement failover on libpq connect level.

2015-12-07 Thread Korry Douglas
I've tried to deal with some of these problems. My patch have support for following things: 1. Check whether database instance is in the recovery/standby mode and try to find another one if so. 2. Let cluster management software to have some time to promote one of the standbys to master.

Re: [HACKERS] Re: In-core regression tests for replication, cascading, archiving, PITR, etc.

2015-12-07 Thread Alvaro Herrera
Michael Paquier wrote: > > If that's not a hard-coded PG version number then I don't know > > what it is. Maybe it would be better to use random() instead, > > but surely this isn't good as-is. > > We would definitely want something within the ephemeral port range, so > we are up to that: >

Re: [HACKERS] Re: In-core regression tests for replication, cascading, archiving, PITR, etc.

2015-12-07 Thread Alvaro Herrera
Michael Paquier wrote: > On Thu, Dec 3, 2015 at 6:59 AM, Alvaro Herrera wrote: > > I didn't push the changed for config_default you requested a few > > messages upthread; it's not clear to me how setting it to undef affects > > the whole thing. If setting it to undef makes the MSVC toolchain run

Re: [HACKERS] Re: In-core regression tests for replication, cascading, archiving, PITR, etc.

2015-12-07 Thread Tom Lane
Alvaro Herrera writes: > Michael Paquier wrote: >> We would definitely want something within the ephemeral port range, so >> we are up to that: >> rand() * 16384 + 49152; > Yes, this seems to produce the correct range. Speaking of ephemeral port range ... if

Re: [HACKERS] Re: In-core regression tests for replication, cascading, archiving, PITR, etc.

2015-12-07 Thread Alvaro Herrera
Tom Lane wrote: > Alvaro Herrera writes: > > Michael Paquier wrote: > >> We would definitely want something within the ephemeral port range, so > >> we are up to that: > >> rand() * 16384 + 49152; > > > Yes, this seems to produce the correct range. > > Speaking of

Re: [HACKERS] Foreign join pushdown vs EvalPlanQual

2015-12-07 Thread Tom Lane
Robert Haas writes: > I think the core system likely needs visibility into where paths and > plans are present in node trees, and putting them somewhere inside > fdw_private would be going in the opposite direction. Absolutely. You don't really want FDWs having to take

Re: [HACKERS] [PATCH] Equivalence Class Filters

2015-12-07 Thread Simon Riggs
On 7 December 2015 at 16:55, Jim Nasby wrote: > Unfortunately I've seen a lot of millisecond queries that have 6 figure > estimates, due to data being in cache. So I'm not sure how practical that > would be. > We seem to be agreed that longer running queries may

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2015-12-07 Thread Haribabu Kommi
On Sat, Dec 5, 2015 at 3:31 AM, Alvaro Herrera wrote: > Haribabu Kommi wrote: > >> How about as follows? >> >> postgres=# select * from pg_hba_lookup('all','all','::1'); >> line_number | type | database | user | address | hostname | method | >> options | mode >>

Re: [HACKERS] [sqlsmith] Failed to generate plan on lateral subqueries

2015-12-07 Thread Andreas Seltenreich
Tom Lane writes: > Andreas Seltenreich writes: >> I've added new grammar rules to sqlsmith and improved some older ones. >> This was rewarded with a return of "failed to generate plan" errors. > > I believe I've dealt with these cases now. Thanks for the report! I no longer

Re: [HACKERS] Re: In-core regression tests for replication, cascading, archiving, PITR, etc.

2015-12-07 Thread Michael Paquier
On Tue, Dec 8, 2015 at 7:46 AM, Alvaro Herrera wrote: > Michael Paquier wrote: > > On Thu, Dec 3, 2015 at 6:59 AM, Alvaro Herrera wrote: > > > I didn't push the changed for config_default you requested a few > > > messages upthread; it's not clear to me how setting it

Re: [HACKERS] [PATCH] Equivalence Class Filters

2015-12-07 Thread David Rowley
On 8 December 2015 at 04:35, Jim Nasby wrote: > On 12/6/15 10:38 AM, Tom Lane wrote: > >> I said "in most cases". You can find example cases to support almost any >> weird planner optimization no matter how expensive and single-purpose; >> but that is the wrong way to