Re: [HACKERS] [PATCH] Equivalence Class Filters

2015-12-06 Thread David Rowley
On 6 December 2015 at 06:07, Tom Lane wrote: > David Rowley writes: > > As of today these Equivalence Classes only incorporate expressions which > > use the equality operator, but what if the above query had been written > as: > > > select * from t1 inner join t2 on t1.id = t2.id where t1.id <=

Re: [HACKERS] proposal: multiple psql option -c

2015-12-06 Thread Michael Paquier
On Fri, Dec 4, 2015 at 11:47 PM, Robert Haas wrote: > On Wed, Dec 2, 2015 at 12:33 AM, Pavel Stehule > wrote: >>> Yeah, I don't think that's a big issue either to be honest. The code >>> is kept consistent a maximum with what is there previously. >>> >>> Patch is switched to ready for committer.

Re: [HACKERS] proposal: multiple psql option -c

2015-12-06 Thread Michael Paquier
On Sun, Dec 6, 2015 at 10:56 PM, Michael Paquier wrote: > Thanks, I looked at that again and problem is fixed as attached. Er, not exactly... poll_query_until in PostgresNode.pm is using psql -c without the --no-psqlrc switch so this patch causes the regression tests of pg_rewind to fail. Fixed a

Re: CustomScan in a larger structure (RE: [HACKERS] CustomScan support on readfuncs.c)

2015-12-06 Thread Kouhei Kaigai
> On Wed, Dec 2, 2015 at 4:06 AM, Andres Freund wrote: > > On 2015-12-02 08:52:20 +, Kouhei Kaigai wrote: > >> diff --git a/src/backend/nodes/copyfuncs.c b/src/backend/nodes/copyfuncs.c > >> index 26264cb..c4bb76e 100644 > >> --- a/src/backend/nodes/copyfuncs.c > >> +++ b/src/backend/nodes/cop

Re: [HACKERS] a word-choice question

2015-12-06 Thread Tom Lane
Chapman Flack writes: > In PL/Java's function annotations, 'type' has been used for the > volatility category: > @Function(type=IMMUTABLE) > public static String hello() { return "Hello, world!"; } > It seems a bit infelicitous because you would probably sooner guess that > 'type' was telling you

Re: [HACKERS] [PATCH] Equivalence Class Filters

2015-12-06 Thread Tom Lane
David Rowley writes: > On 6 December 2015 at 06:07, Tom Lane wrote: >> Another issue that would need consideration is how to avoid skewing >> planner selectivity estimates with derived clauses that are fully >> redundant with other clauses. > Could you give me an example of where this is a probl

Re: [HACKERS] Logical replication and multimaster

2015-12-06 Thread Konstantin Knizhnik
Hi, I have integrated pglogical_output in multimaster, using bdr_apply from BDR as template for implementation of receiver part. The time of insert is reduced almost 10 times comparing with logical replication based on decoder_raw/receiver_raw plugins which performs logical replication using S

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

2015-12-06 Thread Andreas Seltenreich
Hi, 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 subquery. The shortest of the failing queries are below. They were run against the regression db of master as

Re: [HACKERS] a word-choice question

2015-12-06 Thread Andrew Dunstan
On 12/06/2015 11:03 AM, Tom Lane wrote: Chapman Flack writes: In PL/Java's function annotations, 'type' has been used for the volatility category: @Function(type=IMMUTABLE) public static String hello() { return "Hello, world!"; } It seems a bit infelicitous because you would probably sooner g

[HACKERS] Unicode collations in FreeBSD 11, DragonFly BSD 4.4 without ICU

2015-12-06 Thread Thomas Munro
Hi Since the ICU patch from the BSD ports trees has been discussed on this list a few times I thought people might be interested in this news: https://lists.freebsd.org/pipermail/freebsd-current/2015-October/057781.html https://www.dragonflybsd.org/release44/ https://forums.freebsd.org/threads/th

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

