Re: [HACKERS] UPDATE of partition key

2017-11-13 Thread David Rowley
On 10 November 2017 at 16:42, Amit Khandekar wrote: [ update-partition-key_v23.patch ] Hi Amit, Thanks for working on this. I'm looking forward to seeing this go in. So... I've signed myself up to review the patch, and I've just had a look at it, (after first reading

Re: [HACKERS] Parallel Hash take II

2017-11-13 Thread Thomas Munro
Hi Andres and Peter, Please see below for inline responses to your feedback. New patch attached. On Wed, Nov 8, 2017 at 10:01 AM, Andres Freund wrote: > +set min_parallel_table_scan_size = 0; > +set parallel_setup_cost = 0; > +-- Make a simple relation with well distributed

Re: [HACKERS] proposal: schema variables

2017-11-13 Thread Pavel Stehule
Hi 2017-11-13 13:15 GMT+01:00 Pavel Golub : > Hello, Pavel. > > You wrote: > > PS> Hi, > > PS> I propose a new database object - a variable. The variable is > PS> persistent object, that holds unshared session based not > PS> transactional in memory value of any type. Like

Re: [HACKERS] proposal: schema variables

2017-11-13 Thread Pavel Golub
Hello, Pavel. You wrote: PS> Hi, PS> I propose a  new database object - a variable. The variable is PS> persistent object, that holds unshared session based not PS> transactional in memory value of any type. Like variables in any PS> other languages. The persistence is required for possibility

Re: [HACKERS] Fix bloom WAL tap test

2017-11-13 Thread Alexander Korotkov
Hi! On Fri, Nov 10, 2017 at 9:12 PM, Tom Lane wrote: > I wrote: > > Is there anything we can do to cut the runtime of the TAP test to > > the point where running it by default wouldn't be so painful? > > As an experiment, I tried simply cutting the size of the test table

Re: [HACKERS] How to implement a SP-GiST index as a extension module?

2017-11-13 Thread Alexander Korotkov
Hi! On Mon, Nov 13, 2017 at 6:47 AM, Connor Wolf wrote: > Ok, I've managed to get my custom index working. > Good! It's all on github here: https://github.com/fake-name/pg-spgist_hamming, if > anyone else needs a fuzzy-image searching system > that can

Re: [HACKERS] Jsonb transform for pl/python

2017-11-13 Thread Anthony Bykov
On Thu, 09 Nov 2017 12:26:46 + Aleksander Alekseev wrote: > The following review has been posted through the commitfest > application: make installcheck-world: tested, failed > Implements feature: tested, passed > Spec compliant: tested, passed >

Re: [HACKERS] path toward faster partition pruning

2017-11-13 Thread Amit Langote
Horiguchi-san, Thanks for taking a look. Replying to all your emails here. On 2017/11/10 12:30, Kyotaro HORIGUCHI wrote: > In 0002, bms_add_range has a bit naive-looking loop > > + while (wordnum <= uwordnum) > + { > + bitmapword mask = (bitmapword) ~0; > + > +

Re: [HACKERS] 10beta1 sequence regression failure on sparc64

2017-11-13 Thread Jonathan Jacobson
Christoph, what beta2 change was it that fixed that problem? I'm having exactly the same regression test failure in version 10.1 (not beta) running on Solaris 9 Compiler used: GCC 4.6.4 CFLAGS: -O2 -m64 On 13/07/2017 20:05, Christoph Berg wrote: Re: To Andres Freund 2017-05-24

Re: [HACKERS] [Patch] Log SSL certificate verification errors

2017-11-13 Thread Laurenz Albe
Graham Leggett wrote: > Currently neither the server side nor the client side SSL certificate verify > callback does anything, leading to potential hair-tearing-out moments. > > The following patch to master implements logging of all certificate > verification failures, as well as (crucially)

Re: [HACKERS] Partition-wise aggregation/grouping

2017-11-13 Thread Konstantin Knizhnik
On 11.11.2017 23:29, Konstantin Knizhnik wrote: On 10/27/2017 02:01 PM, Jeevan Chalke wrote: Hi, Attached new patch-set here. Changes include: 1. Added separate patch for costing Append node as discussed up-front in the patch-set. 2. Since we now cost Append node, we don't need

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

2017-11-13 Thread Alexander Kuzmenkov
I've pushed the executor part of this, but mostly not the planner part, because I didn't think the latter was anywhere near ready for prime time: the regression test changes it was causing were entirely bogus. Hi Tom, Thanks for the commit and the explanation. I'll try to address your

Re: [HACKERS] Building PL/Perl with ActiveState Perl 5.22 and MSVC

2017-11-12 Thread Noah Misch
On Sat, Mar 26, 2016 at 03:43:21PM +0300, Victor Wagner wrote: > It turns out that while ActiveState seems to drop support of embedding > their perl into msvc-compiled appications, there are just few minor > issues which prevent PL-perl to compile. > > 1. ActiveState Perl doesn't ship MSVC-build

Re: [HACKERS] Parallel Append implementation

2017-11-12 Thread Amit Khandekar
Thanks a lot Robert for the patch. I will have a look. Quickly tried to test some aggregate queries with a partitioned pgbench_accounts table, and it is crashing. Will get back with the fix, and any other review comments. Thanks -Amit Khandekar On 9 November 2017 at 23:44, Robert Haas

Re: [HACKERS] Variable substitution in psql backtick expansion

2017-11-12 Thread Fabien COELHO
Hello Tom & Michaël, I think this patch should be rejected. +1 for rejection [...] The noes have it! Note that the motivation was really symmetric completion: fabien=# \echo :VERSION_NAME 11devel fabien=# \echo :VERSION_NUM 11 fabien=# \echo :VERSION PostgreSQL 11devel on

Re: [HACKERS] Proposal: Improve bitmap costing for lossy pages

2017-11-12 Thread Dilip Kumar
On Sat, Nov 11, 2017 at 3:25 AM, Robert Haas wrote: > On Thu, Nov 9, 2017 at 3:55 AM, amul sul wrote: >> It took me a little while to understand this calculation. You have moved >> this >> code from tbm_create(), but I think you should move the

Re: [HACKERS] How to implement a SP-GiST index as a extension module?

2017-11-12 Thread Connor Wolf
Ok, I've managed to get my custom index working. It's all on github here: https://github.com/fake-name/pg-spgist_hamming, if anyone else needs a fuzzy-image searching system that can integrate into postgresql.. It should be a pretty good basis for anyone else to use if they want to implement a

Re: [HACKERS] Incorrect comment for build_child_join_rel

2017-11-12 Thread Etsuro Fujita
(2017/11/11 0:58), Robert Haas wrote: On Fri, Nov 10, 2017 at 4:34 AM, Etsuro Fujita wrote: Here is a small patch for $Subject. Good catch. Committed. Thanks! Best regards, Etsuro Fujita -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)

