pgsql: Make TupleTableSlots extensible, finish split of existing slot t

2018-11-16 Thread Andres Freund
Make TupleTableSlots extensible, finish split of existing slot type. This commit completes the work prepared in 1a0586de36, splitting the old TupleTableSlot implementation (which could store buffer, heap, minimal and virtual slots) into four different slot types. As described in the aforementione

Re: pgsql: Redesign initialization of partition routing structures

2018-11-16 Thread Alvaro Herrera
Hello On 2018-Nov-16, Andres Freund wrote: > On 2018-11-16 16:54:03 -0300, Alvaro Herrera wrote: > > Thanks, I just noticed it and will push this in a minute. Since I > > cannot reproduce the error, it's a blind fix, but seems correct. > > FWIW, if you use clang you can probably reproduce this

Re: pgsql: Redesign initialization of partition routing structures

2018-11-16 Thread Andres Freund
Hi, On 2018-11-16 16:54:03 -0300, Alvaro Herrera wrote: > Thanks, I just noticed it and will push this in a minute. Since I > cannot reproduce the error, it's a blind fix, but seems correct. FWIW, if you use clang you can probably reproduce this using -Werror=typedef-redefinition Greetings, An

pgsql: Avoid re-typedef'ing PartitionTupleRouting

2018-11-16 Thread Alvaro Herrera
Avoid re-typedef'ing PartitionTupleRouting Apparently, gcc on macOS (?) doesn't like it. Per buildfarm. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/0201d79a5549e3375ea5e5aee351378399453f15 Modified Files -- src/backend/executor/execPartition.c | 4

Re: pgsql: Redesign initialization of partition routing structures

2018-11-16 Thread Alvaro Herrera
On 2018-Nov-16, Tom Lane wrote: > Alvaro Herrera writes: > > Redesign initialization of partition routing structures > > Some of the buildfarm doesn't like this: > > ccache gcc -std=c99 -Wall -Wmissing-prototypes -Wpointer-arith > -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-a

pgsql: pgbench: introduce a RandomState struct

2018-11-16 Thread Alvaro Herrera
pgbench: introduce a RandomState struct This becomes useful when used to retry a transaction after a serialization error or deadlock abort. (We don't yet have that feature, but this is preparation for it.) While at it, use separate random state for thread administratrivia such as deciding which

Re: pgsql: Redesign initialization of partition routing structures

2018-11-16 Thread Tom Lane
Alvaro Herrera writes: > Redesign initialization of partition routing structures Some of the buildfarm doesn't like this: ccache gcc -std=c99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasin

pgsql: Inline hot path of slot_getsomeattrs().

2018-11-16 Thread Andres Freund
Inline hot path of slot_getsomeattrs(). This yields a minor speedup, which roughly balances the loss from the upcoming introduction of callbacks to do some operations on slots. Author: Andres Freund Discussion: https://postgr.es/m/[email protected] Branch --

pgsql: Redesign initialization of partition routing structures

2018-11-16 Thread Alvaro Herrera
Redesign initialization of partition routing structures This speeds up write operations (INSERT, UPDATE, DELETE, COPY, as well as the future MERGE) on partitioned tables. This changes the setup for tuple routing so that it does far less work during the initial setup and pushes more work out to wh