2015-12-06 Thread Tomas Vondra
Hello Kyotaro-san, Sorry for the long delay since your response in this thread :-( On 10/14/2015 08:06 AM, Kyotaro HORIGUCHI wrote: The table t is referred to twice by different (alias) names (though the diferrence is made by EXPLAIN, it shows that they are different rels in plantree). So we

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

2015-12-06 Thread Jeff Janes
On Sun, Nov 29, 2015 at 2:01 AM, Peter Geoghegan wrote: > On Sat, Nov 28, 2015 at 4:05 PM, Peter Geoghegan wrote: >> So there was 27.76 seconds spent copying tuples into local memory >> ahead of the quicksort, 2 minutes 56.68 seconds spent actually >> quicksorting, and a trifling 10.32 seconds ac

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

2015-12-06 Thread Peter Geoghegan
On Sun, Dec 6, 2015 at 3:59 PM, Jeff Janes wrote: > My column has the format of ABC-123-456-789-0 > > The name-space identifier ("ABC-") is the same in 99.99% of the > cases. And to date, as well as in my extrapolation, the first two > digits of the numeric part are leading zeros and the third o

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

2015-12-06 Thread Peter Geoghegan
On Tue, Nov 24, 2015 at 4:33 PM, Peter Geoghegan wrote: > So, the bottom line is: This patch seems very good, is unlikely to > have any notable downside (no case has been shown to be regressed), > but has yet to receive code review. I am working on a new version with > the first two commits consol

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

2015-12-06 Thread Peter Geoghegan
On Tue, Nov 24, 2015 at 4:46 PM, Simon Riggs wrote: >> Parallel sort is very important. Robert, Amit and I had a call about >> this earlier today. We're all in agreement that this should be >> extended in that direction, and have a rough idea about how it ought >> to fit together with the parallel

Re: [HACKERS] Double linking MemoryContext children

2015-12-06 Thread Jim Nasby
On 9/14/15 7:24 AM, Jan Wieck wrote: On 09/12/2015 11:35 AM, Kevin Grittner wrote: On the other hand, a grep indicates that there are two places that MemoryContextData.nextchild is set (and we therefore probably need to also set the new field), and Jan's proposed patch only changes one of them.

Re: [HACKERS] Attach comments to functions' parameters and return value

2015-12-06 Thread Jim Nasby
On 9/15/15 12:35 AM, Charles Clavadetscher wrote: COMMENT ON FUNCTION function_name ( [ [ argmode ] [ argname ] argtype [, ...] ] ) PARAMETER param_position IS 'text'; COMMENT ON FUNCTION function_name ( [ [ argmode ] [ argname ] argtype [, ...] ] ) RETURN VALUE IS 'text'; An alternative to "RE

[HACKERS] jsonb_delete not documented

2015-12-06 Thread Peter Eisentraut
The new function jsonb_delete does not appear to be documented. Is that intentional? The only thing that's documented is the #- operator for jsonb_delete_path. But jsonb_delete(jsonb, text) and jsonb_delete(jsonb, int) are not documented. (Those don't have an operator.) -- Sent via pgsql-hac

[HACKERS] Redundant sentence within INSERT documentation page (exclusion constraints)

2015-12-06 Thread Peter Geoghegan
There is a redundant second appearance of more or less the same sentence at one point in the new INSERT documentation -- I missed this during the recent overhaul of the 9.5+ INSERT documentation. Attached is a trivial patch that fixes this issue. -- Peter Geoghegan diff --git a/doc/src/sgml/ref/

Re: [HACKERS] jsonb_delete not documented

2015-12-06 Thread Tom Lane
Peter Eisentraut writes: > The new function jsonb_delete does not appear to be documented. Is that > intentional? > The only thing that's documented is the #- operator for > jsonb_delete_path. But jsonb_delete(jsonb, text) and > jsonb_delete(jsonb, int) are not documented. (Those don't have an

Re: [HACKERS] Logical replication and multimaster

2015-12-06 Thread Craig Ringer
On 7 December 2015 at 01:39, Konstantin Knizhnik wrote: > > I have integrated pglogical_output in multimaster > Excellent. I just pushed a change to pglogical_output that exposes the row contents (and the rest of the reorder change buffer contents) to hooks that want it, by the way. > using b

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

2015-12-06 Thread Noah Misch
On Wed, Dec 02, 2015 at 06:59:09PM -0300, Alvaro Herrera wrote: > It seemed better to me to have the import list be empty, i.e. "use > TestLib ()" and then qualify the routine names inside PostgresNode, > instead of having to list the names of the routines to import, so I > pushed it that way after

Re: [HACKERS] pglogical_output - a general purpose logical decoding output plugin