Re: [HACKERS] Variable substitution in psql backtick expansion

2017-11-12 Thread Michael Paquier
On Mon, Nov 13, 2017 at 5:21 AM, Tom Lane wrote: > Pavel Stehule writes: >> [ psql-server-version-2.patch ] > > I think this patch should be rejected. It adds no new functionality; > you can get the string in question with "select version()".

Re: [HACKERS] PATCH: psql tab completion for SELECT

2017-11-12 Thread Michael Paquier
On Mon, Nov 13, 2017 at 5:13 AM, David Fetter wrote: > Please add this to the upcoming (2018-01) commitfest at > https://commitfest.postgresql.org/ You may want to scan the following thread as well:

Re: [HACKERS] GSoC 2017: Foreign Key Arrays

2017-11-12 Thread Andreas Karlsson
On 11/10/2017 01:47 AM, Mark Rofail wrote: I am sorry for the late reply There is no reason for you to be. It did not take you 6 weeks to do a review. :) Thanks for this new version. == Functional review >1) MATCH FULL does not seem to care about NULLS in arrays. In the example

Re: [HACKERS] [bug fix] postgres.exe crashes with access violation on Windows while starting up

2017-11-12 Thread Michael Paquier
On Mon, Nov 13, 2017 at 7:37 AM, Noah Misch wrote: > On Fri, Nov 03, 2017 at 11:10:14AM +, Michael Paquier wrote: >> I am >> switching the patch as ready for committer, I definitely agree that >> you are taking the write approach here. s/write/right/. > Committed both

Re: [HACKERS] [bug fix] postgres.exe crashes with access violation on Windows while starting up

2017-11-12 Thread Noah Misch
On Sat, Oct 28, 2017 at 03:43:02PM -0700, Michael Paquier wrote: > couldn't we envisage to just use > malloc? pgwin32_message_to_UTF16() is called in two places in elog.c, > and there is a full control on the error code paths. Switching to malloc is feasible, but it wouldn't enable PostgreSQL to

Re: [HACKERS] LDAPS

2017-11-12 Thread Thomas Munro
On Sat, Nov 4, 2017 at 2:05 AM, Thomas Munro wrote: > I've only tested the attached lightly on FreeBSD + OpenLDAP and > don't know if it'll work elsewhere. While rebasing this on top of a nearby changes, I looked into how portable it is. The previous version

Re: [HACKERS] Variable substitution in psql backtick expansion

2017-11-12 Thread Tom Lane
Pavel Stehule writes: > [ psql-server-version-2.patch ] I think this patch should be rejected. It adds no new functionality; you can get the string in question with "select version()". Moreover, you've been able to do that for lo these many years. Any application that

Re: [HACKERS] PATCH: psql tab completion for SELECT

