description of root_tuple_slot missing

2018-04-22 Thread Amit Langote
I noticed that the description of root_tuple_slot member is missing in the comment above PartitionTupleRouting definition. See if the attached patch fixes it correctly. Thanks, Amit diff --git a/src/include/executor/execPartition.h b/src/include/executor/execPartition.h index

Re: Should we add GUCs to allow partition pruning to be disabled?

2018-04-22 Thread Amit Langote
Hi David. On 2018/04/21 14:09, David Rowley wrote: > On 20 April 2018 at 20:51, Amit Langote wrote: >> set constraint_exclusion to off; >> >> -- not ok! > > It needed a bit more effort than I put in the first time around to > make this work properly.

Re: Toast issues with OldestXmin going backwards

2018-04-22 Thread Amit Kapila
On Mon, Apr 23, 2018 at 1:55 AM, Andrew Gierth wrote: >> "Amit" == Amit Kapila writes: > > Amit> by computing it before scanning the main heap (lazy_vacuum_rel) > Amit> and then pass it down. I have tried it and came up with the >

Re: Boolean partitions syntax

2018-04-22 Thread Amit Langote
On 2018/04/22 2:29, Tom Lane wrote: > Amit Langote writes: >> I think if this bug/open item can be resolved by adopting the minimal >> patch, then we should use it for that. Maybe, we can discuss the rest of >> the changes independently. If they make things better

JIT flag definitions not parenthesized

2018-04-22 Thread David Rowley
Looks like the JIT flags definitions are not properly parenthesized. It might not matter too much for their current usage, but it might save a bit of confusion later. git grep "^#define .*<<.*[^)]$" indicates these are the only offenders. Patch attached. -- David Rowley

Re: using expression syntax for partition bounds (was: Re: Boolean partitions syntax)

2018-04-22 Thread Amit Langote
On 2018/04/23 11:37, Amit Langote wrote: > I tried to update the patch to do things that way. I'm going to create a > new entry in the next CF titled "generalized expression syntax for > partition bounds" and add the patch there. Tweaked the commit message to credit all the authors. Thanks,

using expression syntax for partition bounds (was: Re: Boolean partitions syntax)

2018-04-22 Thread Amit Langote
(patch and discussion for PG 12) On 2018/04/22 1:28, Tom Lane wrote: > Amit Langote writes: >> [ v8-0001-Allow-generalized-expression-syntax-for-partition.patch ] > > I find what you did to a_expr here to be pretty horrid. Thanks for the review. > I think what

Re: Toast issues with OldestXmin going backwards

2018-04-22 Thread Andrew Gierth
> "Andrew" == Andrew Gierth writes: Andrew> Since the tuple was vacuumable at that point, it will never Andrew> again become visible in any snapshot, so the only code that Andrew> should ever access its toast values is vacuum full/cluster, and, unfortunately,

Re: [HACKERS] path toward faster partition pruning

2018-04-22 Thread Amit Langote
On 2018/04/21 0:58, Alvaro Herrera wrote: > Amit Langote wrote: > >> PS: git grep "partition by hash\|PARTITION BY HASH" on src/test indicates >> that there are hash partitioning related tests in create_table, >> foreign_key, and partition_join files as well. Do we want to use the >> custom

Format base - Code contribution

2018-04-22 Thread Miles Elam
I would like to donate some code to the project, formatting numbers as any base from 2 to 64. The FAQ describes contributions to the core code, but it's possible contrib is a better target. This is all of course contingent on how well received this extension code is of course. Code available at

Re: Toast issues with OldestXmin going backwards

2018-04-22 Thread Andrew Gierth
> "Amit" == Amit Kapila writes: Amit> Yeah, that's right, but it gives some uneasy feeling that we are Amit> attaching the wrong toast value. Oh, forgot to stress this before: referencing the wrong toast value in this case is something that can already happen, my

Re: pg_recvlogical broken in back branches

2018-04-22 Thread Michael Paquier
On Sun, Apr 22, 2018 at 02:55:51PM -0700, Noah Misch wrote: > That change is testing the wrong variable. I plan to repair it as > attached. You are right here. Ditto The whole GetConnection() business in src/bin/pg_basebackup is confusing with the presence of a global variable. I am wondering

Re: pg_recvlogical broken in back branches

2018-04-22 Thread Noah Misch
On Tue, Apr 17, 2018 at 03:38:13PM +0900, Michael Paquier wrote: > On Tue, Apr 17, 2018 at 03:01:33AM -0300, Euler Taveira wrote: > > A proposed fix is attached. It should be applied to 9.4, 9.5, 9.6, and > > 10. (Although, client version 10 can connect to server version 10, > > client version 10

Re: Toast issues with OldestXmin going backwards

2018-04-22 Thread Andrew Gierth
> "Amit" == Amit Kapila writes: Amit> I haven't tried to reproduce it, but I can see the possibility of Amit> the problem described by you. What should we do next? I could see Amit> few possibilities: (a) Vacuum for main and toast table should Amit> always use

Re: BGWORKER_BYPASS_ALLOWCONN used nowhere (infra part of on-line checksum switcher)

2018-04-22 Thread Daniel Gustafsson
> On 22 Apr 2018, at 14:04, Magnus Hagander wrote: > > On Sun, Apr 22, 2018 at 1:11 PM, Michael Paquier > wrote: > Hi all, > > BGWORKER_BYPASS_ALLOWCONN has been added by commit eed1ce7, which is an > infrastructure piece

Re: [HACKERS] Custom compression methods

2018-04-22 Thread Alexander Korotkov
On Fri, Apr 20, 2018 at 7:45 PM, Konstantin Knizhnik < k.knizh...@postgrespro.ru> wrote: > On 30.03.2018 19:50, Ildus Kurbangaliev wrote: > >> On Mon, 26 Mar 2018 20:38:25 +0300 >> Ildus Kurbangaliev wrote: >> >> Attached rebased version of the patch. Fixed

Re: BGWORKER_BYPASS_ALLOWCONN used nowhere (infra part of on-line checksum switcher)

2018-04-22 Thread Magnus Hagander
On Sun, Apr 22, 2018 at 1:11 PM, Michael Paquier wrote: > Hi all, > > BGWORKER_BYPASS_ALLOWCONN has been added by commit eed1ce7, which is an > infrastructure piece to be able to enable and disable dynamically > checksums on a cluster. The main idea is to be able to bypass

Re: Toast issues with OldestXmin going backwards

2018-04-22 Thread Amit Kapila
On Sat, Apr 21, 2018 at 1:26 AM, Andrew Gierth wrote: >> "Amit" == Amit Kapila writes: > > Amit> I haven't tried to reproduce it, but I can see the possibility of > Amit> the problem described by you. What should we do next? I could see

BGWORKER_BYPASS_ALLOWCONN used nowhere (infra part of on-line checksum switcher)

2018-04-22 Thread Michael Paquier
Hi all, BGWORKER_BYPASS_ALLOWCONN has been added by commit eed1ce7, which is an infrastructure piece to be able to enable and disable dynamically checksums on a cluster. The main idea is to be able to bypass datallowconn which allows a background worker to connect to a database even if the

bms_prev_member won't work correctly if bitmapword is 64-bits

2018-04-22 Thread David Rowley
bms_prev_member mistakenly has a hardcoded 24 in the function. This should really be BITS_PER_BITMAPWORD - 8 so that it is properly set to 56 if someone compiles with 64-bit bitmapwords. The attached fixes this and also adds a test to exercise the function a bit. [1] indicates there's currently