2015-12-06 Thread Craig Ringer
On 2 December 2015 at 18:38, Petr Jelinek wrote: > First, I wonder if it would be useful to mention somewhere, even if it's > only here in the mailing list how can the protocol be extended in > non-breaking way in future for transaction streaming if we ever get that. Good point. I'll address t

Re: [HACKERS] Re: Reusing abbreviated keys during second pass of ordered [set] aggregates

2015-12-06 Thread Andreas Karlsson
Hi, I have reviewed this patch and it still applies to master, compiles and passes the test suite. I like the goal of the patch, making use of the already existing abbreviation machinery in more cases is something we should do and the patch itself looks clean. I can also confirm the roughl

Re: [HACKERS] Logical replication and multimaster

2015-12-06 Thread Craig Ringer
> There are definitely two clear places where additional help would be > useful and welcome right now. > Here's a shortlist of replication-related open items I put together earlier. These are all independent things it'd be helpful to have when working with logical replication in PostgreSQL. There

Re: [HACKERS] Re: Reusing abbreviated keys during second pass of ordered [set] aggregates

2015-12-06 Thread Peter Geoghegan
On Sun, Dec 6, 2015 at 7:14 PM, Andreas Karlsson wrote: > I can also confirm the roughly 25% speedup in the best case (numerics which > are all distinct) with no measurable slowdown in the worst case. > > Given this speedup and the small size of the patch I think we should apply > it. I will set t

Re: [HACKERS] jsonb_delete not documented

2015-12-06 Thread Peter Eisentraut
On 12/6/15 9:51 PM, Tom Lane wrote: > Peter Eisentraut writes: >> The new function jsonb_delete does not appear to be documented. Is that >> intentional? > >> The only thing that's documented is the #- operator for >> jsonb_delete_path. But jsonb_delete(jsonb, text) and >> jsonb_delete(jsonb, i

Re: [HACKERS] jsonb_delete not documented

2015-12-06 Thread Tom Lane
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 overloaded function names. > It's kind of odd that these are the

Re: [HACKERS] Foreign join pushdown vs EvalPlanQual

2015-12-06 Thread Etsuro Fujita
On 2015/12/05 5:15, Robert Haas wrote: On Tue, Dec 1, 2015 at 10:20 PM, Etsuro Fujita wrote: One thing I can think of is that we can keep both the structure of a ForeignPath node and the API of create_foreignscan_path as-is. The latter is a good thing for FDW authors. And IIUC the patch you p

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

2015-12-06 Thread Michael Paquier
On Mon, Dec 7, 2015 at 12:06 PM, Noah Misch wrote: > On Wed, Dec 02, 2015 at 06:59:09PM -0300, Alvaro Herrera wrote: >> --- a/src/bin/pg_basebackup/t/010_pg_basebackup.pl >> +++ b/src/bin/pg_basebackup/t/010_pg_basebackup.pl > >> -like($recovery_conf, qr/^standby_mode = 'on[']$/m, 'recovery.conf s

Re: [HACKERS] Making tab-complete.c easier to maintain

2015-12-06 Thread Michael Paquier
On Thu, Nov 26, 2015 at 2:45 PM, Kyotaro HORIGUCHI wrote: > What do you think about this solution? This patch fails to compile on OSX: Undefined symbols for architecture x86_64: "_ExceptionalCondition", referenced from: _pg_regexec in regexec.o _cfind in regexec.o _find in r

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

2015-12-06 Thread Amit Langote
On 2015/12/07 2:52, Andreas Seltenreich wrote: > Hi, > > 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 subquery. The shortest of the > failing queries are be

Re: [HACKERS] Making tab-complete.c easier to maintain

2015-12-06 Thread Michael Paquier
On Tue, Nov 17, 2015 at 12:19 AM, Alvaro Herrera wrote: > Thomas Munro wrote: >> New version attached, merging recent changes. > > I wonder about the TailMatches and Matches macros --- wouldn't it be > better to have a single one, renaming TailMatches to Matches and > replacing the current Matches

Re: [HACKERS] [PROPOSAL] VACUUM Progress Checker.

2015-12-06 Thread Amit Langote
Hi, On 2015/12/03 19:05, Kyotaro HORIGUCHI wrote: > At Thu, 3 Dec 2015 16:24:32 +0900, Amit Langote > wrote >> By the way, there are some non-st_progress_* fields that I was talking >> about in my previous message. For example, st_activity_flag (which I have >> suggested to rename to st_command