Re: [HACKERS] Foreign Join pushdowns not working properly for outer joins

2017-03-05 Thread David Rowley
On 6 March 2017 at 18:51, Etsuro Fujita wrote: > On 2017/03/06 11:05, David Rowley wrote: >> The attached patch, based on 9.6, fixes the problem by properly >> processing the foreign server options in >> postgresGetForeignJoinPaths(). > > I think the fix would work

Re: [HACKERS] Partitioned tables and relfilenode

2017-03-05 Thread Amit Langote
On 2017/03/06 16:49, Ashutosh Bapat wrote: > On Mon, Mar 6, 2017 at 12:48 PM, Amit Langote wrote: >> On 2017/03/06 15:41, Michael Paquier wrote: >>> This comment is not completely correct. Children can be temp tables, >>> they just cannot be temp tables of other backends. It seems to me that >>>

Re: [HACKERS] Partitioned tables and relfilenode

2017-03-05 Thread Ashutosh Bapat
On Mon, Mar 6, 2017 at 12:48 PM, Amit Langote wrote: > Thanks for the review. > > On 2017/03/06 15:41, Michael Paquier wrote: >> On Fri, Mar 3, 2017 at 10:02 AM, Amit Langote >> wrote: >>> Thanks. I noticed that 'and' is duplicated

[HACKERS] [GSoC] Self introduction and question to mentors

2017-03-05 Thread Кирилл Бороздин
Hello! My name is Kirill Borozdin. I am a student of Ural Federal University from Yekaterinburg, Russia. I was trying to find some interesting algorithmic problem for GSoC and finally ran into PostgreSQL and "Sorting algorithms benchmark and implementation" task. This problem looks both

Re: [HACKERS] Partitioned tables and relfilenode

2017-03-05 Thread Amit Langote
Thanks for the review. On 2017/03/06 15:41, Michael Paquier wrote: > On Fri, Mar 3, 2017 at 10:02 AM, Amit Langote > wrote: >> Thanks. I noticed that 'and' is duplicated in a line added by the commit >> to analyze.sgml. Attached 0001 fixes that. 0002 and 0003

Re: [HACKERS] [BUG FIX] Removing NamedLWLockTrancheArray

2017-03-05 Thread Kyotaro HORIGUCHI
At Mon, 06 Mar 2017 15:44:52 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI wrote in <20170306.154452.254472341.horiguchi.kyot...@lab.ntt.co.jp> > Hello, > > At Sat, 4 Mar 2017 10:07:50 +0530, Amit Kapila > wrote in

Re: [HACKERS] ANALYZE command progress checker

2017-03-05 Thread Andres Freund
On 2017-03-03 15:33:15 -0500, David Steele wrote: > On 3/1/17 1:25 PM, Andres Freund wrote: > > On 2017-03-01 10:20:41 -0800, David Fetter wrote: > >> On Wed, Mar 01, 2017 at 09:45:40AM -0500, Peter Eisentraut wrote: > >>> On 2/28/17 04:24, vinayak wrote: > The view provides the information

Re: [HACKERS] Performance degradation in TPC-H Q18

2017-03-05 Thread Kuntal Ghosh
On Sat, Mar 4, 2017 at 11:09 AM, Robert Haas wrote: > On Sat, Mar 4, 2017 at 5:56 AM, Andres Freund wrote: >> attached is a patch to address this problem, and the one reported by >> Dilip. I ran a lot of TPC-H and other benchmarks, and so far this >>

Re: [HACKERS] ANALYZE command progress checker

2017-03-05 Thread Michael Paquier
On Sat, Mar 4, 2017 at 5:33 AM, David Steele wrote: > I think the idea of a general progress view is very valuable and there > are a ton of operations it could be used for: full table scans, index > rebuilds, vacuum, copy, etc. > > However, I feel that this proposal is not

Re: [HACKERS] [BUG FIX] Removing NamedLWLockTrancheArray

2017-03-05 Thread Kyotaro HORIGUCHI
Hello, At Sat, 4 Mar 2017 10:07:50 +0530, Amit Kapila wrote in > On Fri, Mar 3, 2017 at 3:49 PM, Kyotaro HORIGUCHI > wrote: > >> You can read about usage of LWLocks in

Re: [HACKERS] Partitioned tables and relfilenode