2017-11-12 Thread David Fetter
On Mon, Nov 06, 2017 at 05:28:55PM +1300, Edmund Horner wrote: > Hi pgsql-hackers, > > Here's a little draft patch to add *some* tab completion ability for > SELECT in psql. I have often missed the ability, especially with > invocations of utility functions. > > It would be nice to be able to

Re: [HACKERS] Row Level Security Bug ?

2017-11-12 Thread Joe Conway
On 11/12/2017 10:17 AM, Andrea Adami wrote: > if i do: > > SET ROLE 'manage...@scuola-1.it ' [SELECT from table] > i see only one row (as expected) > > but when i do: [SELECT from VIEWs] > I see all the rows always > > this way i lack all the row level security

Re: [HACKERS] Fix number skipping in to_number

2017-11-12 Thread Tom Lane
Oliver Ford writes: > [ 0001-apply-number-v3.patch ] I looked at this patch briefly and have a couple of comments: * It seems entirely wrong to be matching to L_thousands_sep in the NUM_COMMA case; that format code is by definition not locale aware, so it should be matching to

Re: [HACKERS] New gist vacuum.

2017-11-12 Thread Andrey Borodin
Hello! > 31 янв. 2016 г., в 17:18, Alvaro Herrera > написал(а): > > Костя Кузнецов wrote: >> Thank you, Jeff.I reworking patch now. All // warning will >> be deleted.About memory consumption new version will control size >> of stack and will operate with map of

Re: [HACKERS] PSA: don't be in a hurry to update to XCode 9.0

2017-11-12 Thread Tom Lane
Dave Cramer writes: > Did you ever find a solution to this without updating ? No. I filed a bug report which Apple seems uninterested in, perhaps not too surprisingly. regards, tom lane -- Sent via pgsql-hackers mailing list

Re: [HACKERS] PSA: don't be in a hurry to update to XCode 9.0

2017-11-12 Thread Dave Cramer
Tom, Did you ever find a solution to this without updating ? Dave Cramer da...@postgresintl.com www.postgresintl.com On 21 September 2017 at 13:01, Dave Cramer wrote: > Too late I just stumbled over this as well! > > Dave Cramer > > da...@postgresintl.com >

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

2017-11-12 Thread Andrey Borodin
Hi! +1 for pushing this. I'm really looking forward to see this in 11. > 31 окт. 2017 г., в 13:21, Anastasia Lubennikova > написал(а): > > Updated version is attached. It applies to the commit > e4fbf22831c2bbcf032ee60a327b871d2364b3f5. > The first patch patch

Re: [HACKERS] A GUC to prevent leader processes from running subplans?

2017-11-12 Thread Thomas Munro
On Sun, Nov 12, 2017 at 8:51 PM, Amit Kapila wrote: > On Sun, Nov 12, 2017 at 9:18 AM, Thomas Munro > wrote: >> How about parallel_leader_participation = on|off? The attached >> version has it that way, and adds regression tests to

Re: [HACKERS] A GUC to prevent leader processes from running subplans?

2017-11-11 Thread Amit Kapila
On Sun, Nov 12, 2017 at 9:18 AM, Thomas Munro wrote: > On Sat, Oct 21, 2017 at 8:09 AM, Robert Haas wrote: >> On Tue, Oct 17, 2017 at 7:27 AM, Thomas Munro >> wrote: >> >> I don't think overloading

Re: [HACKERS] GatherMerge misses to push target list

2017-11-11 Thread Amit Kapila
On Sat, Nov 11, 2017 at 5:05 PM, Robert Haas wrote: > On Mon, Sep 18, 2017 at 7:02 AM, Rushabh Lathia > wrote: >>> In that case, can you please mark the patch [1] as ready for committer in >>> CF app >> >> Done. > > I think this patch is mostly

Re: [HACKERS] possible encoding issues with libxml2 functions

2017-11-11 Thread Pavel Stehule
2017-11-11 21:19 GMT+01:00 Noah Misch : > On Sun, Nov 05, 2017 at 06:10:04PM +0100, Pavel Stehule wrote: > > Hi > > > > 2017-11-05 4:07 GMT+01:00 Noah Misch : > > > > > On Tue, Oct 17, 2017 at 06:06:40AM +0200, Pavel Stehule wrote: > > > > Please, if you can,

Re: [HACKERS] A GUC to prevent leader processes from running subplans?

2017-11-11 Thread Thomas Munro
On Sat, Oct 21, 2017 at 8:09 AM, Robert Haas wrote: > On Tue, Oct 17, 2017 at 7:27 AM, Thomas Munro > wrote: >> While testing parallelism work I've wanted to be able to prevent >> gather nodes from running the plan in the leader process, and

Re: [HACKERS] pgbench regression test failure

