Re: [HACKERS] [PATCH] kNN for SP-GiST

2017-03-24 Thread David Steele
On 3/21/17 11:45 AM, David Steele wrote: Hi Nikita, On 3/9/17 8:52 AM, Alexander Korotkov wrote: I take a look to this patchset. My first notes are following. This thread has been idle for quite a while. Please respond and/or post a new patch by 2017-03-24 00:00 AoE (UTC-12) or this

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

2017-03-24 Thread David Steele
Hi Naoki, On 3/17/17 11:58 AM, Surafel Temesgen wrote: I am sending the review of this patch This thread has been idle for a week. Please respond and/or post a new patch by 2017-03-28 00:00 AoE (UTC-12) or this submission will be marked "Returned with Feedback". -- -David

Re: [HACKERS] Should we cacheline align PGXACT?

2017-03-24 Thread Simon Riggs
On 10 March 2017 at 13:08, Alexander Korotkov wrote: Results look good for me. Idea of committing both of patches looks > attractive. > I'll commit mine since I understand what it does. I'll look at the other one also, but won't commit yet. > We have pretty much

Re: [HACKERS] pg_serial early wraparound

2017-03-24 Thread Anastasia Lubennikova
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 Hi, I've tried to review this patch, but it seems that I miss something

Re: [HACKERS] Logical replication existing data copy

2017-03-24 Thread Petr Jelinek
On 24/03/17 15:05, Peter Eisentraut wrote: > On 3/23/17 19:32, Petr Jelinek wrote: >> Yes, I also forgot to check if the table actually exists on subscriber >> when fetching them in CREATE SUBSCRIPTION (we have check during >> replication but not there). > > I think for this we can probably just

Re: [HACKERS] Declarative partitioning optimization for large amount of partitions

2017-03-24 Thread Simon Riggs
On 1 March 2017 at 01:36, Amit Langote wrote: > I don't know which way you're thinking of fixing this, but a planner patch > to implement faster partition-pruning will have taken care of this, I > think. As you may know, even declarative partitioned tables

Re: [HACKERS] Logical replication existing data copy

2017-03-24 Thread Peter Eisentraut
On 3/23/17 19:32, Petr Jelinek wrote: > Yes, I also forgot to check if the table actually exists on subscriber > when fetching them in CREATE SUBSCRIPTION (we have check during > replication but not there). I think for this we can probably just change the missing_ok argument of RangeVarGetRelid()

Re: [HACKERS] create_unique_path and GEQO

2017-03-24 Thread Tom Lane
Ashutosh Bapat writes: >> Do you have test case, which can reproduce the issue you >> explained above? > No. It would require some surgery in standard_planner() to measure the > memory consumed in the planner context OR build the code with > SHOW_MEMORY_STATS

Re: [HACKERS] increasing the default WAL segment size

2017-03-24 Thread David Steele
On 3/23/17 4:45 PM, Peter Eisentraut wrote: On 3/22/17 17:33, David Steele wrote: I think if we don't change the default size it's very unlikely I would use alternate WAL segment sizes or recommend that anyone else does, at least in v10. I simply don't think it would get the level of testing

Re: [HACKERS] Re: Declarative partitioning optimization for large amount of partitions

2017-03-24 Thread Aleksander Alekseev
Also I would like to share some benchmark results. Before applying any patches (copied from one of previous messages): ``` latency average = 1153.495 ms latency stddev = 154.366 ms tps = 6.061104 (including connections establishing) tps = 6.061211 (excluding connections establishing) ``` After

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

2017-03-24 Thread Amit Kapila
On Thu, Mar 23, 2017 at 3:54 PM, Pavan Deolasee wrote: > Thanks Amit. v19 addresses some of the comments below. > > On Thu, Mar 23, 2017 at 10:28 AM, Amit Kapila > wrote: >> >> On Wed, Mar 22, 2017 at 4:06 PM, Amit Kapila

Re: [HACKERS] scram and \password

2017-03-24 Thread Heikki Linnakangas
On 03/24/2017 03:02 PM, Michael Paquier wrote: In order to close this thread, I propose to reuse the patches I sent here to make scram_build_verifier() available to frontends: https://www.postgresql.org/message-id/CAB7nPqT4yc3u8wspYkWbG088Ndp6asMH3=zb___ck89ctvz...@mail.gmail.com And on top of

