Re: [HACKERS] contrib modules and relkind check

2017-03-08 Thread Amit Langote
On 2017/03/08 16:47, Michael Paquier wrote: > On Tue, Mar 7, 2017 at 4:15 PM, Amit Langote wrote: > +++ b/contrib/pg_visibility/expected/pg_visibility.out > @@ -0,0 +1,85 @@ > +CREATE EXTENSION pg_visibility; > +-- > +-- check that using the module's functions with unsupported relations will > fai

[HACKERS] Removing #include "postgres.h" from a couple of headers

2017-03-08 Thread Thomas Munro
Hi, Over in another thread it was pointed out that a patch I submitted broke a project rule by including "postgres.h" in a header. Here is a patch to remove it from dsa.h where I made the same mistake, and also a case I found in bufmask.h by grepping. There are also instances in regcustom.h and

Re: [HACKERS] Removing #include "postgres.h" from a couple of headers

2017-03-08 Thread Michael Paquier
On Wed, Mar 8, 2017 at 5:55 PM, Thomas Munro wrote: > Over in another thread it was pointed out that a patch I submitted > broke a project rule by including "postgres.h" in a header. Here is a > patch to remove it from dsa.h where I made the same mistake, and also > a case I found in bufmask.h by

Re: [HACKERS] WAL Consistency checking for hash indexes

2017-03-08 Thread Kuntal Ghosh
On Fri, Mar 3, 2017 at 9:44 AM, Amit Kapila wrote: > On Tue, Feb 28, 2017 at 11:06 AM, Kuntal Ghosh > wrote: >> Hello everyone, >> >> I've attached a patch which implements WAL consistency checking for >> hash indexes. This feature is going to be useful for developing and >> testing of WAL loggin

Re: [HACKERS] PATCH: psql show index with type info

2017-03-08 Thread Ashutosh Bapat
On Mon, Mar 6, 2017 at 7:54 PM, Amos Bird wrote: > > Hello Stephen, > > Well, the prefix is used to differentiate other \d commands, like > this, > > amos=# \ditv > List of relations > Schema |Name| Type | Owner | Table > +---

Re: [HACKERS] Adding the optional clause 'AS' in CREATE TRIGGER

2017-03-08 Thread Okano, Naoki
Peter Eisentraut wrote: > I have a feeling that this was proposed a few times in the ancient past > but did not go through because of locking issues. I can't find any > emails about it through. Does anyone remember? Have you thought about > locking issues? Is this e-mail you are finding? https:/

Re: [HACKERS] dropping partitioned tables without CASCADE

2017-03-08 Thread Ashutosh Bapat
> > About the other statement you changed, I just realized that we should > perhaps do one more thing. Show the Number of partitions, even if it's 0. > In case of inheritance, the parent table stands on its own when there are > no child tables, but a partitioned table doesn't in the same sense.

Re: [HACKERS] Logical replication existing data copy

2017-03-08 Thread Petr Jelinek
On 07/03/17 23:30, Erik Rijkers wrote: > On 2017-03-06 11:27, Petr Jelinek wrote: > >> 0001-Reserve-global-xmin-for-create-slot-snasphot-export.patch + >> 0002-Don-t-use-on-disk-snapshots-for-snapshot-export-in-l.patch+ >> 0003-Prevent-snapshot-builder-xmin-from-going-backwards.patch + >> 0004-Fi

Re: [HACKERS] Supporting huge pages on Windows

2017-03-08 Thread Ashutosh Sharma
Hi, I tried to test v8 version of patch. Firstly, I was able to start the postgresql server process with 'huge_pages' set to on. I had to follow the instructions given in MSDN[1] to enable lock pages in memory option and also had to start the postgresql server process as admin user. test=# show

Re: [HACKERS] dropping partitioned tables without CASCADE

2017-03-08 Thread Amit Langote
On 2017/03/08 18:27, Ashutosh Bapat wrote: >> >> About the other statement you changed, I just realized that we should >> perhaps do one more thing. Show the Number of partitions, even if it's 0. >> In case of inheritance, the parent table stands on its own when there are >> no child tables, but

Re: [HACKERS] Supporting huge pages on Windows

2017-03-08 Thread Thomas Munro
On Thu, Feb 23, 2017 at 8:29 PM, Tsunakawa, Takayuki wrote: > [win_large_pages_v8.patch] +Huge pages are known as large pages on Windows. To use them, you need to +assign the user right Lock Pages in Memory to the Windows user account +that runs PostgreSQL. +Huge

Re: [HACKERS] Hash support for grouping sets

2017-03-08 Thread Andrew Gierth
> "Mark" == Mark Dilger writes: Mark> On linux/gcc the patch generates a warning in nodeAgg.c that is Mark> fairly easy to fix. Using -Werror to make catching the error Mark> easier, I get: what gcc version is this exactly? -- Andrew (irc:RhodiumToad) -- Sent via pgsql-hackers maili

Re: [HACKERS] Partitioned tables and relfilenode

2017-03-08 Thread Amit Langote
On 2017/03/08 2:27, Robert Haas wrote: > On Tue, Mar 7, 2017 at 12:11 AM, Ashutosh Bapat > wrote: >> I see that all the changes by Amit and myself to what was earlier 0003 >> patch are now part of 0002 patch. The patch looks ready for committer. > > Reviewing 0002: Thanks for the review. > > T