2017-11-11 Thread Steve Singer
The following review has been posted through the commitfest application: make installcheck-world: tested, failed Implements feature: not tested Spec compliant: not tested Documentation:not tested This causes the pgbench tests to fail (consistently) with not ok 194 -

Re: [HACKERS] Simplify ACL handling for large objects and removal of superuser() checks

2017-11-11 Thread Mark Dilger
> On Nov 10, 2017, at 3:58 PM, Stephen Frost wrote: > > Michael, Tom, > > * Michael Paquier (michael.paqu...@gmail.com) wrote: >> On Fri, Nov 10, 2017 at 10:00 AM, Tom Lane wrote: >>> Stephen Frost writes: I'm guessing no,

Re: [HACKERS] Partition-wise aggregation/grouping

2017-11-11 Thread Konstantin Knizhnik
On 10/27/2017 02:01 PM, Jeevan Chalke wrote: Hi, Attached new patch-set here. Changes include: 1. Added separate patch for costing Append node as discussed up-front in the patch-set. 2. Since we now cost Append node, we don't need partition_wise_agg_cost_factor GUC. So removed that. The

Re: [HACKERS] possible encoding issues with libxml2 functions

2017-11-11 Thread Noah Misch
On Sun, Nov 05, 2017 at 06:10:04PM +0100, Pavel Stehule wrote: > Hi > > 2017-11-05 4:07 GMT+01:00 Noah Misch : > > > On Tue, Oct 17, 2017 at 06:06:40AM +0200, Pavel Stehule wrote: > > > Please, if you can, try it write. I am little bit lost :) > > > > I'm attaching the patch I

Re: [HACKERS] Simplify ACL handling for large objects and removal of superuser() checks

2017-11-11 Thread Tom Lane
Stephen Frost writes: > * Michael Paquier (michael.paqu...@gmail.com) wrote: >> Forcing an admin to give full superuser rights to one user willing to >> work only on LOs import and export is a wrong concept. > The problem I have with this is that 'full superuser rights'

Re: [HACKERS] [PATCH] A hook for session start

2017-11-11 Thread Fabrízio de Royes Mello
On Sat, Nov 11, 2017 at 6:48 AM, Michael Paquier wrote: > > On Sat, Nov 11, 2017 at 12:49 AM, Fabrízio de Royes Mello > wrote: > > New version attached. > > Thanks. > > +++ b/src/test/modules/Makefile > test_extensions \ > +

Re: [HACKERS] parallelize queries containing initplans

2017-11-11 Thread Amit Kapila
On Sat, Nov 11, 2017 at 12:15 AM, Robert Haas wrote: > On Tue, Nov 7, 2017 at 4:45 AM, Amit Kapila wrote: >> As mentioned, changed the status of the patch in CF app. > > I spent some time reviewing this patch today and found myself still > quite

Re: [HACKERS] [PROPOSAL] Temporal query processing with range types

2017-11-11 Thread Robert Haas
On Fri, Oct 6, 2017 at 3:22 PM, Mike Rylander wrote: > I've also been following this feature with great interest, and would > definitely throw whatever tiny weight I have, sitting out here in the > the peanut gallery, behind accepting the ALIGN and NORMALIZE syntax. > I

Re: [HACKERS] GatherMerge misses to push target list

2017-11-11 Thread Robert Haas
On Mon, Sep 18, 2017 at 7:02 AM, Rushabh Lathia wrote: >> In that case, can you please mark the patch [1] as ready for committer in >> CF app > > Done. I think this patch is mostly correct, but I think the change to planner.c isn't quite right. ordered_rel->reltarget

Re: [HACKERS] [Patch] Log SSL certificate verification errors

2017-11-11 Thread Graham Leggett
On 11 Nov 2017, at 6:23 AM, Michael Paquier wrote: >> Currently neither the server side nor the client side SSL certificate verify >> callback does anything, leading to potential hair-tearing-out moments. >> >> The following patch to master implements logging of all

Re: [HACKERS] [PATCH] A hook for session start

2017-11-11 Thread Michael Paquier
On Sat, Nov 11, 2017 at 12:49 AM, Fabrízio de Royes Mello wrote: > New version attached. Thanks. +++ b/src/test/modules/Makefile test_extensions \ + test_session_hooks \ test_parser Better if that's in alphabetical order. That's a nit

Re: [HACKERS] [Patch] Log SSL certificate verification errors

2017-11-10 Thread Michael Paquier
On Sat, Nov 11, 2017 at 3:34 AM, Graham Leggett wrote: > Currently neither the server side nor the client side SSL certificate verify > callback does anything, leading to potential hair-tearing-out moments. > > The following patch to master implements logging of all certificate

Re: [HACKERS] pg_upgrade to clusters with a different WAL segment size

2017-11-10 Thread Michael Paquier
On Sat, Nov 11, 2017 at 12:46 AM, Bossart, Nathan wrote: > Allowing changes to the WAL segment size during pg_upgrade seems like a > nice way to avoid needing a dump and load, so I would like to propose > adding support for this. I'd be happy to submit patches for this in