Re: [HACKERS] scram and \password

2017-03-24 Thread Michael Paquier
On Fri, Mar 24, 2017 at 8:36 PM, Heikki Linnakangas wrote: > On 03/23/2017 06:41 AM, Michael Paquier wrote: >> >> And after a lookup the failure is here: >> - result = get_role_password(port->user_name, _pass, logdetail); >> + shadow_pass = get_role_password(port->user_name,

Re: [HACKERS] Backend crash on non-exclusive backup cancel

2017-03-24 Thread Michael Paquier
On Fri, Mar 24, 2017 at 7:58 PM, Teodor Sigaev wrote: > Thank you all, pushed. Thanks. -- Michael -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] [PATCH] Suppress Clang 3.9 warnings

2017-03-24 Thread Aleksander Alekseev
Hi Tom, Since no one seems to be particularly excited about this patch I'm marking it as "Returned with feedback" to save reviewers time. On Wed, Mar 15, 2017 at 12:21:21PM -0400, Tom Lane wrote: > Noah Misch writes: > > On Wed, Mar 15, 2017 at 10:57:15AM -0400, Tom Lane

Re: [HACKERS] increasing the default WAL segment size

2017-03-24 Thread Stephen Frost
Jeff, * Jeff Janes (jeff.ja...@gmail.com) wrote: > On Thu, Mar 23, 2017 at 1:45 PM, Peter Eisentraut < > peter.eisentr...@2ndquadrant.com> wrote: > > On 3/22/17 17:33, David Steele wrote: > > > and I doubt that most tool writers would be quick to > > > add support for a feature that very few

Re: [HACKERS] WIP: Covering + unique indexes.

2017-03-24 Thread Aleksander Alekseev
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 This patch looks good to me. As I understand we have both a

Re: [HACKERS] increasing the default WAL segment size

2017-03-24 Thread David Steele
On 3/24/17 12:27 AM, Peter Eisentraut wrote: On 3/23/17 16:58, Stephen Frost wrote: The backup tools need to also get the LSN from the pg_stop_backup and verify that they have the WAL file associated with that LSN. There is a function for that. They also need to make sure that they have all

Re: [HACKERS] Monitoring roles patch

2017-03-24 Thread Stephen Frost
Peter, * Peter Eisentraut (peter.eisentr...@2ndquadrant.com) wrote: > On 3/22/17 09:17, Stephen Frost wrote: > >> If we do it via GRANTs instead, then users can easily extend it. > > The intent here is that users will *also* be able to do it via GRANTs if > > they wish to. > > But why not do it

Re: [HACKERS] Re: Declarative partitioning optimization for large amount of partitions

2017-03-24 Thread Aleksander Alekseev
Hi Anastasia, Thanks a lot for a review! As was mentioned above there is also a bottleneck in find_all_inheritors procedure. Turned out the problem there is similar and it could be easily fixed as well. Corresponding patch is attached to this message. To keep things in order I'm attaching the

Re: [HACKERS] increasing the default WAL segment size

2017-03-24 Thread Stephen Frost
Peter, * Peter Eisentraut (peter.eisentr...@2ndquadrant.com) wrote: > There is a function for that. [...] > There is not a function for that, but there could be one. I'm not sure you've really considered what you're suggesting here. We need to to make sure we have every file between two LSNs.

Re: [HACKERS] Logical replication existing data copy

2017-03-24 Thread Petr Jelinek
On 24/03/17 11:23, Erik Rijkers wrote: > On 2017-03-24 10:45, Mark Kirkwood wrote: >> >> However one minor observation - as Michael Banck noted - the elapsed >> time for slave to catch up after running: >> >> $ pgbench -c8 -T600 bench >> >> on the master was (subjectively) much longer than for

Re: [HACKERS] scram and \password

2017-03-24 Thread Heikki Linnakangas
On 03/23/2017 06:41 AM, Michael Paquier wrote: And after a lookup the failure is here: - result = get_role_password(port->user_name, _pass, logdetail); + shadow_pass = get_role_password(port->user_name, logdetail); if (result == STATUS_OK) result is never setup in this code path, so that

[HACKERS] Re: [COMMITTERS] pgsql: Fix and simplify check for whether we're running as Windows serv

