[HACKERS] Removing [Merge]Append nodes which contain a single subpath

2017-10-25 Thread David Rowley
It seems like a good idea for the planner not to generate Append or MergeAppend paths when the node contains just a single subpath. If we were able to remove these then the planner would have more flexibility to build a better plan. As of today, because we include this needless [Merge]Append

[HACKERS] Jsonb transform for pl/python

2017-10-25 Thread Anthony Bykov
Hi. I've implemented jsonb transform (https://www.postgresql.org/docs/9.5/static/sql-createtransform.html) for pl/python. 1. '{"1":1}'::jsonb is transformed into dict {"1"=>1}, while '["1",2]'::jsonb is transformed into list(not tuple!) ["1", 2] 2. If there is a numeric value appear in jsonb,

Re: [HACKERS] CurTransactionContext freed before transaction COMMIT ???

2017-10-25 Thread Amit Kapila
On Tue, Oct 24, 2017 at 7:42 PM, Gaddam Sai Ram wrote: > > Hello people, > > We are implementing in-memory index. As a part of that, during > index callbacks, under CurTransactionContext, we cache all the DMLs of a > transaction in dlist(postgres's

Re: [HACKERS] Pluggable storage

2017-10-25 Thread Amit Kapila
On Wed, Oct 25, 2017 at 11:37 AM, Robert Haas wrote: > On Fri, Oct 20, 2017 at 5:47 AM, Amit Kapila wrote: >> I think what we need here is a way to register satisfies function >> (SnapshotSatisfiesFunc) in SnapshotData for different storage

[HACKERS] Re: [BUGS] BUG #14849: jsonb_build_object doesn't like VARIADIC calls very much

2017-10-25 Thread Michael Paquier
On Mon, Oct 23, 2017 at 6:50 AM, Michael Paquier wrote: > Okay, attached is what I think a fully implemented patch should look > like. On top of what Andrew has done, I added and reworked the > following: > - removed duplicate error handling. > - documented the function

[HACKERS] WIP: BRIN multi-range indexes

2017-10-25 Thread Tomas Vondra
Hi all, A couple of days ago I've shared a WIP patch [1] implementing BRIN indexes based on bloom filters. One inherent limitation of that approach is that it can only support equality conditions - that's perfectly fine in many cases (e.g. with UUIDs it's rare to use range queries, etc.). [1]

Re: [HACKERS] CurTransactionContext freed before transaction COMMIT ???

2017-10-25 Thread Michael Paquier
On Wed, Oct 25, 2017 at 7:34 AM, Gaddam Sai Ram wrote: > Thanks for the response, > > Can you check if CurTransactionContext is valid at that point? > > > Any Postgres function to check if CurTransactionContext is valid or not?

Re: [HACKERS] CurTransactionContext freed before transaction COMMIT ???

2017-10-25 Thread Gaddam Sai Ram
Thanks for the response, Can you check if CurTransactionContext is valid at that point? Any Postgres function to check if CurTransactionContext is valid or not? To see, if this problem is related to CurTransactionContext, can you try to populate the list in TopMemoryContext and see

Re: [HACKERS] Timeline ID in backup_label file

2017-10-25 Thread Craig Ringer
On 26 October 2017 at 02:50, Michael Paquier wrote: > Hi all, > > Lately, in order to extract some information from a backup_label file > in python I have found myself doing something like the following to > get a timeline number (feel free to reuse that code,

Re: [HACKERS] Continuous integration on Windows?

2017-10-25 Thread Thomas Munro
On Sat, Oct 14, 2017 at 3:08 AM, Andrew Dunstan wrote: > I'll add some info to the wiki. Unfortunately, the tests fail on the > tablespace test because they are running as a privileged user. We need > to find a way around that, still looking into it. (See >

Re: [HACKERS] WIP: BRIN multi-range indexes

2017-10-25 Thread Tomas Vondra
Apparently I've managed to botch the git format-patch thing :-( Attached are both patches (the first one adding BRIN bloom indexes, the other one adding the BRIN multi-range). Hopefully I got it right this time ;-) regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL

Re: [HACKERS] Implementing pg_receivewal --no-sync

2017-10-25 Thread Michael Paquier
On Tue, Oct 24, 2017 at 11:05 PM, Kuntal Ghosh wrote: > + > +By default, pg_receivewal flushes a WAL segment's > +contents each time a feedback message is sent to the server depending > +on the interval of time defined by > +

[HACKERS] Timeline ID in backup_label file

2017-10-25 Thread Michael Paquier
Hi all, Lately, in order to extract some information from a backup_label file in python I have found myself doing something like the following to get a timeline number (feel free to reuse that code, especially the regex pattern): pattern = re.compile('^START WAL

[HACKERS] Re: [BUGS] BUG #14849: jsonb_build_object doesn't like VARIADIC calls very much

2017-10-25 Thread Marko Tiikkaja
On Wed, Oct 25, 2017 at 5:32 PM, Michael Paquier wrote: > On Mon, Oct 23, 2017 at 6:50 AM, Michael Paquier > wrote: > > Okay, attached is what I think a fully implemented patch should look > > like. On top of what Andrew has done, I added

[HACKERS] Re: [COMMITTERS] pgsql: Process variadic arguments consistently in json functions

2017-10-25 Thread Michael Paquier
On Wed, Oct 25, 2017 at 5:24 AM, Andrew Dunstan wrote: > Process variadic arguments consistently in json functions > > json_build_object and json_build_array and the jsonb equivalents did not > correctly process explicit VARIADIC arguments. They are modified to use > the new

Re: [HACKERS] path toward faster partition pruning

2017-10-25 Thread Beena Emerson
Hello, On Wed, Oct 25, 2017 at 1:07 PM, Amit Langote wrote: > On 2017/10/25 15:47, Amit Langote wrote: >> On 2017/10/24 1:38, Beena Emerson wrote: >>> I had noticed this and also that this crash: >>> >>> tprt PARTITION BY RANGE(Col1) >>>tprt_1 FOR VALUES

Re: [HACKERS] Implementing pg_receivewal --no-sync

2017-10-25 Thread Kuntal Ghosh
On Wed, Oct 25, 2017 at 6:07 AM, Michael Paquier wrote: > Hi all, > > After thinking a bit on the subject, I have decided to submit a patch > to do $subject. This makes pg_receivewal more consistent with > pg_basebackup. This option is mainly useful for testing,

Re: [HACKERS] Parallel Hash take II

2017-10-25 Thread Thomas Munro
On Tue, Oct 24, 2017 at 10:10 PM, Thomas Munro wrote: > Here is an updated patch set that does that ^. It's a bit hard to understand what's going on with the v21 patch set I posted yesterday because EXPLAIN ANALYZE doesn't tell you anything interesting. Also, if

Re: [HACKERS] Pluggable storage

2017-10-25 Thread Robert Haas
On Fri, Oct 20, 2017 at 5:47 AM, Amit Kapila wrote: > I think what we need here is a way to register satisfies function > (SnapshotSatisfiesFunc) in SnapshotData for different storage engines. I don't see how that helps very much. SnapshotSatisfiesFunc takes a HeapTuple

Re: [HACKERS] pgbench more operators & functions

2017-10-25 Thread Pavel Stehule
Hi 2017-10-20 18:36 GMT+02:00 Fabien COELHO : > > Here is a v13. No code changes, but TAP tests added to maintain pgbench coverage to green. >>> > Here is a v14, which is just a rebase after the documentation xml-ization. > all tests passed no problems with doc

Re: [HACKERS] pgbench - allow to store select results into variables

2017-10-25 Thread Pavel Stehule
Hi 2017-10-20 18:37 GMT+02:00 Fabien COELHO : > > Here is a v12. >> > > Here is a v13, which is just a rebase after the documentation xml-ization. > I am looking to this patch. Not sure if "cset" is best name - maybe "eset" .. like embeded set? The code of

Re: [HACKERS] path toward faster partition pruning

2017-10-25 Thread Beena Emerson
Hello Amit, Thanks for the updated patches On Wed, Oct 25, 2017 at 1:07 PM, Amit Langote wrote: > On 2017/10/25 15:47, Amit Langote wrote: >> On 2017/10/24 1:38, Beena Emerson wrote: >>> I had noticed this and also that this crash: >>> >>> tprt PARTITION BY