Re: [HACKERS] Simplify ACL handling for large objects and removal of superuser() checks

2017-11-10 Thread Michael Paquier
On Sat, Nov 11, 2017 at 12:50 AM, Robert Haas wrote: > On Fri, Nov 10, 2017 at 10:34 AM, Tom Lane wrote: >> I think as far as that goes, we can just change to "Therefore, by default >> their use is restricted ...". Then I suggest adding a para >>

Re: [HACKERS] Simplify ACL handling for large objects and removal of superuser() checks

2017-11-10 Thread Stephen Frost
Michael, Tom, * Michael Paquier (michael.paqu...@gmail.com) wrote: > On Fri, Nov 10, 2017 at 10:00 AM, Tom Lane wrote: > > Stephen Frost writes: > >> I'm guessing no, which essentially means that *we* consider access to > >> lo_import/lo_export to be

Re: [HACKERS] Proposal: Improve bitmap costing for lossy pages

2017-11-10 Thread Robert Haas
On Thu, Nov 9, 2017 at 3:55 AM, amul sul wrote: > It took me a little while to understand this calculation. You have moved this > code from tbm_create(), but I think you should move the following > comment as well: I made an adjustment that I hope will address your concern

Re: [HACKERS] LDAP URI decoding bugs

2017-11-10 Thread Thomas Munro
On Sat, Nov 11, 2017 at 8:37 AM, Peter Eisentraut wrote: > On 11/6/17 23:30, Michael Paquier wrote: >> On Fri, Nov 3, 2017 at 12:57 PM, Thomas Munro >> wrote: >>> 1. If you set up a pg_hba.conf with a URL that lacks a base DN or

Re: [HACKERS] parallelize queries containing initplans

2017-11-10 Thread Tom Lane
Robert Haas writes: > On Fri, Nov 10, 2017 at 2:24 PM, Tom Lane wrote: >> Also, I wonder whether the InvalidOid hack in SS_assign_special_param >> requires commentary. It might be safer to use a valid type OID there, >> perhaps VOIDOID or INTERNALOID.

Re: [HACKERS] Planning counters in pg_stat_statements

2017-11-10 Thread Thomas Munro
On Tue, Nov 7, 2017 at 6:39 PM, Tsunakawa, Takayuki wrote: > From: pgsql-hackers-ow...@postgresql.org >> [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Thomas Munro >> I have often wanted $SUBJECT and was happy to find that Fujii-san had posted >> a patch

Re: [HACKERS] parallelize queries containing initplans

2017-11-10 Thread Robert Haas
On Fri, Nov 10, 2017 at 2:24 PM, Tom Lane wrote: > Robert Haas writes: >> I decided to try instead teaching the planner to keep track of the >> types of PARAM_EXEC parameters as they were created, and that seems to >> work fine. See 0001, attached. > >

Re: [HACKERS] LDAP URI decoding bugs

2017-11-10 Thread Peter Eisentraut
On 11/6/17 23:30, Michael Paquier wrote: > On Fri, Nov 3, 2017 at 12:57 PM, Thomas Munro > wrote: >> 1. If you set up a pg_hba.conf with a URL that lacks a base DN or >> hostname, hba.c will segfault on startup when it tries to pstrdup a >> null pointer. Examples:

Re: [HACKERS] Restrict concurrent update/delete with UPDATE of partition key

2017-11-10 Thread Robert Haas
On Wed, Sep 27, 2017 at 7:07 AM, amul sul wrote: > Attaching POC patch that throws an error in the case of a concurrent update > to an already deleted tuple due to UPDATE of partition key[1]. > > In a normal update new tuple is linked to the old one via ctid forming > a chain

Re: [HACKERS] parallelize queries containing initplans

2017-11-10 Thread Tom Lane
Robert Haas writes: > I decided to try instead teaching the planner to keep track of the > types of PARAM_EXEC parameters as they were created, and that seems to > work fine. See 0001, attached. I did not look at the other part, but 0001 looks reasonable to me. I might

Re: [HACKERS] Add some const decorations to prototypes

2017-11-10 Thread Peter Eisentraut
On 11/10/17 10:29, Fabien COELHO wrote: > Or basically all is fine, I'm just nitpicking for nothing, shame on me. > > As I said, I rather like more precise declarations. committed -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA,

Re: [HACKERS] parallelize queries containing initplans

2017-11-10 Thread Robert Haas
On Tue, Nov 7, 2017 at 4:45 AM, Amit Kapila wrote: > As mentioned, changed the status of the patch in CF app. I spent some time reviewing this patch today and found myself still quite uncomfortable with the fact that it was adding execution-time work to track the types

Re: [HACKERS] Add some const decorations to prototypes

2017-11-10 Thread Peter Eisentraut
On 11/10/17 11:42, Fabien COELHO wrote: > After your explanation, and on third thoughts, ISTM that the assignment > should not include "const" in the explicit cast, i.e., use > >extern void * msg_func(void); >const char * msg = (char *) msg_func(); > > The variable or field is constant,

Re: [HACKERS] Fix bloom WAL tap test

2017-11-10 Thread Tom Lane
I wrote: > Is there anything we can do to cut the runtime of the TAP test to > the point where running it by default wouldn't be so painful? As an experiment, I tried simply cutting the size of the test table 10X: diff --git a/contrib/bloom/t/001_wal.pl b/contrib/bloom/t/001_wal.pl index

Re: [HACKERS] Fix bloom WAL tap test

2017-11-10 Thread Tom Lane
Michael Paquier writes: > On Thu, Nov 9, 2017 at 7:51 PM, Alexander Korotkov > wrote: >> OK, then so be it :) > Thanks for the new version. This one, as well as the switch to > psql_safe in >

