Re: [HACKERS] UPDATE of partition key

2017-07-23 Thread Amit Khandekar
On 13 July 2017 at 22:39, Amit Khandekar wrote: > Attached is a WIP patch (make_resultrels_ordered.patch) that generates > the result rels in canonical order. This patch is kept separate from > the update-partition-key patch, and can be applied on master branch. Attached

Re: [HACKERS] Oddity in error handling of constraint violation in ExecConstraints for partitioned tables

2017-07-23 Thread Amit Khandekar
>> On 2017/07/10 14:15, Etsuro Fujita wrote: >> Another thing I noticed is the error handling in ExecWithCheckOptions; it >> doesn't take any care for partition tables, so the column description in >> the error message for WCO_VIEW_CHECK is built using the partition table's >> rowtype, not the

Re: [HACKERS] PgFDW connection invalidation by ALTER SERVER/ALTER USER MAPPING

2017-07-23 Thread Ashutosh Bapat
On Fri, Jul 21, 2017 at 10:39 PM, Tom Lane wrote: > Ashutosh Bapat writes: >> On Fri, Jul 21, 2017 at 10:55 AM, Kyotaro HORIGUCHI >> wrote: >>> The attached patch differs only in this point. > >> +1. The patch

Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-07-23 Thread Masahiko Sawada
On Sat, Jul 22, 2017 at 8:04 AM, Stephen Frost wrote: > Masahiko, all, > > * Masahiko Sawada (sawada.m...@gmail.com) wrote: >> On Tue, Jul 18, 2017 at 1:28 PM, Stephen Frost wrote: >> > Masahiko, Michael, >> > >> > * Masahiko Sawada (sawada.m...@gmail.com)

Re: [HACKERS] Bug in ExecModifyTable function and trigger issues for foreign tables

2017-07-23 Thread Etsuro Fujita
On 2017/07/21 19:16, Etsuro Fujita wrote: On 2017/07/20 11:21, Etsuro Fujita wrote: On 2017/07/19 23:36, Tom Lane wrote: Please put the responsibility of doing const-expression simplification in these cases somewhere closer to where the problem is being created. It would be reasonable that

Re: [HACKERS] [WIP] [B-Tree] Keep indexes sorted by heap physical location

2017-07-23 Thread Claudio Freire
On Fri, Jul 21, 2017 at 10:31 PM, Peter Geoghegan wrote: > On Wed, Aug 17, 2016 at 7:54 PM, Claudio Freire > wrote: >> The attached patch tries to maintain the initial status of B-Tree >> indexes, which are created with equal-key runs in physical order, >>

Re: [HACKERS] Buildfarm failure and dubious coding in predicate.c

2017-07-23 Thread Thomas Munro
On Sun, Jul 23, 2017 at 8:32 AM, Tom Lane wrote: > Meanwhile, it's still pretty unclear what happened yesterday on > culicidae. That failure is indeed baffling. The only code that inserts (HASH_ENTER[_NULL]) into PredicateLockTargetHash: 1. CreatePredicateLock(). I would

Re: [HACKERS] autovacuum can't keep up, bloat just continues to rise

2017-07-23 Thread Joshua D. Drake
Hello, I changed the test to run for 6 hours at a time regardless of number of transactions. I also changed the du command to only look at the database (previously wal logs were included). This is the clearest indication of the problem I have been able to produce. Again, this is with 128

Re: [HACKERS] Improve perfomance for index search ANY(ARRAY[]) condition with single item

2017-07-23 Thread Tom Lane
I wrote: > Dima Pavlov writes: >> That's my first patch so I will be grateful for constructive criticism. > I think it would be better to do this in the planner, see specifically > eval_const_expressions. BTW, currently eval_const_expressions doesn't know anything about

Re: [HACKERS] Improve perfomance for index search ANY(ARRAY[]) condition with single item

2017-07-23 Thread Tom Lane
Dima Pavlov writes: > The problem was discussed on stackoverflow: > https://stackoverflow.com/questions/45061966/index-usage-with-single-item-anyarray Usually, we're not very happy with submissions that reference external pages for justification; we like to have all the

Re: [HACKERS] Testlib.pm vs msys

2017-07-23 Thread Tom Lane
Andrew Dunstan writes: > It turns out I was wrong about the problem jacana has been having with > the pg_ctl tests hanging. The problem was not the use of select as a > timeout mechanism, although I think the change to using > Time::Hires::usleep() is correct and

[HACKERS] Improve perfomance for index search ANY(ARRAY[]) condition with single item

2017-07-23 Thread Dima Pavlov
Hello, The problems I tried to solve here: 1. Improve perfomance for index search ANY(ARRAY[...]) condition with single item 2. I saw tons of users code like: if len(array) == 1: sql += '{}'.format(array[0]) else: sql += 'ANY(ARRAY[{}])'.format(array) So there will be less lines of code and it

[HACKERS] [GSOC][weekly report 7] Eliminate O(N^2) scaling from rw-conflict tracking in serializable transactions

2017-07-23 Thread Mengxing Liu
In the last week, I focus on 1) Creating an independent skip list data structure and related interfaces. Now it has only two levels so that I don't have to modify too much existing code. But it is easy to be transformed into the data structure with any number of levels if necessary.

[HACKERS] Testlib.pm vs msys

2017-07-23 Thread Andrew Dunstan
It turns out I was wrong about the problem jacana has been having with the pg_ctl tests hanging. The problem was not the use of select as a timeout mechanism, although I think the change to using Time::Hires::usleep() is correct and shouldn't be reverted. The problem is command_like's use of

Re: [HACKERS] Pluggable storage

2017-07-23 Thread Amit Kapila
On Wed, Jul 19, 2017 at 11:33 AM, Haribabu Kommi wrote: > > > On Sat, Jul 15, 2017 at 12:30 PM, Robert Haas wrote: >> > > I am finding out that eliminating the HeapTuple usage in the upper layers > needs some major changes, How about not changing