Re: [HACKERS] wait events for disk I/O

2017-03-08 Thread Rushabh Lathia
On Wed, Mar 8, 2017 at 8:23 AM, Robert Haas wrote: > On Tue, Mar 7, 2017 at 9:32 PM, Amit Kapila > wrote: > > On Tue, Mar 7, 2017 at 9:16 PM, Robert Haas > wrote: > >> On Mon, Mar 6, 2017 at 9:09 PM, Amit Kapila > wrote: > >>> Sure, if you think both Writes and Reads at OS level can have some

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

2017-03-08 Thread Amit Kapila
On Wed, Mar 8, 2017 at 8:28 AM, Robert Haas wrote: > On Tue, Mar 7, 2017 at 9:24 PM, Amit Kapila wrote: > >> I think it can give us benefit in >> such cases as well (especially when we have to discard rows based heap >> rows). Now, consider it from another viewpoint, what if there are >> enough

Re: [HACKERS] Cannot shutdown subscriber after DROP SUBSCRIPTION

2017-03-08 Thread Masahiko Sawada
On Wed, Feb 8, 2017 at 12:04 AM, Fujii Masao wrote: > On Tue, Feb 7, 2017 at 2:13 AM, Petr Jelinek > wrote: >> On 06/02/17 17:33, Fujii Masao wrote: >>> On Sun, Feb 5, 2017 at 5:11 AM, Petr Jelinek >>> wrote: On 03/02/17 19:38, Fujii Masao wrote: > On Sat, Feb 4, 2017 at 12:49 AM, Fujii

Re: [HACKERS] Write Ahead Logging for Hash Indexes