Re: [HACKERS] Add some const decorations to prototypes

2017-11-10 Thread Tom Lane
Fabien COELHO writes: >> LWLockTrancheArray = (char **) >> MemoryContextAllocZero(TopMemoryContext, >> LWLockTranchesAllocated * sizeof(char *)); > After your explanation, and on third thoughts, ISTM that the assignment > should not include

Re: [HACKERS] Add some const decorations to prototypes

2017-11-10 Thread Fabien COELHO
Hello Tom, ISTM That there is still at least one strange cast: +static const char **LWLockTrancheArray = NULL; + LWLockTrancheArray = (const char **) // twice These are not cases of "cheating". This is just the return value of a memory allocation function being cast from

Re: [HACKERS] Incorrect comment for build_child_join_rel

2017-11-10 Thread Robert Haas
On Fri, Nov 10, 2017 at 4:34 AM, Etsuro Fujita wrote: > Here is a small patch for $Subject. Good catch. Committed. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list

Re: [HACKERS] proposal: psql command \graw

2017-11-10 Thread Pavel Stehule
2017-11-10 16:38 GMT+01:00 Fabien COELHO : > > Hello, > > Maybe I'm missing something, but it looks that it could be made to work >>> without adding another boolean. >>> >> >> The tuples only cannot be disabled, because then other parts print number >> of rows >> >>

Re: [HACKERS] Aggregates push-down to partitions

2017-11-10 Thread Konstantin Knizhnik
On 10.11.2017 12:15, Ashutosh Bapat wrote: Maybe in this thread[1] your described problem are solved through introducing Parallel Append node? 1. https://www.postgresql.org/message-id/CAJ3gD9dy0K_E8r727heqXoBmWZ83HwLFwdcaSSmBQ1%2BS%2BvRuUQ%40mail.gmail.com You may want to review [2] and [3]

Re: [HACKERS] Add some const decorations to prototypes

2017-11-10 Thread Tom Lane
Fabien COELHO writes: >>> ISTM That there is still at least one strange cast: +static const char **LWLockTrancheArray = NULL; + LWLockTrancheArray = (const char **) // twice >> These are not cases of "cheating". This is just the return value of a >>

Re: [HACKERS] Simplify ACL handling for large objects and removal of superuser() checks

2017-11-10 Thread Robert Haas
On Fri, Nov 10, 2017 at 10:34 AM, Tom Lane wrote: > I think as far as that goes, we can just change to "Therefore, by default > their use is restricted ...". Then I suggest adding a para > after that, with wording along the lines of > > It is possible to GRANT use of

Re: [HACKERS] [PATCH] A hook for session start

2017-11-10 Thread Fabrízio de Royes Mello
On Thu, Nov 9, 2017 at 9:08 PM, Michael Paquier wrote: > > On Fri, Nov 10, 2017 at 2:32 AM, Fabrízio de Royes Mello > wrote: > > On Thu, Nov 9, 2017 at 12:09 AM, Michael Paquier < michael.paqu...@gmail.com> > > wrote: > >> +++

Re: [HACKERS] proposal: psql command \graw

2017-11-10 Thread Fabien COELHO
Hello, Maybe I'm missing something, but it looks that it could be made to work without adding another boolean. The tuples only cannot be disabled, because then other parts print number of rows postgres=# \pset format unaligned Output format is unaligned. postgres=# select 10 as a, 20 as b;

Re: [HACKERS] Simplify ACL handling for large objects and removal of superuser() checks

2017-11-10 Thread Tom Lane
Michael Paquier writes: > That will not sound much as a surprise as I spawned the original > thread, but like Robert I understand that getting rid of all superuser > checks is a goal that we are trying to reach to allow admins to have > more flexibility in handling

Re: [HACKERS] Add some const decorations to prototypes

