Re: [HACKERS] WIP: Aggregation push-down

2017-09-07 Thread Jeevan Chalke
Hi Antonin, To understand the feature you have proposed, I have tried understanding your patch. Here are few comments so far on it: 1. + if (aggref->aggvariadic || + aggref->aggdirectargs || aggref->aggorder || + aggref->aggdistinct || aggref->aggfilter) I did

Re: [HACKERS] Adding support for Default partition in partitioning

2017-09-07 Thread Rajkumar Raghuwanshi
On Wed, Sep 6, 2017 at 5:25 PM, Jeevan Ladhe wrote: > Hi, > > Attached is the rebased set of patches. > Robert has committed[1] patch 0001 in V26 series, hence the patch numbering > in V27 is now decreased by 1 for each patch as compared to V26. > Hi, I have

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

2017-09-07 Thread Antonin Houska
Ashutosh Bapat wrote: > On Fri, Sep 1, 2017 at 6:05 PM, Antonin Houska wrote: > > > > > > > > * get_partitioned_child_rels_for_join() > > > > I think the Assert() statement is easier to understand inside the loop, see > > the assert.diff

Re: [HACKERS] Adding support for Default partition in partitioning

2017-09-07 Thread Ashutosh Bapat
On Wed, Sep 6, 2017 at 5:50 PM, Jeevan Ladhe wrote: > >> >> I am wondering whether we could avoid call to get_default_partition_oid() >> in >> the above block, thus avoiding a sys cache lookup. The sys cache search >> shouldn't be expensive since the cache should

Re: [HACKERS] Proposal: pg_rewind to skip config files