2017-03-24 Thread Dave Page
On Friday, March 24, 2017, Heikki Linnakangas wrote: > On 03/22/2017 07:44 PM, Robert Haas wrote: > >> On Wed, Mar 22, 2017 at 10:13 AM, Alvaro Herrera >> wrote: >> >>> Heikki Linnakangas wrote: >>> I did some archeology, and found

[HACKERS] [psql] patch to fix ordering in words_after_create array

2017-03-24 Thread Rushabh Lathia
Hi All, While looking at the code around tab-complete.c, I found the ordering in words_after_create array is not correct for DEFAULT PRIVILEGES, which been added under below commit: commit d7d77f3825122bde55be9e06f6c4851028b99795 Author: Peter Eisentraut Date: Thu Mar 16

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

2017-03-24 Thread Pavan Deolasee
On Fri, Mar 24, 2017 at 4:04 PM, Amit Kapila wrote: > On Fri, Mar 24, 2017 at 12:25 AM, Pavan Deolasee > wrote: > > > > > > On Thu, Mar 23, 2017 at 7:53 PM, Amit Kapila > > > > The general sense I've got > > here is

Re: [HACKERS] Backend crash on non-exclusive backup cancel

2017-03-24 Thread Teodor Sigaev
Thank you all, pushed Michael Paquier wrote: On Fri, Mar 24, 2017 at 1:45 AM, Teodor Sigaev wrote: I believe patch looks good and it's ready to commit. Thanks for the review! As I understand, it fixes bug introduced by commit 7117685461af50f50c03f43e6a622284c8d54694

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

2017-03-24 Thread Amit Langote
Hi Ashutosh, On 2017/03/23 21:48, Ashutosh Bapat wrote: >>> I have fixed all the issues reported till now. I've tried to fix your 0012 patch (Multi-level partitioned table expansion) considering your message earlier on this thread [1]. Especially the fact that no AppendRelInfo and RelOptInfo are

Re: [HACKERS] BUG: pg_dump generates corrupted gzip file in Windows

2017-03-24 Thread Kuntal Ghosh
On Fri, Mar 24, 2017 at 2:17 PM, Kuntal Ghosh wrote: > On Fri, Mar 24, 2017 at 12:35 PM, Craig Ringer wrote: >> On 24 March 2017 at 14:07, Kuntal Ghosh wrote: >>> On Fri, Mar 24, 2017 at 11:28 AM, Kuntal Ghosh >>>

Re: [HACKERS] Re: [COMMITTERS] pgsql: Fix and simplify check for whether we're running as Windows serv

2017-03-24 Thread Heikki Linnakangas
On 03/22/2017 07:44 PM, Robert Haas wrote: On Wed, Mar 22, 2017 at 10:13 AM, Alvaro Herrera wrote: Heikki Linnakangas wrote: I did some archeology, and found CheckTokenMembership() in MinGW's w32api packages version 3.14

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

2017-03-24 Thread Amit Kapila
On Fri, Mar 24, 2017 at 12:25 AM, Pavan Deolasee wrote: > > > On Thu, Mar 23, 2017 at 7:53 PM, Amit Kapila > wrote: >> >> > >> >> I am not sure on what basis user can set such parameters, it will be >> quite difficult to tune those parameters.

Re: [HACKERS] Logical replication existing data copy

2017-03-24 Thread Erik Rijkers
On 2017-03-24 10:45, Mark Kirkwood wrote: However one minor observation - as Michael Banck noted - the elapsed time for slave to catch up after running: $ pgbench -c8 -T600 bench on the master was (subjectively) much longer than for physical streaming replication. Is this expected? I think

Re: [HACKERS] Enabling parallelism for queries coming from SQL or other PL functions

2017-03-24 Thread Rafia Sabih
On Thu, Mar 23, 2017 at 11:26 PM, Robert Haas wrote: > > The changes to the plpgsql code don't look so good to me. The change > to exec_stmt_return_query fixes the same bug that I mentioned in the > email linked above, but only half of it -- it corrects the RETURN > QUERY

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

2017-03-24 Thread Rahila Syed
Hello Rushabh, Thank you for reviewing. Have addressed all your comments in the attached patch. The attached patch currently throws an error if a new partition is added after default partition. >Rather then adding check for default here, I think this should be handle inside >get_qual_for_list().