2017-11-10 Thread Fabien COELHO
Would it make sense that the function returns "const void *", i.e. the cast is not on the const part but on the pointer type part? Or maybe you do not really need a cast, the following code does not generate any warning when compiled with clang & gcc. #include // const void * would be

Re: [HACKERS] Add some const decorations to prototypes

2017-11-10 Thread Fabien COELHO
ISTM That there is still at least one strange cast: +static const char **LWLockTrancheArray = NULL; + LWLockTrancheArray = (const char **) // twice These are not cases of "cheating". This is just the return value of a memory allocation function being cast from void * to

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

2017-11-10 Thread Mark Dilger
> On Sep 12, 2017, at 2:06 PM, Tomas Vondra > wrote: > > Attached is an updated version of the patch, dealing with fallout of > 821fb8cdbf700a8aadbe12d5b46ca4e61be5a8a8 which touched the SGML > documentation for CREATE STATISTICS. Your patches need updating.

Re: [HACKERS] [POC] Faster processing at Gather node

2017-11-10 Thread Robert Haas
On Fri, Nov 10, 2017 at 5:44 AM, Amit Kapila wrote: > I am seeing the assertion failure as below on executing the above > mentioned Create statement: > > TRAP: FailedAssertion("!(!(tup->t_data->t_infomask & 0x0008))", File: > "heapam.c", Line: 2634) > server closed the

Re: [HACKERS] Variable substitution in psql backtick expansion

2017-11-10 Thread Pavel Stehule
Hi I am sending a review of last patch psql-server-version-1.patch.gz This patch is trivial - the most big problem is choosing correct name for GUC. I am thinking so server_version_raw is acceptable. I had to fix doc - see attached updated patch All tests passed. I'll mark this patch as ready

Re: [HACKERS] Add some const decorations to prototypes

2017-11-10 Thread Peter Eisentraut
On 11/4/17 16:50, Fabien COELHO wrote: >>> Just leave it as char*. If you change the endptr argument you're going to >>> force every call site to change their return variable, and some of them >>> would end up having to cast away the const on their end. >> >> OK, here is an updated patch with the

Re: [HACKERS] Transform for pl/perl

2017-11-10 Thread Pavel Stehule
Hi 2017-10-24 14:27 GMT+02:00 Anthony Bykov : > There are some moments I should mention: > 1. {"1":1}::jsonb is transformed into HV {"1"=>"1"}, while > ["1","2"]::jsonb is transformed into AV ["1", "2"] > > 2. If there is a numeric value appear in jsonb, it will be

Re: [HACKERS] pg_basebackup --progress output for batch execution

2017-11-10 Thread Martín Marqués
Hi, Thanks for having a look at this patch. 2017-11-09 20:55 GMT-03:00 Jeff Janes : > On Fri, Sep 29, 2017 at 4:00 PM, Martin Marques > wrote: >> >> Hi, >> >> Some time ago I had to work on a system where I was cloning a standby >> using

Re: [HACKERS] Another oddity in handling of WCO constraints in postgres_fdw

2017-11-10 Thread Etsuro Fujita
(2017/11/01 11:16), Robert Haas wrote: On Wed, Oct 4, 2017 at 5:58 PM, Ashutosh Bapat wrote: The view with WCO is local but the modification which violates WCO is being made on remote server by a trigger on remote table. Trying to control that doesn't seem to

Re: [HACKERS] Runtime Partition Pruning

2017-11-10 Thread amul sul
On Thu, Nov 9, 2017 at 4:48 PM, Beena Emerson wrote: > Hello all, > > Here is the updated patch which is rebased over v10 of Amit Langote's > path towards faster pruning patch [1]. It modifies the PartScanKeyInfo > struct to hold expressions which is then evaluated by the

Re: [HACKERS] [POC] Faster processing at Gather node

2017-11-10 Thread Amit Kapila
On Fri, Nov 10, 2017 at 9:48 AM, Amit Kapila wrote: > On Fri, Nov 10, 2017 at 8:36 AM, Robert Haas wrote: >> On Thu, Nov 9, 2017 at 9:31 PM, Amit Kapila wrote: >>> Have you set force_parallel_mode=regress; before running

Re: [HACKERS] pg_basebackup --progress output for batch execution

2017-11-10 Thread Arthur Zakirov
On Thu, Nov 09, 2017 at 03:55:36PM -0800, Jeff Janes wrote: > > I think I agree with Arthur that I'd rather have the decision made by > inspecting whether output is going to a tty, rather than by adding another > command line option. But maybe that is not detected robustly enough across > all

Re: [HACKERS] Aggregates push-down to partitions

2017-11-10 Thread Ashutosh Bapat
On Fri, Nov 10, 2017 at 12:20 AM, Maksim Milyutin wrote: > Hi Konstantin! >> I wonder if somebody already investigate this problem or working in this >> direction. >> May be there are already some patches proposed? >> I have searched hackers archive, but didn't find

