Re: [HACKERS] UPDATE of partition key

2017-09-17 Thread Dilip Kumar
On Fri, Sep 15, 2017 at 4:55 PM, Amit Khandekar wrote: > On 12 September 2017 at 12:39, Amit Khandekar wrote: >> On 12 September 2017 at 11:57, Dilip Kumar wrote: >>> On Tue, Sep 12, 2017 at 11:15 AM, Amit Khandekar

Re: [HACKERS] valgrind vs. shared typmod registry

2017-09-17 Thread Thomas Munro
On Sun, Sep 17, 2017 at 8:49 AM, Thomas Munro wrote: > On Sun, Sep 17, 2017 at 7:42 AM, Thomas Munro > wrote: >> On Sun, Sep 17, 2017 at 12:30 AM, Tomas Vondra >> wrote: >>> I've been running some

Re: [HACKERS] Small patch for pg_basebackup argument parsing

2017-09-17 Thread Ryan Murphy
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: tested, passed Spec compliant: tested, passed Documentation:not tested I applied this patch via patch -p1. (Had an issue using git

Re: [HACKERS] Parallel Append implementation

2017-09-17 Thread Amit Khandekar
On 16 September 2017 at 11:45, Amit Kapila wrote: > On Thu, Sep 14, 2017 at 8:30 PM, Amit Khandekar > wrote: >> On 11 September 2017 at 18:55, Amit Kapila wrote: >>> >>> How? See, if you have four partial subpaths

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

2017-09-17 Thread Dilip Kumar
On Sun, Sep 17, 2017 at 4:34 PM, Dilip Kumar wrote: >> >> I have repeated one of the tests after fixing the problems pointed by >> you but this time results are not that impressive. Seems like below >> check was the problem in the previous patch >> >>if (tbm->nentries

[HACKERS] pg_control_recovery() return value when not in recovery

2017-09-17 Thread Andres Freund
Hi, Just noticed that we're returning the underlying values for pg_control_recovery() without any checks: postgres[14388][1]=# SELECT * FROM pg_control_recovery(); ┌──┬───┬──┬┬───┐ │

[HACKERS] parallel.c oblivion of worker-startup failures

2017-09-17 Thread Amit Kapila
Sometime back Tom Lane has reported [1] about $Subject. I have looked into the issue and found that the problem is not only with parallel workers but with general background worker machinery as well in situations where fork or some such failure occurs. The first problem is that after we register

Re: [HACKERS] Automatic testing of patches in commit fest

2017-09-17 Thread Thomas Munro
On Mon, Sep 18, 2017 at 2:39 PM, Andres Freund wrote: > E.g. very little of the new stuff in > https://codecov.io/gh/postgresql-cfbot/postgresql/commit/ceaa3dbece3c9b98abcaa28009320fde45a83f88 > is exercised. Hoist by my own petard. -- Thomas Munro

Re: [HACKERS] Automatic testing of patches in commit fest

2017-09-17 Thread Andres Freund
Hi, On 2017-09-18 14:26:53 +1200, Thomas Munro wrote: > A couple of new experimental features on commitfest.cputube.org: Yay. > 2. It'll now dump a gdb backtrace for any core files found after a > check-world failure (if you can find your way to the build log...). > Thanks to Andres for the

Re: [HACKERS] DROP SUBSCRIPTION hangs if sub is disabled in the same transaction

2017-09-17 Thread Peter Eisentraut
On 9/16/17 08:52, Peter Eisentraut wrote: > On 9/15/17 13:35, Arseny Sher wrote: >> Peter Eisentraut writes: >> >>> Here is a simple patch that fixes this, based on my original proposal >>> point #4. >> I checked, it passes the tests and solves the problem.

Re: [HACKERS] Automatic testing of patches in commit fest

2017-09-17 Thread Thomas Munro
Hi hackers, A couple of new experimental features on commitfest.cputube.org: 1. I didn't have --enable-cassert enabled before. Oops. 2. It'll now dump a gdb backtrace for any core files found after a check-world failure (if you can find your way to the build log...). Thanks to Andres for the

Re: [HACKERS] Setting pd_lower in GIN metapage

2017-09-17 Thread Amit Kapila
On Sat, Sep 16, 2017 at 7:15 PM, Michael Paquier wrote: > On Fri, Sep 15, 2017 at 4:22 PM, Amit Langote > wrote: >> On 2017/09/14 16:00, Michael Paquier wrote: >>> On Wed, Sep 13, 2017 at 4:43 PM, Amit Langote >>>

Re: [HACKERS] GSoC 2017: Foreign Key Arrays

2017-09-17 Thread Andreas Karlsson
I have not looked at the issue with the btree_gin tests yet, but here is the first part of my review. = Review This is my first quick review where I just read the documentation and quickly tested the feature. I will review it more in-depth later. This is a very useful feature, one which I

Re: [HACKERS] [PATCH] Generic type subscripting

2017-09-17 Thread Tom Lane
Arthur Zakirov writes: > CREATE SUBSCRIPTING FOR type_name > INITFUNC = subscripting_init_func > FETCHFUNC = subscripting_fetch_func > ASSIGNFUNC = subscripting_assign_func > DROP SUBSCRIPTING FOR type_name Reasonable, but let's make the syntax more like other

Re: [HACKERS] Patch: add --if-exists to pg_recvlogical

2017-09-17 Thread Rosser Schwarz
On Fri, Sep 1, 2017 at 10:22 AM, Peter Eisentraut < peter.eisentr...@2ndquadrant.com> wrote: > I understand the --drop-slot part. But I don't understand what it means > to ignore a missing replication slot when running --start. I'm not sure I do either, honestly. I followed the Principle of

Re: [HACKERS] [PATCH] Generic type subscripting

2017-09-17 Thread Arthur Zakirov
On Sun, Sep 17, 2017 at 12:27:58AM +0200, Dmitry Dolgov wrote: > spite of what form this step will be. Maybe it's possible to make something > like `CREATE FUNCTION ... FOR SUBSCRIPTING`, then verify that assign/extract > functions are presented and notify user if he missed them (but I would >

Re: [HACKERS] Improving DISTINCT with LooseScan node

2017-09-17 Thread Thomas Munro
On Mon, Sep 18, 2017 at 5:43 AM, Dmitriy Sarafannikov wrote: > Hi hackers, > > Everybody knows, that we have unefficient execution of query like "SELECT > DISTINCT id from mytable" > if table has many-many rows and only several unique id values. Query plan > looks like

Re: [HACKERS] GnuTLS support

2017-09-17 Thread Andreas Karlsson
On 09/15/2017 06:55 PM, Jeff Janes wrote: I can't build against gnutls-2.12.23-21.el6.x86_64 from CentOS 6.9 Thanks for testing my patch. I have fixed both these issues plus some of the other feedback. A new version of my patch is attached which should, at least on theory, support all GnuTLS

Re: [HACKERS] [GENERAL] Remove useless joins (VARCHAR vs TEXT)

2017-09-17 Thread Tom Lane
David Rowley writes: > On 17 September 2017 at 08:07, Kim Rose Carlsen wrote: >> It seems there are some difference in VARCHAR vs TEXT when postgres tries to >> decide if a LEFT JOIN is useful or not. > Yeah, it looks like the code to check for

Re: [HACKERS] Add Roman numeral conversion to to_number

2017-09-17 Thread Christoph Berg
Re: Peter Eisentraut 2017-08-14 > There are probably a bunch of Perl or Python modules that can be > employed for this. https://github.com/ChristophBerg/postgresql-numeral Christoph -- Sent via pgsql-hackers mailing list

Re: [HACKERS] [PATCH] Overestimated filter cost and its mitigation

2017-09-17 Thread David Fetter
On Mon, Sep 11, 2017 at 04:43:46PM +0900, Yuto Hayamizu wrote: > Hi hackers, > > Currently, cost of a filter with multiple clauses is estimated by > summing up estimated cost of each clause. As long as a filter > consists of simple clauses and its cost is fairly small, it works > fine. However,

[HACKERS] Improving DISTINCT with LooseScan node

2017-09-17 Thread Dmitriy Sarafannikov
Hi hackers, Everybody knows, that we have unefficient execution of query like "SELECT DISTINCT id from mytable"if table has many-many rows and only several unique id values. Query plan looks like Unique + IndexScan. I have tried to implement this feature in new type of node called Loose Scan.This

Re: [HACKERS] Range Merge Join v1

2017-09-17 Thread Jeff Davis
On Thu, Aug 31, 2017 at 1:52 AM, Jeff Davis wrote: > Updated patch attached. Changelog: > > * Rebased > * Changed MJCompare to return an enum as suggested, but it has 4 > possible values rather than 3. > * Added support for joining on contains or contained by (@> or <@) and >

Re: [HACKERS] Add Roman numeral conversion to to_number

2017-09-17 Thread Chris Travers
On Sun, Sep 17, 2017 at 6:43 PM, David Fetter wrote: > On Sat, Sep 16, 2017 at 10:42:49PM +, Douglas Doole wrote: > > Oliver, I took a look at your tests and they look thorough to me. > > > > One recommendation, instead of having 3999 separate selects to test every > >

Re: [HACKERS] Add Roman numeral conversion to to_number

2017-09-17 Thread David Fetter
On Sat, Sep 16, 2017 at 10:42:49PM +, Douglas Doole wrote: > Oliver, I took a look at your tests and they look thorough to me. > > One recommendation, instead of having 3999 separate selects to test every > legal roman numeral, why not just do something like this: > > do $$ > declare > i

Re: [HACKERS] Effect of changing the value for PARALLEL_TUPLE_QUEUE_SIZE

2017-09-17 Thread Dilip Kumar
On Wed, Sep 6, 2017 at 4:14 PM, Rafia Sabih wrote: > I worked on this idea of using local queue as a temporary buffer to > write the tuples when master is busy and shared queue is full, and it > gives quite some improvement in the query performance. > I have done

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

2017-09-17 Thread Dilip Kumar
On Mon, Sep 4, 2017 at 11:18 AM, Dilip Kumar wrote: > On Thu, Aug 31, 2017 at 11:27 PM, Robert Haas wrote: > > I have repeated one of the tests after fixing the problems pointed by > you but this time results are not that impressive. Seems like

Re: [HACKERS] SQL/JSON in PostgreSQL

2017-09-17 Thread Alexander Korotkov
On Sun, Sep 17, 2017 at 11:08 AM, Oleg Bartunov wrote: > On 16 Sep 2017 02:32, "Nikita Glukhov" wrote: > > On 15.09.2017 22:36, Oleg Bartunov wrote: > > On Fri, Sep 15, 2017 at 7:31 PM, Robert Haas >> wrote: >> >>> On Fri,

Re: [HACKERS] Add Roman numeral conversion to to_number

2017-09-17 Thread Oleg Bartunov
On 3 Aug 2017 16:29, "Oliver Ford" wrote: Adds to the to_number() function the ability to convert Roman numerals to a number. This feature is on the formatting.c TODO list. It is not currently implemented in either Oracle, MSSQL or MySQL so gives PostgreSQL an edge :-) I see

Re: [HACKERS] Re: [COMMITTERS] pgsql: Perform only one ReadControlFile() during startup.

2017-09-17 Thread Andres Freund
On 2017-09-16 13:27:05 -0700, Andres Freund wrote: > > This does not seem like a problem that justifies a system-wide change > > that's much more delicate than you thought. > > We need one more initialization call during crash-restart - that doesn't > seem particularly hard a fix. FWIW, attached

Re: [HACKERS] SQL/JSON in PostgreSQL

2017-09-17 Thread Oleg Bartunov
On 16 Sep 2017 02:32, "Nikita Glukhov" wrote: On 15.09.2017 22:36, Oleg Bartunov wrote: On Fri, Sep 15, 2017 at 7:31 PM, Robert Haas wrote: > >> On Fri, Sep 15, 2017 at 10:10 AM, Daniel Gustafsson >> wrote: >> >>> Can we expect