Re: [HACKERS] Logical replication existing data copy

2017-03-24 Thread Mark Kirkwood
On 24/03/17 12:32, Petr Jelinek wrote: On 24/03/17 00:14, Mark Kirkwood wrote: On 24/03/17 02:00, Peter Eisentraut wrote: On 3/21/17 21:38, Peter Eisentraut wrote: This patch is looking pretty good to me, modulo the failing pg_dump tests. Attached is a fixup patch. I have mainly updated

Re: [HACKERS] identity columns

2017-03-24 Thread Vitaly Burovoy
On 3/23/17, Peter Eisentraut wrote: > On 3/23/17 06:09, Vitaly Burovoy wrote: >> I think we'll end up with "DROP IDENTITY IF EXISTS" to avoid raising >> an exception and "ADD OR SET" if your grammar remains. > > That sounds reasonable to me. It would be great if

Re: [HACKERS] Logical replication existing data copy

2017-03-24 Thread Michael Banck
Hi, On Fri, Mar 24, 2017 at 12:32:28AM +0100, Petr Jelinek wrote: > Yes, I also forgot to check if the table actually exists on subscriber > when fetching them in CREATE SUBSCRIPTION (we have check during > replication but not there). > > Attached patches should fix both issues. I no longer get

Re: [HACKERS] BUG: pg_dump generates corrupted gzip file in Windows

2017-03-24 Thread Kuntal Ghosh
On Fri, Mar 24, 2017 at 12:35 PM, Craig Ringer wrote: > On 24 March 2017 at 14:07, Kuntal Ghosh wrote: >> On Fri, Mar 24, 2017 at 11:28 AM, Kuntal Ghosh >> wrote: >>> Hello, >>> In Windows, if one needs to take a

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