2017-03-05 Thread Michael Paquier
On Fri, Mar 3, 2017 at 10:02 AM, Amit Langote wrote: > Thanks. I noticed that 'and' is duplicated in a line added by the commit > to analyze.sgml. Attached 0001 fixes that. 0002 and 0003 same as the > last version. /* -* If all the children were temp

[HACKERS] TPC-H Q20 from 1 hour to 19 hours!

2017-03-05 Thread Rafia Sabih
Hello all, This is to bring to notice a peculiar instance I found recently while running TPC-H benchmark queries. Q20 of the benchmark took 19 hours to complete when run on a machine with 512 GB RAM and 32 cores with following parameter settings on the commit id -

Re: [HACKERS] Foreign Join pushdowns not working properly for outer joins

2017-03-05 Thread Etsuro Fujita
On 2017/03/06 11:05, David Rowley wrote: I've been asked to investigate a case of a foreign join not occurring on the foreign server as would have been expected. The attached patch, based on 9.6, fixes the problem by properly processing the foreign server options in

Re: [HACKERS] dropping partitioned tables without CASCADE

2017-03-05 Thread Amit Langote
On 2017/03/06 14:25, Simon Riggs wrote: > On 6 March 2017 at 04:00, Ashutosh Bapat wrote: >> Thinking about how to display partition which are further partitioned, >> there are two options. Assume a partitioned table t1 with partitions >> t1p1, which is further partitioned and t1p2. One could

Re: [HACKERS] dropping partitioned tables without CASCADE

2017-03-05 Thread Ashutosh Bapat
On Mon, Mar 6, 2017 at 11:05 AM, Simon Riggs wrote: > On 6 March 2017 at 05:29, Ashutosh Bapat > wrote: > >> Just to confirm, you want the output to look like this \d+ t1 Table "public.t1"

Re: [HACKERS] Parallel bitmap heap scan

2017-03-05 Thread Dilip Kumar
On Thu, Mar 2, 2017 at 6:52 PM, Robert Haas wrote: > 0002 wasn't quite careful enough about the placement of #ifdef > USE_PREFETCH, but otherwise looks OK. Committed after changing that > and getting rid of the local variable prefetch_iterator, which seemed > to be adding

Re: [HACKERS] dropping partitioned tables without CASCADE

2017-03-05 Thread Simon Riggs
On 6 March 2017 at 05:29, Ashutosh Bapat wrote: > Just to confirm, you want the output to look like this >>> \d+ t1 >>> Table "public.t1" >>> Column | Type | Collation | Nullable | Default | Storage | Stats >>> target |

Re: [HACKERS] dropping partitioned tables without CASCADE

2017-03-05 Thread Ashutosh Bapat
On Mon, Mar 6, 2017 at 10:55 AM, Simon Riggs wrote: > On 6 March 2017 at 04:00, Ashutosh Bapat > wrote: >> On Mon, Mar 6, 2017 at 8:35 AM, Simon Riggs wrote: >>> On 6 March 2017 at 00:51, Amit Langote

Re: [HACKERS] dropping partitioned tables without CASCADE

2017-03-05 Thread Simon Riggs
On 6 March 2017 at 04:00, Ashutosh Bapat wrote: > On Mon, Mar 6, 2017 at 8:35 AM, Simon Riggs wrote: >> On 6 March 2017 at 00:51, Amit Langote wrote: >>> On 2017/03/05 16:20, Simon Riggs wrote: I notice

Re: [HACKERS] Parallel seq. plan is not coming against inheritance or partition table

2017-03-05 Thread Ashutosh Sharma
> > Right, but OTOH, if we assign parallel workers by default, then it is > quite possible that it would result in much worse plans. Consider a > case where partition hierarchy has 1000 partitions and only one of > them is big enough to allow parallel workers. Now in this case, with > your

Re: [HACKERS] Print correct startup cost for the group aggregate.

2017-03-05 Thread Ashutosh Bapat
On Sat, Mar 4, 2017 at 2:50 PM, Robert Haas wrote: > On Thu, Mar 2, 2017 at 6:48 PM, Ashutosh Bapat > wrote: >> On Thu, Mar 2, 2017 at 6:06 PM, Rushabh Lathia >> wrote: >>> While reading through the cost_agg() I

Re: [HACKERS] dropping partitioned tables without CASCADE

2017-03-05 Thread Ashutosh Bapat
On Mon, Mar 6, 2017 at 8:35 AM, Simon Riggs wrote: > On 6 March 2017 at 00:51, Amit Langote wrote: >> On 2017/03/05 16:20, Simon Riggs wrote: >>> I notice also that >>> \d+ >>> does not show which partitions have subpartitions. >> >> Do

Re: [HACKERS] Report the number of skipped frozen pages by manual VACUUM

2017-03-05 Thread Yugo Nagata
Hi, I think this is good since the information is useful and it is a little change. One thing I'm bothered is that even when the number of frozen page is one, it will say "1 frozen pages". In other messages, when the number of page is one, the word "page" rather than "pages" is used by using

Re: [HACKERS] dropping partitioned tables without CASCADE

2017-03-05 Thread Simon Riggs
On 6 March 2017 at 00:51, Amit Langote wrote: > On 2017/03/05 16:20, Simon Riggs wrote: >> I notice also that >> \d+ >> does not show which partitions have subpartitions. > > Do you mean showing just whether a partition is itself partitioned or > showing its

Re: [WIP] RE: [HACKERS] DECLARE STATEMENT setting up a connection in ECPG

2017-03-05 Thread Okano, Naoki
Hi I tried applying your patches. But it failed... The error messages are as below. $ git apply ../004_declareStmt_test_v4.patch error: patch failed: src/interfaces/ecpg/test/expected/pgtypeslib-nan_test.c:82 error: src/interfaces/ecpg/test/expected/pgtypeslib-nan_test.c: patch does not apply

Re: [HACKERS] SCRAM authentication, take three

2017-03-05 Thread Michael Paquier
On Mon, Mar 6, 2017 at 11:50 AM, Michael Paquier wrote: > On Fri, Mar 3, 2017 at 2:43 PM, Michael Paquier > wrote: >> I am attaching 0009 and 0010 that address those problems (pushed on >> github as well) that can be applied on top of the

Re: [HACKERS] SCRAM authentication, take three

2017-03-05 Thread Michael Paquier
On Fri, Mar 3, 2017 at 2:43 PM, Michael Paquier wrote: > I am attaching 0009 and 0010 that address those problems (pushed on > github as well) that can be applied on top of the latest set. While doing more tests with my module able to do SASLprep, I have noticed that

Re: [HACKERS] Parallel seq. plan is not coming against inheritance or partition table

2017-03-05 Thread Amit Kapila
On Sat, Mar 4, 2017 at 9:52 PM, Ashutosh Sharma wrote: > Hi All, > > From following git commit onwards, parallel seq scan is never getting > selected for inheritance or partitioned tables. > > > commit 51ee6f3160d2e1515ed6197594bda67eb99dc2cc > Author: Robert Haas

Re: [HACKERS] Statement-level rollback

2017-03-05 Thread Tsunakawa, Takayuki
From: David Steele [mailto:da...@pgmasters.net] > Whatever the merits of this patch, it's a pretty major behavioral change > with a large potential impact. Even if what is enumerated here is the full > list (which I doubt), it's pretty big. > > Given that this landed on March 28 with no

[HACKERS] Foreign Join pushdowns not working properly for outer joins

2017-03-05 Thread David Rowley
I've been asked to investigate a case of a foreign join not occurring on the foreign server as would have been expected. I've narrowed this down and the problem seems to only occur with outer type joins. The problem can be reproduced by the attached test_case.sql Upon investigation I've

Re: [HACKERS] Re: new high availability feature for the system with both asynchronous and synchronous replication

2017-03-05 Thread Higuchi, Daisuke
From: Robert Haas [mailto:robertmh...@gmail.com] >> This patch enables walsender for async to wait until walsender for sync >> confirm >> WAL is flashed to Disk. This feature is activated when GUC parameter >> "async_walsender_delay" is set on. > So this new option makes asynchronous replication

Re: [HACKERS] dropping partitioned tables without CASCADE

2017-03-05 Thread Amit Langote
On 2017/03/05 16:20, Simon Riggs wrote: > I notice also that > \d+ > does not show which partitions have subpartitions. Do you mean showing just whether a partition is itself partitioned or showing its partitions and so on (because those partitions may themselves be partitioned)? Maybe, we

Re: [HACKERS] Cost model for parallel CREATE INDEX

2017-03-05 Thread Peter Geoghegan
On Sat, Mar 4, 2017 at 2:15 PM, Peter Geoghegan wrote: > So, I agree with Robert that we should actually use heap size for the > main, initial determination of # of workers to use, but we still need > to estimate the size of the final index [1], to let the cost model cap > the

Re: [HACKERS] REINDEX CONCURRENTLY 2.0

2017-03-05 Thread Andreas Karlsson
On 03/05/2017 07:56 PM, Robert Haas wrote: On Sat, Mar 4, 2017 at 12:34 PM, Andres Freund wrote: I agree that'd it be nicer not to have this, but not having the feature at all is a lot worse than this wart. I, again, give that a firm "maybe". If the warts end up

Re: [HACKERS] REINDEX CONCURRENTLY 2.0

2017-03-05 Thread Peter Geoghegan
On Sat, Mar 4, 2017 at 9:34 AM, Andres Freund wrote: > On March 4, 2017 1:16:56 AM PST, Robert Haas wrote: >>Maybe. But it looks to me like this patch is going to have >>considerably more than its share of user-visible warts, and I'm not >>very excited

Re: [HACKERS] REINDEX CONCURRENTLY 2.0

2017-03-05 Thread Robert Haas
On Sat, Mar 4, 2017 at 12:34 PM, Andres Freund wrote: > I agree that'd it be nicer not to have this, but not having the feature at > all is a lot worse than this wart. I, again, give that a firm "maybe". If the warts end up annoying 1% of the users who try to use this

Re: [HACKERS] Measuring replay lag

2017-03-05 Thread Craig Ringer
On 5 March 2017 at 15:31, Simon Riggs wrote: > On 1 March 2017 at 10:47, Thomas Munro wrote: >> This seems to be problematic. Logical peers report LSN changes for >> all three operations (write, flush, commit) only on commit. I suppose >>

Re: [HACKERS] Other formats in pset like markdown, rst, mediawiki

2017-03-05 Thread Jan Michálek
2017-03-05 13:39 GMT+01:00 Pavel Stehule : > > > 2017-03-05 13:22 GMT+01:00 Pavel Stehule : > >> >> >> 2017-03-05 13:08 GMT+01:00 Jan Michálek : >> >>> It is question if it is really new format, because formating is the

Re: [HACKERS] Other formats in pset like markdown, rst, mediawiki

2017-03-05 Thread Pavel Stehule
2017-03-05 13:22 GMT+01:00 Pavel Stehule : > > > 2017-03-05 13:08 GMT+01:00 Jan Michálek : > >> It is question if it is really new format, because formating is the same >> as aligned/wrapped format, changed is only style of lines. >> > > Please,

Re: [HACKERS] Other formats in pset like markdown, rst, mediawiki

2017-03-05 Thread Pavel Stehule
2017-03-05 13:08 GMT+01:00 Jan Michálek : > It is question if it is really new format, because formating is the same > as aligned/wrapped format, changed is only style of lines. > Please, don't do top posting https://en.wikipedia.org/wiki/Posting_style#Top-posting >

Re: [HACKERS] Other formats in pset like markdown, rst, mediawiki

2017-03-05 Thread Jan Michálek
It is question if it is really new format, because formating is the same as aligned/wrapped format, changed is only style of lines. 2017-03-05 12:36 GMT+01:00 Pavel Stehule : > > > 2017-03-05 11:40 GMT+01:00 Jan Michálek : > >> I know, but, both

Re: [HACKERS] Other formats in pset like markdown, rst, mediawiki

2017-03-05 Thread Pavel Stehule
2017-03-05 11:40 GMT+01:00 Jan Michálek : > I know, but, both new linestyles are created literally by cloning ascii > linestyle and few lines in print_aligned_text. Both works with "aligned" > and "wrapped" format. In rst is wrapped format useful, in my opinion, in >

Re: [HACKERS] Other formats in pset like markdown, rst, mediawiki

2017-03-05 Thread Jan Michálek
I know, but, both new linestyles are created literally by cloning ascii linestyle and few lines in print_aligned_text. Both works with "aligned" and "wrapped" format. In rst is wrapped format useful, in my opinion, in markdown i can`t find how I can get newline in record (maybe it is not posiible

Re: [HACKERS] Cleanup: avoid direct use of ip_posid/ip_blkid

2017-03-05 Thread Pavan Deolasee
On Thu, Mar 2, 2017 at 9:55 PM, Peter Eisentraut < peter.eisentr...@2ndquadrant.com> wrote: > On 2/22/17 08:38, Pavan Deolasee wrote: > > One reason why these macros are not always used is because they > > typically do assert-validation to ensure ip_posid has a valid value. > > There are a few

Re: [HACKERS] dropping partitioned tables without CASCADE

2017-03-05 Thread Simon Riggs
On 5 March 2017 at 07:59, Ashutosh Bapat wrote: >> >> I used a slight modification of the case mentioned on the docs. I >> confirm this fails repeatably for me on current HEAD. >> >> CREATE TABLE cities ( >> city_id bigserial not null, >> name

Re: [HACKERS] patch: function xmltable

2017-03-05 Thread Pavel Stehule
Hi I used your idea about special columns when COLUMNS are not explicitly defined. All lines that you are dislike removed. Now, almost all code, related to this behave, is in next few lines. + /* +* Use implicit column when it is necessary. The COLUMNS clause is optional +* on Oracle

Re: [HACKERS] dropping partitioned tables without CASCADE

2017-03-05 Thread Ashutosh Bapat
> > I used a slight modification of the case mentioned on the docs. I > confirm this fails repeatably for me on current HEAD. > > CREATE TABLE cities ( > city_id bigserial not null, > name text not null, > population bigint > ) PARTITION BY LIST (left(lower(name),