Re: [HACKERS] UPDATE of partition key

2017-11-09 Thread Amit Khandekar
On 9 November 2017 at 09:27, Thomas Munro wrote: > On Wed, Nov 8, 2017 at 5:57 PM, Amit Khandekar wrote: >> On 8 November 2017 at 07:55, Thomas Munro >> wrote: >>> On Tue, Nov 7, 2017 at 8:03 AM, Robert Haas

Re: [HACKERS] path toward faster partition pruning

2017-11-09 Thread David Rowley
On 10 November 2017 at 16:30, Kyotaro HORIGUCHI wrote: > In 0002, bms_add_range has a bit naive-looking loop > > + while (wordnum <= uwordnum) > + { > + bitmapword mask = (bitmapword) ~0; > + > + /* If working on the lower

Re: [HACKERS] proposal: psql command \graw

2017-11-09 Thread Pavel Stehule
2017-11-10 8:12 GMT+01:00 Fabien COELHO : > > ISTM that you can remove "force_column_header" and just set "tuple_only" >>> to what you need, that is you do not need to change anything in function >>> "print_unaligned_text". >>> >> >> Last point is not possible - I would not

Re: [HACKERS] proposal: psql command \graw

2017-11-09 Thread Fabien COELHO
ISTM that you can remove "force_column_header" and just set "tuple_only" to what you need, that is you do not need to change anything in function "print_unaligned_text". Last point is not possible - I would not to break original tuple only mode. Hmmm... I do not understand. I can see only

Re: [HACKERS] path toward faster partition pruning

2017-11-09 Thread Kyotaro HORIGUCHI
Hello, At Fri, 10 Nov 2017 14:44:55 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI wrote in <20171110.144455.117208639.horiguchi.kyot...@lab.ntt.co.jp> > > Those two conditions are not orthogonal. Maybe something like > > following seems more understantable. >

Re: [HACKERS] proposal: psql command \graw

2017-11-09 Thread Pavel Stehule
2017-11-09 21:12 GMT+01:00 Pavel Stehule : > > > 2017-11-09 21:03 GMT+01:00 Fabien COELHO : > >> >> Hello Pavel, >> >> I hope so I fixed all mentioned issues. >>> >> >> Patch applies with a warning: >> >> > git apply ~/psql-graw-2.patch >>

Re: [HACKERS] path toward faster partition pruning

2017-11-09 Thread Kyotaro HORIGUCHI
Ooops! The following comment is wrong. Please ignore it. At Fri, 10 Nov 2017 14:38:11 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI wrote in <20171110.143811.97616847.horiguchi.kyot...@lab.ntt.co.jp> > Those two conditions are not orthogonal. Maybe something

Re: [HACKERS] [POC] hash partitioning

2017-11-09 Thread amul sul
On Fri, Nov 10, 2017 at 4:41 AM, Robert Haas wrote: > On Wed, Nov 1, 2017 at 6:16 AM, amul sul wrote: >> Fixed in the 0003 patch. > > I have committed this patch set with the attached adjustments. > Thanks a lot for your support & a ton of thanks to all

Re: [HACKERS] path toward faster partition pruning

2017-11-09 Thread Kyotaro HORIGUCHI
Hello, this is the second part of the review. At Fri, 10 Nov 2017 12:30:00 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI wrote in <20171110.123000.151902771.horiguchi.kyot...@lab.ntt.co.jp> > In 0002, bms_add_range has a bit naive-looking loop > In 0003, In

Re: [HACKERS] [POC] Faster processing at Gather node

2017-11-09 Thread Amit Kapila
On Fri, Nov 10, 2017 at 8:36 AM, Robert Haas wrote: > On Thu, Nov 9, 2017 at 9:31 PM, Amit Kapila wrote: >> Have you set force_parallel_mode=regress; before running the >> statement? > > Yes, I tried that first. > >> If so, then why you need to

Re: [HACKERS] path toward faster partition pruning

2017-11-09 Thread Kyotaro HORIGUCHI
Hello, At Fri, 10 Nov 2017 09:34:57 +0900, Amit Langote wrote in <5fcb1a9f-b4ad-119d-14c7-282c30c7f...@lab.ntt.co.jp> > Hi Amul. > > On 2017/11/09 20:05, amul sul wrote: > > On Mon, Nov 6, 2017 at 3:31 PM, Amit Langote > > wrote:

Re: [HACKERS] [POC] Faster processing at Gather node

2017-11-09 Thread Robert Haas
On Thu, Nov 9, 2017 at 9:31 PM, Amit Kapila wrote: > Have you set force_parallel_mode=regress; before running the > statement? Yes, I tried that first. > If so, then why you need to tune other parallel query > related parameters? Because I couldn't get it to break the

  1   2   3   4   5   6   7   8   9   10   >