2017-03-24 Thread Amit Langote
Hi Ashutosh, On 2017/03/23 21:48, Ashutosh Bapat wrote: >>> I have fixed all the issues reported till now. In patch 0007, the following code in have_partkey_equi_join() looks potentially unsafe: /* * If the clause refers to different partition keys from * both

Re: [HACKERS] pageinspect and hash indexes

2017-03-24 Thread Amit Kapila
On Fri, Mar 24, 2017 at 9:50 AM, Ashutosh Sharma wrote: > On Fri, Mar 24, 2017 at 9:46 AM, Ashutosh Sharma > wrote: >> >> Thanks for reviewing my patch. I have removed the extra white space. >> Attached are both the patches. > > Sorry, I have

Re: [HACKERS] Parallel Append implementation

2017-03-24 Thread Amit Khandekar
On 24 March 2017 at 13:11, Rajkumar Raghuwanshi wrote: > I have given patch on latest pg sources (on commit > 457a4448732881b5008f7a3bcca76fc299075ac3). configure and make all > install ran successfully, but initdb failed with below error. >

Re: [HACKERS] segfault in hot standby for hash indexes

2017-03-24 Thread Amit Kapila
On Fri, Mar 24, 2017 at 12:25 PM, Ashutosh Sharma wrote: >> >> I think it would have been probably okay to use *int* for ntuples as >> that matches with what you are actually assigning in the function. > > okay, corrected it. Attached is newer version of patch. > Thanks,

Re: [HACKERS] ANALYZE command progress checker

2017-03-24 Thread vinayak
On 2017/03/23 15:04, Haribabu Kommi wrote: On Wed, Mar 22, 2017 at 8:11 PM, vinayak > wrote: On 2017/03/21 21:25, Haribabu Kommi wrote: On Tue, Mar 21, 2017 at 3:41 PM, vinayak

Re: [HACKERS] Parallel Append implementation

2017-03-24 Thread Rajkumar Raghuwanshi
On Fri, Mar 24, 2017 at 12:38 AM, Amit Khandekar wrote: > Meanwhile, attached is a WIP patch v10. The only change in this patch > w.r.t. the last patch (v9) is that this one has a new function defined > append_nonpartial_cost(). Just sending this to show how the algorithm

Re: [HACKERS] [Proposal] Make the optimiser aware of partitions ordering

2017-03-24 Thread Ashutosh Bapat
On Mon, Mar 20, 2017 at 8:33 PM, Ronan Dunklau wrote: > On lundi 20 mars 2017 15:52:03 CET Robert Haas wrote: >> On Mon, Mar 20, 2017 at 6:31 AM, Ronan Dunklau > wrote: >> > With range partitioning, we guarantee that each partition contains

Re: [HACKERS] BUG: pg_dump generates corrupted gzip file in Windows

2017-03-24 Thread Craig Ringer
On 24 March 2017 at 14:07, Kuntal Ghosh wrote: > On Fri, Mar 24, 2017 at 11:28 AM, Kuntal Ghosh > wrote: >> Hello, >> In Windows, if one needs to take a dump in plain text format (this is >> the default option, or can be specified using

Re: [HACKERS] segfault in hot standby for hash indexes

2017-03-24 Thread Ashutosh Sharma
>>> > I think this will work, but not sure if there is a merit to deviate >>> > from what btree does to handle this case. One thing I find slightly >>> > awkward in hash_xlog_vacuum_get_latestRemovedXid() is that you are >>> > using a number of tuples registered as part of fixed data >>> >

Re: [HACKERS] [POC] A better way to expand hash indexes.

2017-03-24 Thread Mithun Cy
On Fri, Mar 24, 2017 at 1:22 AM, Mithun Cy wrote: > Hi Amit please find the new patch The pageinspect.sgml has an example which shows the output of "hash_metapage_info()". Since we increase the spares array and eventually ovflpoint, I have updated the example with

Re: [HACKERS] create_unique_path and GEQO

2017-03-24 Thread Ashutosh Bapat
On Fri, Mar 24, 2017 at 11:52 AM, Rushabh Lathia wrote: > > > On Wed, Mar 22, 2017 at 3:43 PM, Ashutosh Bapat > wrote: >> >> Hi, >> In create_unique_path() there's comment >> /* >> * We must ensure path struct and subsidiary

Re: [HACKERS] error handling in RegisterBackgroundWorker

2017-03-24 Thread Michael Paquier
On Fri, Mar 24, 2017 at 1:20 PM, Peter Eisentraut wrote: > On 2/15/17 12:11, Robert Haas wrote: >> On Wed, Feb 15, 2017 at 11:30 AM, Peter Eisentraut >> wrote: >>> If RegisterBackgroundWorker() (the non-dynamic kind that is only

Re: [HACKERS] [PATCH] Transaction traceability - txid_status(bigint)

2017-03-24 Thread Craig Ringer
On 24 March 2017 at 02:29, Robert Haas wrote: > On Tue, Mar 21, 2017 at 11:35 PM, Craig Ringer wrote: >> Changes made per discussion. > > Committed 0001. Much appreciated. Here's the 2nd patch rebased on top of master, with the TAP test included

Re: [HACKERS] Logical decoding on standby

2017-03-24 Thread Craig Ringer
On 23 March 2017 at 17:44, Craig Ringer wrote: Minor update to catalog_xmin walsender patch to fix failure to parenthesize definition of PROCARRAY_PROC_FLAGS_MASK . This one's ready to go. Working on drop slots on DB drop now. -- Craig Ringer

Re: [HACKERS] create_unique_path and GEQO

2017-03-24 Thread Rushabh Lathia
On Wed, Mar 22, 2017 at 3:43 PM, Ashutosh Bapat < ashutosh.ba...@enterprisedb.com> wrote: > Hi, > In create_unique_path() there's comment > /* > * We must ensure path struct and subsidiary data are allocated in main > * planning context; otherwise GEQO memory management causes

Re: [HACKERS] BUG: pg_dump generates corrupted gzip file in Windows

2017-03-24 Thread Kuntal Ghosh
On Fri, Mar 24, 2017 at 11:28 AM, Kuntal Ghosh wrote: > Hello, > In Windows, if one needs to take a dump in plain text format (this is > the default option, or can be specified using -Fp) with some level of > compression (-Z[0-9]), an output file has to > be specified.

Re: [pgsql-www] [HACKERS] Small issue in online devel documentation build

2017-03-24 Thread Fabien COELHO
Hello Peter, I think the fix belongs into the web site CSS, so there is nothing to commit into PostgreSQL here. Indeed, the changes were only for the "remove nesting" solution. I will close the commit fest entry, but I have added a section to the open items list so we keep track of it.

<    1   2