2017-09-07 Thread Alvaro Herrera
After reading this discussion, I agree that pg_rewind needs to become smarter in order to be fully useful in production environments; right now there are many warts and corner cases that did not seem to have been considered during the initial development (which I think is all right, taking into

Re: [HACKERS] Parallel Append implementation

2017-09-07 Thread Amit Khandekar
On 7 September 2017 at 13:40, Rafia Sabih wrote: > On Wed, Aug 30, 2017 at 5:32 PM, Amit Khandekar > wrote: >> Hi Rafia, >> >> On 17 August 2017 at 14:12, Amit Khandekar wrote: >>> But for all of the cases here,

Re: [HACKERS] Adding support for Default partition in partitioning

2017-09-07 Thread Jeevan Ladhe
On Thu, Sep 7, 2017 at 3:15 PM, Rajkumar Raghuwanshi < rajkumar.raghuwan...@enterprisedb.com> wrote: > On Wed, Sep 6, 2017 at 5:25 PM, Jeevan Ladhe < > jeevan.la...@enterprisedb.com> wrote: > >> Hi, >> >> Attached is the rebased set of patches. >> Robert has committed[1] patch 0001 in V26 series,

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

2017-09-07 Thread Ashutosh Bapat
On Thu, Sep 7, 2017 at 4:32 PM, Antonin Houska wrote: > Ashutosh Bapat wrote: > >> On Fri, Sep 1, 2017 at 6:05 PM, Antonin Houska wrote: >> > >> > >> > >> > * get_partitioned_child_rels_for_join() >> > >> > I think the

Re: [HACKERS] Restricting maximum keep segments by repslots

2017-09-07 Thread Kyotaro HORIGUCHI
Hello, At Thu, 07 Sep 2017 14:12:12 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI wrote in <20170907.141212.227032666.horiguchi.kyot...@lab.ntt.co.jp> > > I would like a flag in pg_replication_slots, and possibly also a > > numerical column that indicates how

Re: [HACKERS] Secondary index access optimizations

2017-09-07 Thread Thomas Munro
On Sun, Sep 3, 2017 at 4:34 AM, Konstantin Knizhnik wrote: > Thank you for review. > I attached new version of the patch with > remove_restrictions_implied_by_constraints() function. > Concerning failed tests - this is actually result of this optimization: > extra

Re: [HACKERS] Tuple-routing for certain partitioned tables not working as expected

2017-09-07 Thread Etsuro Fujita
On 2017/08/30 17:20, Etsuro Fujita wrote: Here is a patch to skip the CheckValidResultRel checks for a target table if it's a foreign partition to perform tuple-routing for, as proposed by Robert. In the patch, to skip the checks, I passed to CheckValidResultRel a new flag indicating whether

Re: [HACKERS] Re: [COMMITTERS] pgsql: pg_rewind: Fix some problems when copying files >2GB.

2017-09-07 Thread Alvaro Herrera
Peter Eisentraut wrote: > On 9/4/17 06:03, Alvaro Herrera wrote: > > Tom Lane wrote: > >> Michael Paquier writes: > >>> I don't like breaking the abstraction of pg_log() with the existing > >>> flags with some kind of pg_debug() layer. The set of APIs present now > >>>

Re: [HACKERS] UPDATE of partition key

2017-09-07 Thread Amit Khandekar
On 3 September 2017 at 17:10, Amit Khandekar wrote: > After recent commit 30833ba154, now the partitions are expanded in > depth-first order. It didn't seem worthwhile rebasing my partition > walker changes onto the latest code. So in the attached patch, I have > removed

Re: [HACKERS] path toward faster partition pruning

2017-09-07 Thread Amit Langote
Forgot to mention a couple of important points about the relation of some of the patches here to the patches and discussion at the partitionwise-join thread [1]. On 2017/09/06 19:38, Amit Langote wrote: > [PATCH 1/5] Expand partitioned inheritance in a non-flattened manner > > This will allow us

Re: [HACKERS] WIP: Aggregation push-down

2017-09-07 Thread Ashutosh Bapat
On Thu, Aug 17, 2017 at 8:52 PM, Antonin Houska wrote: > Antonin Houska wrote: > >> Antonin Houska wrote: >> >> > This is a new version of the patch I presented in [1]. >> >> Rebased. >> >> cat .git/refs/heads/master >>

Re: [HACKERS] index-only count(*) for indexes supporting bitmap scans

2017-09-07 Thread Alexey Chernyshov
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: tested, passed Spec compliant: tested, passed Documentation:tested, passed One thing I have noticed is a trailing whitespace after

Re: [HACKERS] [bug fix] Savepoint-related statements terminates connection

2017-09-07 Thread Tom Lane
Catalin Iacob writes: > On Mon, Sep 4, 2017 at 4:15 PM, Tom Lane wrote: >> Also, the main thing that we need xact.c's involvement for in the first >> place is the fact that implicit transaction blocks, unlike regular ones, >> auto-cancel on an error,

Re: [HACKERS] log_destination=file

2017-09-07 Thread Tom Lane
Dmitry Dolgov <9erthali...@gmail.com> writes: >> On 31 August 2017 at 14:49, Tom Lane wrote: >> pgbench with log_statement = all would be a pretty easy test case. > It seems that for this particular workload it was about 20-25% slower. Ouch. That seems like rather a large

Re: [HACKERS] WIP: Aggregation push-down

2017-09-07 Thread Merlin Moncure
On Thu, Aug 17, 2017 at 10:22 AM, Antonin Houska wrote: > Antonin Houska wrote: > output type. For other aggregates (like avg()) the remote nodes will have to > return the transient state value in an appropriate form (maybe bytea type), > which does not depend

Re: [HACKERS] 【ECPG】strncpy function does not set the end character '\0'

2017-09-07 Thread Tom Lane
Michael Meskes writes: > With "supposed" I was referring to the standard that defines SQLCA. Oh. If there's actually a standard somewhere that says it's not null-terminated, then code that is expecting it to be so is just wrong. No need to change anything in ecpg, IMO.

Re: [HACKERS] Proposal: pg_rewind to skip config files

2017-09-07 Thread Chris Travers
On Thu, Sep 7, 2017 at 2:47 PM, Alvaro Herrera wrote: > After reading this discussion, I agree that pg_rewind needs to become > smarter in order to be fully useful in production environments; right > now there are many warts and corner cases that did not seem to have

Re: [HACKERS] Create replication slot in pg_basebackup if requested and not yet present

2017-09-07 Thread Michael Banck
Hi, not directly related to the topic, but: On Tue, Mar 21, 2017 at 03:34:00PM -0400, Robert Haas wrote: > For example, somebody creates a replica using the new super-easy > method, and then blows it away without dropping the slot from the > master, Just a thought, but maybe there should be

Re: [HACKERS] log_destination=file

2017-09-07 Thread Dmitry Dolgov
Hi > On 31 August 2017 at 14:49, Tom Lane wrote: >> Are you actually asking for a benchmark of if logging gets slower? > > Yes. > >> If so, >> could you suggest a workload to make an actual benchmark of it (where >> logging would be high enough that it could be come a

Re: [HACKERS] 【ECPG】strncpy function does not set the end character '\0'

2017-09-07 Thread Michael Meskes
> > Why do you think there should be one? My memory might be wrong but > > I > > don't think it's supposed to be a null terminated string. > > That field is defined as char[5] in struct sqlca_t, so the intent is > clearly that it not be null terminated. However, it looks to me like > there'd be

Re: [HACKERS] advanced partition matching algorithm for partition-wise join

2017-09-07 Thread Antonin Houska
Ashutosh Bapat wrote: > I have fixed the issues which were marked as TODOs in the attached > patches. Also, I have included your test change patch in my series of > patches. I've noticed that partition_bounds_merge() is called twice from make_join_rel(): *

Re: [HACKERS] Secondary index access optimizations

2017-09-07 Thread Konstantin Knizhnik
On 07.09.2017 13:00, Thomas Munro wrote: On Sun, Sep 3, 2017 at 4:34 AM, Konstantin Knizhnik wrote: Thank you for review. I attached new version of the patch with remove_restrictions_implied_by_constraints() function. Concerning failed tests - this is actually

Re: [HACKERS] logical decoding of two-phase transactions

2017-09-07 Thread Nikhil Sontakke
Hi, FYI all, wanted to mention that I am working on an updated version of the latest patch that I plan to submit to a later CF. Regards, Nikhils On 14 May 2017 at 04:02, Dmitry Dolgov <9erthali...@gmail.com> wrote: > On 13 May 2017 at 22:22, Tom Lane wrote: >> >> Apparently

Re: [HACKERS] [bug fix] Savepoint-related statements terminates connection

2017-09-07 Thread Tom Lane
Simon Riggs writes: > On 5 September 2017 at 10:22, Tom Lane wrote: >> Does anyone want to do further review on this patch? If so, I'll >> set the CF entry back to "Needs Review". > OK, I'll review Michael's patch (and confirm my patch is dead) Not

Re: [HACKERS] PoC plpgsql - possibility to force custom or generic plan

2017-09-07 Thread Pavel Stehule
> > > > Hmm. I think the core problem here is that we're trying to control > > the plancache, which is a pretty much behind-the-scenes mechanism. > > Except in the case of an explicit PREPARE, you can't even see from > > SQL that the cache is being used, or when it's used. So part of what > >

Re: [HACKERS] PATCH: multivariate histograms and MCV lists

2017-09-07 Thread Tomas Vondra
Hi, Attached is an updated version of the patch, fixing the issues reported by Adrien Nayrat, and also a bunch of issues pointed out by valgrind. regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Re: [HACKERS] [bug fix] Savepoint-related statements terminates connection

2017-09-07 Thread Simon Riggs
On 7 September 2017 at 11:07, Tom Lane wrote: > I wrote: >> Yeah, it seems like we have now made this behavior official enough that >> it's time to document it better. My thought is to create a new subsection >> in the FE/BE Protocol chapter that explains how multi-statement

Re: [HACKERS] assorted code cleanup

2017-09-07 Thread Tom Lane
Peter Eisentraut writes: > On 9/5/17 15:32, Tom Lane wrote: >> I do agree with the idea that we should use the * notation in cases where >> the reader might otherwise think that a plain function was being invoked, >> ie I don't like >>

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

2017-09-07 Thread Robert Haas
On Tue, Sep 5, 2017 at 7:01 AM, Ashutosh Bapat wrote: > accumulate_append_subpath() is executed for every path instead of > every relation, so changing it would collect the same list multiple > times. Instead, I found the old way of associating all intermediate >

Re: [HACKERS] psql - add special variable to reflect the last query status

2017-09-07 Thread Pavel Stehule
Hi 2017-09-06 11:14 GMT+02:00 Fabien COELHO : > > Here is a version 6. >> > > Small v7 update, sorry for the noise. > > Add testing the initial state of all variables. > > Fix typos in a comment in tests. > > Fix the documentation wrt the current implementation behavior. I

Re: [HACKERS] path toward faster partition pruning

2017-09-07 Thread Robert Haas
On Thu, Sep 7, 2017 at 7:16 AM, Amit Langote wrote: > There is a patch in the Ashutosh's posted series of patches, which does > more or less the same thing that this patch does. He included it in his > series of patches, because, IIUC, the main partitionwise-join

Re: [HACKERS] [bug fix] Savepoint-related statements terminates connection

2017-09-07 Thread Simon Riggs
On 5 September 2017 at 10:22, Tom Lane wrote: > Michael Paquier writes: >> On Mon, Sep 4, 2017 at 11:15 PM, Tom Lane wrote: >>> I don't want to go there, and was thinking we should expand the new >>> comment in DefineSavepoint

Re: [HACKERS] [bug fix] Savepoint-related statements terminates connection

2017-09-07 Thread Tom Lane
Simon Riggs writes: > I would like to relax the restriction to allow this specific use case... > SET work_mem = X; SET max_parallel_workers = 4; SELECT ... > so we still have only one command (the last select), yet we have > multiple GUC settings beforehand. On what

Re: [HACKERS] psql - add special variable to reflect the last query status

2017-09-07 Thread Fabien COELHO
Hello Pavel, I checked performance - the most fast queries are execution of simple prepared statement prepare x as select 1; -- 100 x execute x; execute x; execute x; execute x; ## patched [pavel@nemesis postgresql]$ time psql -At -1 postgres -f ~/xxx.sql > /dev/null real 0m44,887s user

Re: [HACKERS] 【ECPG】strncpy function does not set the end character '\0'

2017-09-07 Thread Michael Meskes
> Oh. If there's actually a standard somewhere that says it's not > null-terminated, then code that is expecting it to be so is just > wrong. No need to change anything in ecpg, IMO. As I said I haven't checked if this detail is actually in there, but I guess it was because there is a reason

Re: [HACKERS] Tuple-routing for certain partitioned tables not working as expected

2017-09-07 Thread Robert Haas
On Thu, Sep 7, 2017 at 5:13 AM, Etsuro Fujita wrote: > On 2017/08/30 17:20, Etsuro Fujita wrote: >> Here is a patch to skip the CheckValidResultRel checks for a target table >> if it's a foreign partition to perform tuple-routing for, as proposed by >> Robert. > > In

Re: [HACKERS] Setting pd_lower in GIN metapage

2017-09-07 Thread Robert Haas
On Wed, Sep 6, 2017 at 9:42 PM, Amit Langote wrote: > I too tend to think that any users who use this masking facility would > know to expect to get these failures on upgraded clusters with invalid > pd_lower in meta pages. I strongly disagree. -- Robert Haas

Re: [HACKERS] Re: issue: record or row variable cannot be part of multiple-item INTO list

2017-09-07 Thread Pavel Stehule
2017-09-07 19:48 GMT+02:00 Pavel Stehule : > > > 2017-09-07 8:08 GMT+02:00 Anthony Bykov : > >> The following review has been posted through the commitfest application: >> make installcheck-world: not tested >> Implements feature: not tested

Re: [HACKERS] [bug fix] Savepoint-related statements terminates connection

2017-09-07 Thread Tom Lane
I wrote: > Yeah, it seems like we have now made this behavior official enough that > it's time to document it better. My thought is to create a new subsection > in the FE/BE Protocol chapter that explains how multi-statement Query > messages are handled, and then to link to that from appropriate

Re: [HACKERS] Re: issue: record or row variable cannot be part of multiple-item INTO list

2017-09-07 Thread Pavel Stehule
2017-09-07 8:08 GMT+02:00 Anthony Bykov : > The following review has been posted through the commitfest application: > make installcheck-world: not tested > Implements feature: not tested > Spec compliant: not tested > Documentation:not tested

Re: [HACKERS] assorted code cleanup

2017-09-07 Thread Peter Eisentraut
On 9/5/17 15:32, Tom Lane wrote: > At one time there were C compilers that only accepted the former syntax. Correct. Explanation here: http://c-faq.com/ptrs/funccall.html > I do agree with the idea that we should use the * notation in cases where > the reader might otherwise think that a plain

Re: [HACKERS] Setting pd_lower in GIN metapage

2017-09-07 Thread Tom Lane
Michael Paquier writes: > On Thu, Sep 7, 2017 at 2:40 PM, Amit Langote > wrote: >> On 2017/09/07 13:09, Michael Paquier wrote: >>> pd_lower should remain at 0 on pre-10 servers. >> Doesn't PageInit(), which is where any page gets

Re: [HACKERS] Hooks to track changed pages for backup purposes

2017-09-07 Thread Tomas Vondra
Hi, On 09/01/2017 08:13 AM, Andrey Borodin wrote: > Thank you for your reply, Michael! Your comments are valuable, especially in the world of backups. > >> 31 авг. 2017 г., в 19:44, Michael Paquier написал(а): >> Such things are not Postgres-C like. > Will be fixed. >

Re: [HACKERS] [PATCH] Pageinspect - add functions on GIN and GiST indexes from gevel

2017-09-07 Thread Tomas Vondra
Hi, On 07/21/2017 03:40 PM, Alexander Korotkov wrote: > Hi, Alexey! > > On Fri, Jul 21, 2017 at 3:05 PM, Alexey Chernyshov > > wrote: > > the following patch transfers functionality from gevel module >

Re: [HACKERS] GnuTLS support

2017-09-07 Thread Tomas Vondra
Hi, On 09/04/2017 04:24 PM, Bruce Momjian wrote: > On Fri, Sep 1, 2017 at 12:09:35PM -0400, Robert Haas wrote: >> I think that what this shows is that the current set of GUCs is overly >> OpenSSL-centric. We created a set of GUCs that are actually specific >> to one particular implementation

Re: [HACKERS] Remove 1MB size limit in tsvector

2017-09-07 Thread Tomas Vondra
Hi, On 08/17/2017 12:23 PM, Ildus Kurbangaliev wrote: > In my benchmarks when database fits into buffers (so it's measurement of > the time required for the tsvectors conversion) it gives me these > results: > > Without conversion: > > $ ./tsbench2 -database test1 -bench_time 300 > 2017/08/17

Re: [HACKERS] [PROPOSAL] Use SnapshotAny in get_actual_variable_range

2017-09-07 Thread Tom Lane
Dmitriy Sarafannikov writes: > [ snapshot_non_vacuumable_v3.patch ] Starting to look at this. I think that the business with choosing RecentGlobalXmin vs. RecentGlobalDataXmin is just wrong. What we want to do is accept any tuple that would not be considered killable

Re: [HACKERS] The case for removing replacement selection sort

2017-09-07 Thread Tomas Vondra
Hi, On 08/31/2017 02:56 AM, Peter Geoghegan wrote: > On Wed, Aug 30, 2017 at 5:38 PM, Robert Haas wrote: >> Wow. Just to be clear, I am looking for the BEST case for replacement >> selection, not the worst case. But I would have expected that case to >> be a win for

Re: [HACKERS] GnuTLS support

2017-09-07 Thread Magnus Hagander
On Thu, Sep 7, 2017 at 2:34 PM, Tomas Vondra wrote: > Hi, > > On 09/04/2017 04:24 PM, Bruce Momjian wrote: > > On Fri, Sep 1, 2017 at 12:09:35PM -0400, Robert Haas wrote: > >> I think that what this shows is that the current set of GUCs is overly > >>

Re: [HACKERS] The case for removing replacement selection sort

2017-09-07 Thread Robert Haas
On Thu, Sep 7, 2017 at 5:38 PM, Tomas Vondra wrote: > Do we need/want to repeat some of that benchmarking on these patches? I > don't recall how much this code changed since those benchmarks were done > in the 9.6 cycle. +1 for some new benchmarking. I'm all for

Re: [HACKERS] Parallel worker error

2017-09-07 Thread Robert Haas
On Mon, Sep 4, 2017 at 5:46 AM, Amit Kapila wrote: > It seems like the consensus is to move forward with this approach. I > have written a patch implementing the above idea. Note, that to use > SetCurrentRoleId, we need the value of guc "is_superuser" for the > current

Re: [HACKERS] [PATCH] Pattern based listeners for asynchronous messaging (LISTEN/NOTIFY)

2017-09-07 Thread Marko Tiikkaja
Hi Markus, On Sun, Aug 20, 2017 at 9:56 PM, Markus Sintonen wrote: > I also encountered this when I built it with different configuration. I > attached updated patch with the correct number of arguments to > 'similar_escape'. I also added preliminary documentation to

Re: [HACKERS] [bug fix] Savepoint-related statements terminates connection

2017-09-07 Thread Simon Riggs
On 7 September 2017 at 11:24, Tom Lane wrote: > Simon Riggs writes: >> On 5 September 2017 at 10:22, Tom Lane wrote: >>> Does anyone want to do further review on this patch? If so, I'll >>> set the CF entry back to "Needs Review".

Re: [HACKERS] [bug fix] Savepoint-related statements terminates connection

2017-09-07 Thread Simon Riggs
On 7 September 2017 at 11:31, Tom Lane wrote: > Simon Riggs writes: >> I would like to relax the restriction to allow this specific use case... >> SET work_mem = X; SET max_parallel_workers = 4; SELECT ... >> so we still have only one command (the

Re: [HACKERS] Adding support for Default partition in partitioning

2017-09-07 Thread Robert Haas
On Thu, Sep 7, 2017 at 8:13 AM, Jeevan Ladhe wrote: > The fix would be much easier if the refactoring patch 0001 by Amul in hash > partitioning thread[2] is committed. Done. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL

Re: [HACKERS] Moving relation extension locks out of heavyweight lock manager

2017-09-07 Thread Thomas Munro
On Fri, Sep 8, 2017 at 10:24 AM, Thomas Munro wrote: > On Wed, Aug 16, 2017 at 2:13 PM, Masahiko Sawada > wrote: >> The previous patch conflicts with current HEAD, I rebased the patch to >> current HEAD. > > Hi Masahiko-san, Hi Sawada-san,

Re: [HACKERS] [PROPOSAL] Use SnapshotAny in get_actual_variable_range

2017-09-07 Thread Tom Lane
I wrote: > Dmitriy Sarafannikov writes: >> [ snapshot_non_vacuumable_v3.patch ] > In short I think we should just set up the threshold as RecentGlobalXmin. Pushed with that adjustment and some fooling with the comments. regards, tom lane --

Re: [HACKERS] Refactor handling of database attributes between pg_dump and pg_dumpall

2017-09-07 Thread Thomas Munro
On Mon, Aug 21, 2017 at 4:35 PM, Haribabu Kommi wrote: > On Tue, Aug 15, 2017 at 7:29 AM, Peter Eisentraut > wrote: >> On 4/4/17 01:06, Haribabu Kommi wrote: >> > Both pg_dump and pg_upgrade tests are passed. Updated patch attached >> >

Re: [HACKERS] pgbench: Skipping the creating primary keys after initialization

2017-09-07 Thread Masahiko Sawada
On Thu, Sep 7, 2017 at 4:15 PM, Fabien COELHO wrote: > >>> Very very minor comments that I should have noticed before, sorry for >>> this >>> additional round trip. >> >> >> Thank you for the dedicated review! > > > I'm someone at times pigheaded, I think in the good sense if

Re: [HACKERS] Moving relation extension locks out of heavyweight lock manager

2017-09-07 Thread Masahiko Sawada
On Fri, Sep 8, 2017 at 8:25 AM, Thomas Munro wrote: > On Fri, Sep 8, 2017 at 10:24 AM, Thomas Munro > wrote: >> On Wed, Aug 16, 2017 at 2:13 PM, Masahiko Sawada >> wrote: >>> The previous patch conflicts with

Re: [HACKERS] GSoC 2017: weekly progress reports (week 4) and patch for hash index

2017-09-07 Thread Thomas Munro
Hi Shubham, On Tue, Jun 27, 2017 at 9:21 PM, Shubham Barai wrote: > If these two hash keys (78988658 and 546789888) mapped to the same bucket, > this will result in false serialization failure. > Please correct me if this assumption about false positives is wrong. I

Re: [HACKERS] [POC] hash partitioning

2017-09-07 Thread Robert Haas
On Mon, Sep 4, 2017 at 6:38 AM, amul sul wrote: > I've updated patch to use an extended hash function (Commit # > 81c5e46c490e2426db243eada186995da5bb0ba7) for the partitioning. Committed 0001 after noticing that Jeevan Ladhe also found that change convenient for default

Re: [HACKERS] Moving relation extension locks out of heavyweight lock manager

2017-09-07 Thread Thomas Munro
On Wed, Aug 16, 2017 at 2:13 PM, Masahiko Sawada wrote: > The previous patch conflicts with current HEAD, I rebased the patch to > current HEAD. Hi Masahiko-san, FYI this doesn't build anymore. I think it's just because the wait event enumerators were re-alphabetised in

Re: [HACKERS] log_destination=file

2017-09-07 Thread Magnus Hagander
On Thu, Sep 7, 2017 at 7:02 AM, Tom Lane wrote: > Dmitry Dolgov <9erthali...@gmail.com> writes: > >> On 31 August 2017 at 14:49, Tom Lane wrote: > >> pgbench with log_statement = all would be a pretty easy test case. > > > It seems that for this

Re: [HACKERS] [bug fix] Savepoint-related statements terminates connection

2017-09-07 Thread Tom Lane
Simon Riggs writes: > On 7 September 2017 at 11:24, Tom Lane wrote: >> Not hearing anything, I already pushed my patch an hour or three ago. > Yes, I saw. Are you saying that doc commit is all we need? ISTM we > still had an actual bug. The originally

Re: [HACKERS] Re: proposal - psql: possibility to specify sort for describe commands, when size is printed

2017-09-07 Thread Pavel Stehule
2017-08-16 14:06 GMT+02:00 Pavel Stehule : > Hi > > 2017-08-15 4:37 GMT+02:00 Peter Eisentraut com>: > >> On 3/11/17 07:06, Pavel Stehule wrote: >> > I am sending a updated version with separated sort direction in special >> > variable >>

Re: [HACKERS] GnuTLS support

2017-09-07 Thread Andreas Karlsson
On 09/07/2017 11:34 PM, Tomas Vondra wrote: I am worried about having 3x version of TLS controls in postgresql.conf, and only one set being active. Perhaps we need to break out the TLS config to separate files or something. Anyway, this needs more thought. Well, people won't be able to set the

Re: [HACKERS] Moving relation extension locks out of heavyweight lock manager

2017-09-07 Thread Masahiko Sawada
On Fri, Sep 8, 2017 at 7:24 AM, Thomas Munro wrote: > On Wed, Aug 16, 2017 at 2:13 PM, Masahiko Sawada > wrote: >> The previous patch conflicts with current HEAD, I rebased the patch to >> current HEAD. > > Hi Masahiko-san, > > FYI this

Re: [HACKERS] GnuTLS support

2017-09-07 Thread Tom Lane
Andreas Karlsson writes: > On 09/07/2017 11:34 PM, Tomas Vondra wrote: >> Well, people won't be able to set the inactive options, just like you >> can't set ssl=on when you build without OpenSSL support. But perhaps we >> could simply not include the inactive options into the

Re: [HACKERS] [bug fix] Savepoint-related statements terminates connection

2017-09-07 Thread Tom Lane
Simon Riggs writes: > On 7 September 2017 at 11:31, Tom Lane wrote: >> Haas' idea of some kind of syntactic extension, like "LET guc1 = x, >> guc2 = y FOR statement" seems more feasible to me. I'm not necessarily >> wedded to that particular syntax,

Re: [HACKERS] Tuple-routing for certain partitioned tables not working as expected

2017-09-07 Thread Etsuro Fujita
On 2017/09/08 0:21, Robert Haas wrote: On Thu, Sep 7, 2017 at 5:13 AM, Etsuro Fujita wrote: On 2017/08/30 17:20, Etsuro Fujita wrote: Here is a patch to skip the CheckValidResultRel checks for a target table if it's a foreign partition to perform tuple-routing

[HACKERS] psql: new help related to variables are not too readable

2017-09-07 Thread Pavel Stehule
Hi Now the output looks like: AUTOCOMMIT if set, successful SQL commands are automatically committed COMP_KEYWORD_CASE determines the case used to complete SQL key words [lower, upper, preserve-lower, preserve-upper] DBNAME the currently connected database name ECHO

Re: [HACKERS] psql: new help related to variables are not too readable

2017-09-07 Thread Pavel Stehule
2017-09-08 6:36 GMT+02:00 Erik Rijkers : > On 2017-09-08 06:09, Pavel Stehule wrote: > >> Hi >> >> Now the output looks like: >> >> AUTOCOMMIT >> if set, successful SQL commands are automatically committed >> COMP_KEYWORD_CASE >> determines the case used to complete

Re: [HACKERS] Parallel worker error

2017-09-07 Thread Amit Kapila
On Fri, Sep 8, 2017 at 3:18 AM, Robert Haas wrote: > On Mon, Sep 4, 2017 at 5:46 AM, Amit Kapila wrote: >> It seems like the consensus is to move forward with this approach. I >> have written a patch implementing the above idea. Note, that to use

Re: [HACKERS] psql: new help related to variables are not too readable

2017-09-07 Thread Fabien COELHO
Hello, PSQL_HISTORY alternative location for the command history file I would prefer to revert to that more compact 9.6-formatting. There was a problem with line width .. its hard to respect 80 chars Yes. Scrolling in two dimensions because it does not fit either way is not too

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

2017-09-07 Thread Amit Langote
On 2017/09/08 4:04, Robert Haas wrote: > On Tue, Sep 5, 2017 at 7:01 AM, Ashutosh Bapat > wrote: >> accumulate_append_subpath() is executed for every path instead of >> every relation, so changing it would collect the same list multiple >> times. Instead, I found

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

2017-09-07 Thread Amit Langote
On 2017/09/08 14:47, Amit Langote wrote: > When I tried the attached patch, it doesn't seem to expand partitioning > inheritance in step-wise manner as the patch's title says. Oops. By "attached patch", I had meant to say the Robert's patch, that is, expand-stepwise-rmh.patch. Not

Re: [HACKERS] psql: new help related to variables are not too readable

2017-09-07 Thread Erik Rijkers
On 2017-09-08 06:09, Pavel Stehule wrote: Hi Now the output looks like: AUTOCOMMIT if set, successful SQL commands are automatically committed COMP_KEYWORD_CASE determines the case used to complete SQL key words [lower, upper, preserve-lower, preserve-upper] DBNAME the

Re: [HACKERS] CLUSTER command progress monitor

2017-09-07 Thread Tatsuro Yamada
On 2017/09/06 16:11, Michael Paquier wrote: On Wed, Sep 6, 2017 at 3:58 PM, Tatsuro Yamada wrote: I revised the patch like this: You should avoid top-posting. I see. I didn't change the name of view (pg_stat_progress_cluster) because I'm not sure whether the

Re: [HACKERS] pgbench: Skipping the creating primary keys after initialization

2017-09-07 Thread Fabien COELHO
Very very minor comments that I should have noticed before, sorry for this additional round trip. Thank you for the dedicated review! I'm someone at times pigheaded, I think in the good sense if it is possible, and I like to finish what I start:-) Patch applies, compiles, works,

Re: [HACKERS] Proposal: pg_rewind to skip config files

2017-09-07 Thread Chris Travers
One more side to this which is relevant to other discussions. If I am rewinding back to before when a table was created, the current algorithm as well as any proposed algorithms will delete the reference to the relfilenode in the catalogs but not the file itself. I don't see how an undo

[HACKERS] Re: issue: record or row variable cannot be part of multiple-item INTO list

2017-09-07 Thread Anthony Bykov
The following review has been posted through the commitfest application: make installcheck-world: not tested Implements feature: not tested Spec compliant: not tested Documentation:not tested I'm afraid this patch conflicts with current master branch. The new status

Re: [HACKERS] Setting pd_lower in GIN metapage

2017-09-07 Thread Michael Paquier
On Thu, Sep 7, 2017 at 2:40 PM, Amit Langote wrote: > On 2017/09/07 13:09, Michael Paquier wrote: >> pd_lower should remain at 0 on pre-10 servers. > > Doesn't PageInit(), which is where any page gets initialized, has always > set pd_lower to SizeOfPageHeaderData?

Re: [HACKERS] Making clausesel.c Smarter

2017-09-07 Thread Daniel Gustafsson
> On 06 Sep 2017, at 07:13, David Rowley wrote: > > On 6 September 2017 at 00:43, Daniel Gustafsson wrote: >> This patch was moved to the currently open Commitfest. Given the above >> comment, is the last patch in this thread still up for review,

Re: [HACKERS] [Proposal] Allow users to specify multiple tables in VACUUM commands

2017-09-07 Thread Michael Paquier
On Thu, Sep 7, 2017 at 9:46 AM, Bossart, Nathan wrote: > I've attached v1 of this patch. I think we might want to refactor the > code for retrieving the relation name from a RangeVar, but it would > probably be better to do that in a separate patch. Using the patch checking

Re: [HACKERS] Re: [COMMITTERS] pgsql: pg_rewind: Fix some problems when copying files >2GB.

2017-09-07 Thread Alvaro Herrera
Peter Eisentraut wrote: > On 9/4/17 06:03, Alvaro Herrera wrote: > > Tom Lane wrote: > >> Michael Paquier writes: > >>> I don't like breaking the abstraction of pg_log() with the existing > >>> flags with some kind of pg_debug() layer. The set of APIs present now > >>>

Re: [HACKERS] Parallel Append implementation

2017-09-07 Thread Rafia Sabih
On Wed, Aug 30, 2017 at 5:32 PM, Amit Khandekar wrote: > Hi Rafia, > > On 17 August 2017 at 14:12, Amit Khandekar wrote: >> But for all of the cases here, partial >> subplans seem possible, and so even on HEAD it executed Partial >> Append. So