2017-03-08 Thread Amit Kapila
On Wed, Mar 8, 2017 at 5:11 AM, Robert Haas wrote: > > Here are some initial review thoughts on 0003 based on a first read-through. > > > +/* > + * we need to release and reacquire the lock on overflow buffer to ensure > + * that standby shouldn't see an intermediate state of it. > +

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

2017-03-08 Thread David Rowley
On 7 March 2017 at 01:22, Ashutosh Bapat wrote: > On Mon, Mar 6, 2017 at 1:29 PM, David Rowley > wrote: >> On 6 March 2017 at 18:51, Etsuro Fujita wrote: >>> On 2017/03/06 11:05, David Rowley wrote: >> It seems like a much better idea to keep the server option processing >> in one location, whic

Re: [HACKERS] wait events for disk I/O

2017-03-08 Thread Rajkumar Raghuwanshi
On Wed, Mar 8, 2017 at 4:50 PM, Rushabh Lathia wrote: > I am attaching another version of the patch, as I found stupid mistake > in the earlier version of patch, where I missed to initialize initial > value to > WaitEventIO enum. Also earlier version was not getting cleanly apply on > the curren

Re: [HACKERS] Parallel bitmap heap scan

2017-03-08 Thread Robert Haas
On Wed, Mar 8, 2017 at 1:49 AM, Dilip Kumar wrote: > On Tue, Mar 7, 2017 at 10:10 PM, Dilip Kumar wrote: >>> It's not about speed. It's about not forgetting to prefetch. Suppose >>> that worker 1 becomes the prefetch worker but then doesn't return to >>> the Bitmap Heap Scan node for a long tim

Re: [HACKERS] Skip all-visible pages during second HeapScan of CIC

2017-03-08 Thread Stephen Frost
* Pavan Deolasee (pavan.deola...@gmail.com) wrote: > On Wed, Mar 8, 2017 at 7:33 AM, Robert Haas wrote: > > > On Tue, Mar 7, 2017 at 4:26 PM, Stephen Frost wrote: > > > Right, that's what I thought he was getting at and my general thinking > > > was that we would need a way to discover if a CIC

Re: [HACKERS] Removing #include "postgres.h" from a couple of headers

2017-03-08 Thread Robert Haas
On Wed, Mar 8, 2017 at 3:55 AM, Thomas Munro wrote: > Over in another thread it was pointed out that a patch I submitted > broke a project rule by including "postgres.h" in a header. Here is a > patch to remove it from dsa.h where I made the same mistake, and also > a case I found in bufmask.h by

Re: [HACKERS] Adding the optional clause 'AS' in CREATE TRIGGER

2017-03-08 Thread Peter Eisentraut
On 3/8/17 04:12, Okano, Naoki wrote: > Peter Eisentraut wrote: >> I have a feeling that this was proposed a few times in the ancient past >> but did not go through because of locking issues. I can't find any >> emails about it through. Does anyone remember? Have you thought about >> locking issu

Re: [HACKERS] Skip all-visible pages during second HeapScan of CIC

2017-03-08 Thread Stephen Frost
* Andres Freund (and...@anarazel.de) wrote: > On 2017-03-07 21:38:40 -0500, Robert Haas wrote: > > > I wonder however, if careful snapshot managment couldn't solve this as > > > well. I have *not* thought a lot about this, but afaics we can easily > > > prevent all-visible from being set in cases

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

2017-03-08 Thread Robert Haas
On Wed, Mar 8, 2017 at 7:04 AM, Amit Kapila wrote: > On Wed, Mar 8, 2017 at 8:28 AM, Robert Haas wrote: >> On Tue, Mar 7, 2017 at 9:24 PM, Amit Kapila wrote: >>> I think it can give us benefit in >>> such cases as well (especially when we have to discard rows based heap >>> rows). Now, consider

Re: [HACKERS] PATCH: psql show index with type info

2017-03-08 Thread Stephen Frost
Ashutosh, * Ashutosh Bapat (ashutosh.ba...@enterprisedb.com) wrote: > On Mon, Mar 6, 2017 at 7:54 PM, Amos Bird wrote: > > Well, the prefix is used to differentiate other \d commands, like > > this, > > > > amos=# \ditv > > List of relations > > Schema |Name

Re: [HACKERS] [COMMITTERS] pgsql: Use asynchronous connect API in libpqwalreceiver

2017-03-08 Thread Peter Eisentraut
On 3/6/17 09:38, Peter Eisentraut wrote: > On 3/4/17 01:45, Petr Jelinek wrote: >> If that's the case, the attached should fix it, but I have no way of >> testing it on windows, I can only say that it still works on my machine >> so at least it hopefully does not make things worse. > > Committed t

Re: [HACKERS] Partitioned tables and relfilenode

2017-03-08 Thread Robert Haas
On Wed, Mar 8, 2017 at 5:36 AM, Amit Langote wrote: >> I don't quite understand the need for the change to set_rel_size(). >> The rte->inh case is handled before reaching the new code, and IIUC >> the !rte->inh case should never happen given the changes to >> expand_inherited_rtentry. Or am I con

Re: [HACKERS] Implementation of SASLprep for SCRAM-SHA-256

2017-03-08 Thread Robert Haas
On Tue, Mar 7, 2017 at 10:01 PM, Michael Paquier wrote: > RFC5802 (https://tools.ietf.org/html/rfc5802) regarding the > implementation of SCRAM, needs to have passwords normalized as per > RFC4013 (https://tools.ietf.org/html/rfc4013) using SASLprep, which is > actually NFKC. I have previously des

Re: [HACKERS] port of INSTALL file generation to XSLT

2017-03-08 Thread Peter Eisentraut
On 3/1/17 20:23, Magnus Hagander wrote: > On Wed, Mar 1, 2017 at 3:58 AM, Peter Eisentraut > > wrote: > > On 2/28/17 08:57, Magnus Hagander wrote: > > It appears we need pandoc 1.13 to get the good output. This won't > be > > availabl

Re: [HACKERS] Parallel bitmap heap scan

2017-03-08 Thread Dilip Kumar
On Wed, Mar 8, 2017 at 6:42 PM, Robert Haas wrote: > I don't think I understand exactly why this system might be prone to a > little bit of extra prefetching - can you explain further? Let me explain with an example, suppose there are 2 workers prefetching jointly, lets assume prefetch_target is 3

Re: [HACKERS] Removing #include "postgres.h" from a couple of headers

2017-03-08 Thread Tom Lane
Robert Haas writes: > On Wed, Mar 8, 2017 at 3:55 AM, Thomas Munro > wrote: >> There are also instances in regcustom.h and snowball's header.h -- are >> those special cases? > I will leave this question to someone wiser (or more self-assured) than I. I'm pretty sure I'm to blame for both of tho

Re: [HACKERS] Parallel bitmap heap scan

2017-03-08 Thread Robert Haas
Reviewing 0003: How about adding a regression test? bitmap_subplan_mark_shared could use castNode(), which seems like it would be better style. Maybe some other places, too. + ParallelBitmapPopulate + Waiting for the leader to populate the TidBitmap. + + If you

Re: [HACKERS] Removing #include "postgres.h" from a couple of headers

2017-03-08 Thread Tom Lane
... BTW, a bit of grepping shows that there are still significant violations of this policy with respect to header-driven inclusion of postgres_fe.h and c.h. Also, plpgsql is doing it in the unapproved fashion. Cleaning these up will take a bit more work, since we'll have to actually add #include

Re: [HACKERS] foreign partition DDL regression tests

2017-03-08 Thread Robert Haas
On Tue, Mar 7, 2017 at 11:18 PM, Ashutosh Bapat wrote: >> I agree that we could do that, but what value would it have? It just >> forces the user to spend two SQL commands doing what could otherwise >> be done in one. > > I don't think it's going to be two commands always. A user who wants > to a

Re: [HACKERS] Hash support for grouping sets

2017-03-08 Thread Mark Dilger
> On Mar 8, 2017, at 2:30 AM, Andrew Gierth wrote: > >> "Mark" == Mark Dilger writes: > > Mark> On linux/gcc the patch generates a warning in nodeAgg.c that is > Mark> fairly easy to fix. Using -Werror to make catching the error > Mark> easier, I get: > > what gcc version is this exactly

Re: [HACKERS] REINDEX CONCURRENTLY 2.0

2017-03-08 Thread Andreas Karlsson
On 03/08/2017 03:48 AM, Robert Haas wrote: On Sun, Mar 5, 2017 at 7:13 PM, Andreas Karlsson wrote: And I would argue that his feature is useful for quite many, based on my experience running a semi-large database. Index bloat happens and without REINDEX CONCURRENTLY it can be really annoying to

Re: [HACKERS] Explicit subtransactions for PL/Tcl

2017-03-08 Thread Pavel Stehule
Hi 2017-01-08 18:57 GMT+01:00 Victor Wagner : > > Collegues! > > Recently I've found out that PL/Python have very nice feature - explicit > subtransaction object, which allows to execute block of code in the > context of subtransaction. > > I've quite surprised that other PL languages, shipped wi

Re: [HACKERS] new gcc 7.0.1 warnings

2017-03-08 Thread Peter Eisentraut
On 2/18/17 02:08, Pavel Stehule wrote: > I am checking new Fedora 26, where new gcc compiler is used. > > float.c: In function ‘float4out’: > float.c:382:41: warning: ‘%.*g’ directive output may be truncated > writing between 1 and 310 bytes into a region of size 65 > [-Wformat-truncation=] >

Re: [HACKERS] patch: function xmltable

2017-03-08 Thread Alvaro Herrera
Pavel Stehule wrote: > Hi > > I used your idea about special columns when COLUMNS are not explicitly > defined. > > All lines that you are dislike removed. I just pushed XMLTABLE, after some additional changes. Please test it thoroughly and report any problems. I didn't add the change you prop

Re: [HACKERS] Hash support for grouping sets

2017-03-08 Thread Mark Dilger
> On Mar 8, 2017, at 5:47 AM, Andrew Gierth wrote: > >> "Mark" == Mark Dilger writes: > > Mark> On my MacBook, `make check-world` gives differences in the > Mark> contrib modules: > > Thanks! Latest cleaned up version of patch is attached. This fixes both the warning and the contrib test

Re: [HACKERS] patch: function xmltable

2017-03-08 Thread Pavel Stehule
2017-03-08 17:01 GMT+01:00 Alvaro Herrera : > Pavel Stehule wrote: > > Hi > > > > I used your idea about special columns when COLUMNS are not explicitly > > defined. > > > > All lines that you are dislike removed. > > I just pushed XMLTABLE, after some additional changes. Please test it > thoroug

Re: [HACKERS] new gcc 7.0.1 warnings

2017-03-08 Thread Pavel Stehule
2017-03-08 16:59 GMT+01:00 Peter Eisentraut < peter.eisentr...@2ndquadrant.com>: > On 2/18/17 02:08, Pavel Stehule wrote: > > I am checking new Fedora 26, where new gcc compiler is used. > > > > float.c: In function ‘float4out’: > > float.c:382:41: warning: ‘%.*g’ directive output may be truncated

Re: [HACKERS] CREATE/ALTER ROLE PASSWORD ('value' USING 'method')

2017-03-08 Thread Joe Conway
On 03/07/2017 08:29 PM, Tom Lane wrote: > Michael Paquier writes: >> here is a separate thread dedicated to the following extension for >> CREATE/ALTER ROLE: PASSWORD ('value' USING 'method'). > > The parentheses seem weird ... do we really need those? +1 > +If you do not plan to use pa

Re: [HACKERS] Parallel bitmap heap scan

2017-03-08 Thread Dilip Kumar
On Wed, Mar 8, 2017 at 8:28 PM, Robert Haas wrote: > How about adding a regression test? Added > > bitmap_subplan_mark_shared could use castNode(), which seems like it > would be better style. Maybe some other places, too. > > + ParallelBitmapPopulate > + Waiting for the leader t

Re: [HACKERS] foreign partition DDL regression tests

2017-03-08 Thread Robert Haas
On Tue, Feb 21, 2017 at 8:40 PM, Amit Langote wrote: > Ashutosh Bapat pointed out [0] that regression tests are missing for the > foreign partition DDL commands. Attached patch takes care of that. Committed. I didn't do anything about Ashutosh's comment that we could use ALTER FOREIGN TABLE rat

Re: [HACKERS] patch: function xmltable

2017-03-08 Thread Alvaro Herrera
Pavel Stehule wrote: > 2017-03-08 17:01 GMT+01:00 Alvaro Herrera : > > I didn't add the change you proposed here to keep COLUMNS optional; > > instead, I just made COLUMNS mandatory. I think what you propose here > > is not entirely out of the question, but you left out ruleutils.c > > support fo

Re: [HACKERS] new gcc 7.0.1 warnings

2017-03-08 Thread Alvaro Herrera
Pavel Stehule wrote: > 2017-02-18 18:35 GMT+01:00 Tom Lane : > > > Pavel Stehule writes: > > Do the warnings go away if you add some explicit guard to the precision > > variable, say like this: > > > > { > > intndig = DBL_DIG + extra_float_digits; > > > >

Re: [HACKERS] adding an immutable variant of to_date

2017-03-08 Thread Andreas Karlsson
On 03/07/2017 09:56 PM, Sven R. Kunze wrote: On 07.03.2017 03:21, Andreas Karlsson wrote: 1) I do not think we currently allow setting the locale like this anywhere, so this will introduce a new concept to PostgreSQL. And you will probably need to add support for caching per locale. Good to kn

Re: [HACKERS] Hash support for grouping sets

2017-03-08 Thread Mark Dilger
Hi Andrew, Reviewing the patch a bit more, I find it hard to understand the comment about passing -1 as a flag for finalize_aggregates. Any chance you can spend a bit more time word-smithing that code comment? @@ -1559,7 +1647,9 @@ prepare_projection_slot(AggState *aggstate, TupleTableSlot *sl

Re: [HACKERS] patch: function xmltable

2017-03-08 Thread Pavel Stehule
2017-03-08 17:32 GMT+01:00 Alvaro Herrera : > Pavel Stehule wrote: > > 2017-03-08 17:01 GMT+01:00 Alvaro Herrera : > > > > I didn't add the change you proposed here to keep COLUMNS optional; > > > instead, I just made COLUMNS mandatory. I think what you propose here > > > is not entirely out of t

Re: [HACKERS] new gcc 7.0.1 warnings

2017-03-08 Thread Pavel Stehule
2017-03-08 17:33 GMT+01:00 Alvaro Herrera : > Pavel Stehule wrote: > > 2017-02-18 18:35 GMT+01:00 Tom Lane : > > > > > Pavel Stehule writes: > > > > Do the warnings go away if you add some explicit guard to the precision > > > variable, say like this: > > > > > > { > > >

Re: [HACKERS] Cannot shutdown subscriber after DROP SUBSCRIPTION

2017-03-08 Thread Fujii Masao
On Wed, Mar 8, 2017 at 9:05 PM, Masahiko Sawada wrote: > On Wed, Feb 8, 2017 at 12:04 AM, Fujii Masao wrote: >> On Tue, Feb 7, 2017 at 2:13 AM, Petr Jelinek >> wrote: >>> On 06/02/17 17:33, Fujii Masao wrote: On Sun, Feb 5, 2017 at 5:11 AM, Petr Jelinek wrote: > On 03/02/17 19:38,

Re: [HACKERS] Patch: Write Amplification Reduction Method (WARM)

2017-03-08 Thread Alvaro Herrera
Here's a rebased set of patches. This is the same Pavan posted; I only fixed some whitespace and a trivial conflict in indexam.c, per 9b88f27cb42f. -- Álvaro Herrerahttps://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via p

Re: [HACKERS] patch: function xmltable

2017-03-08 Thread Alvaro Herrera
Pavel Stehule wrote: > 2017-03-08 17:32 GMT+01:00 Alvaro Herrera : > > > For daily work the default schema support is much more interesting. > > > > Let's see that one, then. It was part of the original submission so > > depending on how the patch we looks can still cram it in. But other > > pat

Re: [HACKERS] Parallel bitmap heap scan

2017-03-08 Thread Robert Haas
On Wed, Mar 8, 2017 at 11:20 AM, Dilip Kumar wrote: > Right, done that way This didn't compile because you bobbled some code in src/backend/nodes, but it was a trivial mistake so I fixed it. Committed with that fix and a bunch of minor cosmetic changes. -- Robert Haas EnterpriseDB: http://www.

Re: [HACKERS] Patch: Write Amplification Reduction Method (WARM)

2017-03-08 Thread Robert Haas
On Wed, Mar 8, 2017 at 12:00 PM, Alvaro Herrera wrote: > Here's a rebased set of patches. This is the same Pavan posted; I only > fixed some whitespace and a trivial conflict in indexam.c, per 9b88f27cb42f. No attachments. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise

Re: [HACKERS] Poor memory context performance in large hash joins

2017-03-08 Thread Tom Lane
Andres Freund writes: > On 2017-03-07 13:06:39 -0500, Tom Lane wrote: >> The hashjoin issue is certainly new, and the reorderbuffer issue can't >> go back further than 9.4. So my inclination is to patch back to 9.4 >> and call it good. > That works for me. If we find further cases later, we can

Re: [HACKERS] Parallel bitmap heap scan

2017-03-08 Thread Jeff Janes
On Wed, Mar 8, 2017 at 9:08 AM, Robert Haas wrote: > On Wed, Mar 8, 2017 at 11:20 AM, Dilip Kumar > wrote: > > Right, done that way > > This didn't compile because you bobbled some code in > src/backend/nodes, but it was a trivial mistake so I fixed it. > > Committed with that fix and a bunch of

Re: [HACKERS] Hash support for grouping sets

2017-03-08 Thread Andrew Gierth
> "Mark" == Mark Dilger writes: Mark> Hi Andrew, Mark> Reviewing the patch a bit more, I find it hard to understand the Mark> comment about passing -1 as a flag for finalize_aggregates. Any Mark> chance you can spend a bit more time word-smithing that code Mark> comment? Sure. How do

Re: [HACKERS] Example Custom Scan Provider Implementation?

2017-03-08 Thread Eric Ridge
On Tue, Mar 7, 2017 at 6:39 PM Amit Langote wrote: > > Here you go: https://github.com/kaigai/ctidscan Thanks for the link, Amit! I think that'll get me bootstrapped! This was proposed originally [1] to go into contrib/, but that didn't > happen somehow. > Too bad. :( eric

Re: [HACKERS] Parallel bitmap heap scan

2017-03-08 Thread Tom Lane
Jeff Janes writes: > I'm getting some compiler warnings in gcc version 4.4.7 20120313 (Red Hat > 4.4.7-17) (GCC): Me too. Fix pushed. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://w

[HACKERS] updating parallel.sgml

2017-03-08 Thread Robert Haas
Here's a patch which updates parallel.sgml for the new parallel scan types which have recently been committed, and also expands the explanation of parallel joins slightly. I hope everyone will find this useful in understanding what new capabilities we now have, and what remains to be done in the f

Re: [HACKERS] Parallel bitmap heap scan

2017-03-08 Thread Robert Haas
On Wed, Mar 8, 2017 at 12:45 PM, Tom Lane wrote: > Jeff Janes writes: >> I'm getting some compiler warnings in gcc version 4.4.7 20120313 (Red Hat >> 4.4.7-17) (GCC): > > Me too. Fix pushed. Thanks. Sorry for the hassle; my compiler isn't as picky about this as I would like, and apparently Dil

Re: [HACKERS] [GSoC] Push-based query executor discussion

2017-03-08 Thread Robert Haas
On Mon, Mar 6, 2017 at 11:20 AM, Arseny Sher wrote: > I would like to work on push-based executor [1] during GSoC, so I'm > writing to introduce myself and start the discussion of the project. I > think I should mention beforehand that the subject is my master's > thesis topic, and I have already

Re: [HACKERS] Parallel bitmap heap scan

2017-03-08 Thread Tom Lane
Robert Haas writes: > On Wed, Mar 8, 2017 at 12:45 PM, Tom Lane wrote: >> Jeff Janes writes: >>> I'm getting some compiler warnings in gcc version 4.4.7 20120313 (Red Hat >>> 4.4.7-17) (GCC): >> Me too. Fix pushed. > Thanks. Sorry for the hassle; my compiler isn't as picky about this > as I

Re: [HACKERS] Need a builtin way to run all tests faster manner

2017-03-08 Thread Robert Haas
On Tue, Mar 7, 2017 at 11:23 PM, Andres Freund wrote: > Personally that's not addressing my main concern, which is that the > latency of getting done with some patch/topic takes a long while. If I > have to wait for the buildfarm to check some preliminary patch, I still > have to afterwards work o

Re: [HACKERS] Hash support for grouping sets

2017-03-08 Thread Mark Dilger
> On Mar 8, 2017, at 9:40 AM, Andrew Gierth wrote: > >> "Mark" == Mark Dilger writes: > > Mark> Hi Andrew, > > Mark> Reviewing the patch a bit more, I find it hard to understand the > Mark> comment about passing -1 as a flag for finalize_aggregates. Any > Mark> chance you can spend a bit

Re: [HACKERS] Parallel bitmap heap scan

2017-03-08 Thread Robert Haas
On Wed, Mar 8, 2017 at 12:53 PM, Tom Lane wrote: >> Thanks. Sorry for the hassle; my compiler isn't as picky about this >> as I would like, and apparently Dilip's isn't either. > > Might be interesting to see whether -O level affects it. In principle, > whether you get the warning should depend

Re: [HACKERS] Explicit subtransactions for PL/Tcl

2017-03-08 Thread Victor Wagner
On Wed, 8 Mar 2017 16:49:33 +0100 Pavel Stehule wrote: > > I did a review of this patch First, thank you for you effort. I already begin to think that nobody is really interesting in PL/Tcl stuff. > 1. This functionality has sense and nobody was against this feature. > > 2. This patch does

Re: [HACKERS] Hash support for grouping sets

2017-03-08 Thread Andrew Gierth
> "Mark" == Mark Dilger writes: Mark> Hi Andrew, Mark> Reviewing the patch a bit more, I find it hard to understand the Mark> comment about passing -1 as a flag for finalize_aggregates. Any Mark> chance you can spend a bit more time word-smithing that code Mark> comment? Actually, ign

Re: [HACKERS] SQL/JSON in PostgreSQL

2017-03-08 Thread Oleg Bartunov
On Wed, Mar 8, 2017 at 12:43 AM, Sven R. Kunze wrote: > Hi, > > about the datetime issue: as far as I know, JSON does not define a > serialization format for dates and timestamps. > > On the other hand, YAML (as a superset of JSON) already supports a > language-independent date(time) serializatio

Re: [HACKERS] Patch: Write Amplification Reduction Method (WARM)

2017-03-08 Thread Robert Haas
On Wed, Mar 8, 2017 at 12:14 PM, Alvaro Herrera wrote: > Alvaro Herrera wrote: >> Here's a rebased set of patches. This is the same Pavan posted; I only >> fixed some whitespace and a trivial conflict in indexam.c, per 9b88f27cb42f. > > Jaime noted that I forgot the attachments. Here they are I

Re: [HACKERS] Parallel bitmap heap scan

2017-03-08 Thread Tom Lane
Robert Haas writes: > What I'm using is: > Configured with: > --prefix=/Applications/Xcode.app/Contents/Developer/usr > --with-gxx-include-dir=/usr/include/c++/4.2.1 > Apple LLVM version 7.0.2 (clang-700.1.81) > Target: x86_64-apple-darwin14.5.0 > Thread model: posix Hm. I noticed that longfin

Re: [HACKERS] Parallel bitmap heap scan

2017-03-08 Thread Robert Haas
On Wed, Mar 8, 2017 at 1:18 PM, Tom Lane wrote: > Robert Haas writes: >> What I'm using is: > >> Configured with: >> --prefix=/Applications/Xcode.app/Contents/Developer/usr >> --with-gxx-include-dir=/usr/include/c++/4.2.1 >> Apple LLVM version 7.0.2 (clang-700.1.81) >> Target: x86_64-apple-darwin

Re: [HACKERS] SQL/JSON in PostgreSQL

2017-03-08 Thread Oleg Bartunov
On Wed, Mar 8, 2017 at 7:05 AM, David Steele wrote: > On 3/7/17 11:38 AM, Andres Freund wrote: > > <...> > > We have a plenty of time and we dedicate one full-time developer for >>> this project. >>> >> >> How about having that, and perhaps others, developer participate in >> reviewing patches an

Re: [HACKERS] Write Ahead Logging for Hash Indexes

2017-03-08 Thread Robert Haas
On Wed, Mar 8, 2017 at 7:45 AM, Amit Kapila wrote: >> I still think this is a bad idea. Releasing and reacquiring the lock >> on the master doesn't prevent the standby from seeing intermediate >> states; the comment, if I understand correctly, is just plain wrong. > I can remove this release and

Re: [HACKERS] background sessions

2017-03-08 Thread Pavel Stehule
Hi 2017-03-01 3:35 GMT+01:00 Peter Eisentraut : > > For additional entertainment, I include patches that integrate > > background sessions into dblink. So dblink can open a connection to a > > background session, and then you can use the existing dblink functions > > to send queries, read result

Re: [HACKERS] Patch: Write Amplification Reduction Method (WARM)

2017-03-08 Thread Alvaro Herrera
Robert Haas wrote: > On Wed, Mar 8, 2017 at 12:14 PM, Alvaro Herrera > wrote: > > Alvaro Herrera wrote: > >> Here's a rebased set of patches. This is the same Pavan posted; I only > >> fixed some whitespace and a trivial conflict in indexam.c, per > >> 9b88f27cb42f. > > > > Jaime noted that I fo

Re: [HACKERS] SQL/JSON in PostgreSQL

2017-03-08 Thread Peter van Hardenberg
Small point of order: YAML is not strictly a super-set of JSON. Editorializing slightly, I have not seen much interest in the world for YAML support though I'd be interested in evidence to the contrary. On Tue, Mar 7, 2017 at 1:43 PM, Sven R. Kunze wrote: > Hi, > > about the datetime issue: as

Re: [HACKERS] SQL/JSON in PostgreSQL

2017-03-08 Thread Magnus Hagander
On Wed, Mar 8, 2017 at 11:48 AM, Peter van Hardenberg wrote: > Small point of order: YAML is not strictly a super-set of JSON. > > Editorializing slightly, I have not seen much interest in the world for > YAML support though I'd be interested in evidence to the contrary. > > The world of configur

Re: [HACKERS] SQL/JSON in PostgreSQL

2017-03-08 Thread Robert Haas
On Tue, Mar 7, 2017 at 2:38 PM, Andres Freund wrote: > On 2017-03-07 12:21:59 +0300, Oleg Bartunov wrote: >> On 2017-03-03 15:49:38 -0500, David Steele wrote: >> > I propose we move this patch to the 2017-07 CF so further development >> > and review can be done without haste and as the standard be

Re: [HACKERS] Reporting planning time with EXPLAIN

2017-03-08 Thread Stephen Frost
Ashutosh, * Ashutosh Bapat (ashutosh.ba...@enterprisedb.com) wrote: > On Tue, Mar 7, 2017 at 9:23 PM, Stephen Frost wrote: > > I'm going through these with an eye towards committing them soon. I've > > already adjusted some of the documentation and comments per our earlier > > discussion > > Th

Re: [HACKERS] Need a builtin way to run all tests faster manner

2017-03-08 Thread Peter Eisentraut
On 3/6/17 19:53, Andres Freund wrote: > I'm just not quite sure what the best way is to make it easier to run > tests in parallel within the tree. make check-world -j2 seems to run fine for me. With higher -j I appear to be running out of memory or disks space, so I haven't checked that any furth

Re: [HACKERS] Write Ahead Logging for Hash Indexes

2017-03-08 Thread Robert Haas
On Tue, Mar 7, 2017 at 6:41 PM, Robert Haas wrote: >>> Great, thanks. 0001 looks good to me now, so committed. >> >> Committed 0002. > > Here are some initial review thoughts on 0003 based on a first read-through. More thoughts on the main patch: The text you've added to the hash index README t

Re: [HACKERS] Need a builtin way to run all tests faster manner

2017-03-08 Thread Andres Freund
On 2017-03-08 16:32:49 -0500, Peter Eisentraut wrote: > On 3/6/17 19:53, Andres Freund wrote: > > I'm just not quite sure what the best way is to make it easier to run > > tests in parallel within the tree. > > make check-world -j2 seems to run fine for me. Hm, I at least used to get a lot of spu

Re: [HACKERS] WIP: [[Parallel] Shared] Hash

2017-03-08 Thread Thomas Munro
On Wed, Mar 8, 2017 at 1:15 PM, Tom Lane wrote: > Andres Freund writes: >> +++ b/src/include/storage/barrier.h >> +#include "postgres.h" > >> Huh, that normally shouldn't be in a header. I see you introduced that >> in a bunch of other places too - that really doesn't look right to me. > > That

Re: [HACKERS] Need a builtin way to run all tests faster manner

2017-03-08 Thread Michael Paquier
On Thu, Mar 9, 2017 at 6:49 AM, Andres Freund wrote: > On 2017-03-08 16:32:49 -0500, Peter Eisentraut wrote: >> On 3/6/17 19:53, Andres Freund wrote: >> > I'm just not quite sure what the best way is to make it easier to run >> > tests in parallel within the tree. >> >> make check-world -j2 seems

Re: [HACKERS] foreign partition DDL regression tests

2017-03-08 Thread Amit Langote
On 2017/03/09 1:28, Robert Haas wrote: > On Tue, Feb 21, 2017 at 8:40 PM, Amit Langote > wrote: >> Ashutosh Bapat pointed out [0] that regression tests are missing for the >> foreign partition DDL commands. Attached patch takes care of that. > > Committed. Thanks. > I didn't do anything about

Re: [HACKERS] [GSoC] Personal presentation and request for clarification

2017-03-08 Thread Robert Haas
On Thu, Mar 2, 2017 at 6:15 PM, João Miguel Afonso wrote: > The project that most caught my eye was on "Implementing push-based query > executor". > Although it completely fits my capabilities and current research, I have > some concerns on "The ability to understand and modify PostgresSQL executo

Re: [HACKERS] Partition-wise join for join between (declaratively) partitioned tables

2017-03-08 Thread Robert Haas
On Wed, Mar 1, 2017 at 3:56 AM, Ashutosh Bapat wrote: >> 2. If the PartitionJoinPath emerges as the best path, we create paths >> for each of the remaining child-joins. Then we collect paths with >> properties same as the given PartitionJoinPath, one from each >> child-join. These paths are conver

Re: [HACKERS] on_dsm_detach() callback and parallel tuplesort BufFile resource management

2017-03-08 Thread Robert Haas
On Mon, Mar 6, 2017 at 7:33 PM, Peter Geoghegan wrote: > Recap > = > > A design goal of parallel tuplesort is that the parallel case be as > close to possible as the serial case is already. Very little new code > is needed in tuplesort.c and logtape.c, most of which is about using a > new lowe

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

2017-03-08 Thread Robert Haas
On Sun, Mar 5, 2017 at 11:32 PM, Ashutosh Bapat wrote: >> I think there have been >> previous discussions of switching over to the practice for which you >> are advocating here, but my impression (without researching) is that >> the current practice is more like what Rushabh did. > > I am not sure

Re: [HACKERS] [COMMITTERS] pgsql: Use asynchronous connect API in libpqwalreceiver

2017-03-08 Thread Andrew Dunstan
On 03/08/2017 08:33 AM, Peter Eisentraut wrote: > On 3/6/17 09:38, Peter Eisentraut wrote: >> On 3/4/17 01:45, Petr Jelinek wrote: >>> If that's the case, the attached should fix it, but I have no way of >>> testing it on windows, I can only say that it still works on my machine >>> so at least i

Re: [HACKERS] Cost model for parallel CREATE INDEX

2017-03-08 Thread Robert Haas
On Sun, Mar 5, 2017 at 7:14 PM, Peter Geoghegan wrote: > 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 in

Re: [HACKERS] Supporting huge pages on Windows

2017-03-08 Thread Tsunakawa, Takayuki
From: pgsql-hackers-ow...@postgresql.org > [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Ashutosh Sharma > To start with, I ran the regression test-suite and didn't find any failures. > But, then I am not sure if huge_pages are getting used or not. However, > upon checking the settings f

Re: [HACKERS] Cost model for parallel CREATE INDEX

2017-03-08 Thread Peter Geoghegan
On Wed, Mar 8, 2017 at 5:33 PM, Robert Haas wrote: >> pg_restore will avoid parallelism (that will happen by setting >> "max_parallel_workers_maintenance = 0" when it runs), not because it >> cannot trust the cost model, but because it prefers to parallelize >> things its own way (with multiple r

Re: [HACKERS] Parallel Append implementation

2017-03-08 Thread Robert Haas
On Wed, Mar 8, 2017 at 2:00 AM, Amit Khandekar wrote: > Yeah, that seems to be right in most of the cases. The only cases > where your formula seems to give too few workers is for something like > : (2, 8, 8). For such subplans, we should at least allocate 8 workers. > It turns out that in most of

Re: [HACKERS] Cost model for parallel CREATE INDEX

2017-03-08 Thread Robert Haas
On Wed, Mar 8, 2017 at 8:45 PM, Peter Geoghegan wrote: >> This part I'm not sure about. I think people care quite a lot about >> pg_restore speed, because they are often down when they're running it. >> And they may have oodles mode CPUs that parallel restore can use >> without help from parallel

Re: [HACKERS] contrib modules and relkind check

2017-03-08 Thread Michael Paquier
On Wed, Mar 8, 2017 at 5:10 PM, Amit Langote wrote: > On 2017/03/08 16:47, Michael Paquier wrote: >> Only regular tables are tested as valid objects. Testing toast tables >> is not worth the complication. Could you add as well a matview? > > Done in the attached updated patch. +select count(*) >

  1   2   >