Re: [HACKERS] SQL/JSON in PostgreSQL

2018-01-04 Thread Pavel Stehule
I have removed all extra features from the patch set, they can be found in our > github repository: https://github.com/postgrespro/sqljson/tree/sqljson_ext > . > > Now there are 10 patches which have the following dependencies: > > 1: > 2: 1 > 3: 2 > 4: 2 > 5: > 6: > 7: 2, 5, 6 > 8: 7, 4 > 9: 7 >

Re: Condition variable live lock

2018-01-04 Thread Tom Lane
Thomas Munro writes: > On Fri, Jan 5, 2018 at 7:10 PM, Tom Lane wrote: >> Should we rejigger the logic so that it awakens one additional waiter >> (if there is one) after detecting that someone else has removed the >> sentinel? Obviously, this trades a risk of loss of wakeup for a risk >> of spu

Re: Condition variable live lock

2018-01-04 Thread Thomas Munro
On Fri, Jan 5, 2018 at 7:10 PM, Tom Lane wrote: > I thought of another possible issue, though. In the situation where > someone else has removed our sentinel (presumably, by issuing > ConditionVariableSignal just before we were about to remove the > sentinel), my patch assumes we can just do noth

Re: BUGFIX: standby disconnect can corrupt serialized reorder buffers

2018-01-04 Thread Craig Ringer
On 5 January 2018 at 12:16, Stephen Frost wrote: > Greetings all, > > * Masahiko Sawada (sawada.m...@gmail.com) wrote: > > On Tue, Dec 26, 2017 at 10:03 PM, Petr Jelinek > > wrote: > > > On 26/12/17 11:13, Masahiko Sawada wrote: > > >> On Tue, Dec 26, 2017 at 12:49 AM, Petr Jelinek > > >> wrote

Re: Condition variable live lock

2018-01-04 Thread Tom Lane
Thomas Munro writes: > On Fri, Jan 5, 2018 at 5:27 PM, Tom Lane wrote: >> Now, the limitation with this is that we can't be waiting for any *other* >> condition variable, because then we'd be trashing our state about that >> variable. As coded, we can't be waiting for the target CV either, but >

Re: [HACKERS] Refactor handling of database attributes between pg_dump and pg_dumpall

2018-01-04 Thread Vaishnavi Prabakaran
On Fri, Jan 5, 2018 at 4:32 PM, Haribabu Kommi wrote: > > > Corrected. > Updated patch attached. > > Moved this CF item to "Ready for committer" Regards, Vaishnavi, Fujitsu Australia.

Re: [HACKERS] PATCH: Batch/pipelining support for libpq

2018-01-04 Thread Vaishnavi Prabakaran
On Tue, Nov 28, 2017 at 12:57 PM, Michael Paquier wrote: > On Thu, Oct 5, 2017 at 9:58 AM, Vaishnavi Prabakaran > wrote: > > Thanks for the suggestion and, OK I will create a new patch in upcoming > > commitfest with attached patch addressing above review comments. > > The patch still applies an

Re: Condition variable live lock

2018-01-04 Thread Thomas Munro
On Fri, Jan 5, 2018 at 5:27 PM, Tom Lane wrote: > I share Robert's discomfort with that solution, but it seems to me there > might be a better way. The attached patch uses our own cvWaitLink as a > sentinel to detect when we've woken everybody who was on the wait list > before we arrived. That g

Re: [HACKERS] Refactor handling of database attributes between pg_dump and pg_dumpall

2018-01-04 Thread Haribabu Kommi
On Fri, Jan 5, 2018 at 2:54 PM, Vaishnavi Prabakaran < vaishnaviprabaka...@gmail.com> wrote: > > On Wed, Dec 13, 2017 at 1:50 PM, Haribabu Kommi > wrote: > >> Rebased patch attached that fixes the documentation build problem. >> >> Latest patch applies without noise. And here are some minor comme

Re: Condition variable live lock

2018-01-04 Thread Tom Lane
Andres Freund writes: > On 2018-01-04 12:39:47 -0500, Robert Haas wrote: >>> Given that the proclist_contains() checks in condition_variable.c are >>> already racy, I think it might be feasible to collect all procnos to >>> signal while holding the spinlock, and then signal all of them in one >>>

Re: [HACKERS] VACUUM and ANALYZE disagreeing on what reltuples means

2018-01-04 Thread Stephen Frost
Tomas, * Michael Paquier (michael.paqu...@gmail.com) wrote: > On Sun, Nov 19, 2017 at 6:40 AM, Tomas Vondra > wrote: > > Thanks for looking into this. I agree your patch is more consistent and > > generally cleaner. > > This is classified as a bug fix, and is marked as waiting on author. I > am

setting estate in ExecInitNode() itself

2018-01-04 Thread Ashutosh Bapat
Hi, Looking at ExecInitXYZ() functions, we can observe that every such function has a statement like XYZstate->ps.state = estate; where it saves estate in the PlanState. I am wondering why don't we instead save estate in ExecInitNode() itself like result->estate = estate; Are there any cases w

Re: BUGFIX: standby disconnect can corrupt serialized reorder buffers

2018-01-04 Thread Stephen Frost
Greetings all, * Masahiko Sawada (sawada.m...@gmail.com) wrote: > On Tue, Dec 26, 2017 at 10:03 PM, Petr Jelinek > wrote: > > On 26/12/17 11:13, Masahiko Sawada wrote: > >> On Tue, Dec 26, 2017 at 12:49 AM, Petr Jelinek > >> wrote: > >> > > It's not a problem on crash restart because S

Re: [HACKERS] WAL logging problem in 9.4.3?

2018-01-04 Thread Stephen Frost
Greetings, * Kyotaro HORIGUCHI (horiguchi.kyot...@lab.ntt.co.jp) wrote: > At Tue, 28 Nov 2017 10:36:39 +0900, Michael Paquier > wrote in > > > On Thu, Sep 14, 2017 at 3:34 PM, Kyotaro HORIGUCHI > > wrote: > > > At Wed, 13 Sep 2017 17:42:39 +0900 (Tokyo Standard Time), Kyotaro > > > HORIGUCHI

Re: [HACKERS] Proposal: Local indexes for partitioned table

2018-01-04 Thread David Rowley
On 5 January 2018 at 11:01, Alvaro Herrera wrote: > (The more I think of this, the more I believe that pg_inherits is a > better answer. Opinions?) I admit to not having had a chance to look at any code with this yet, but I'm just thinking about a case like the following. CREATE TABLE part (a I

Re: [HACKERS] Refactor handling of database attributes between pg_dump and pg_dumpall

2018-01-04 Thread Vaishnavi Prabakaran
On Wed, Dec 13, 2017 at 1:50 PM, Haribabu Kommi wrote: > Rebased patch attached that fixes the documentation build problem. > > Latest patch applies without noise. And here are some minor comments + + --set-db-properties + + +This option is to skip create database

Re: Faster inserts with mostly-monotonically increasing values

2018-01-04 Thread Pavan Deolasee
On Thu, Jan 4, 2018 at 6:05 PM, Alvaro Herrera wrote: > Pavan Deolasee wrote: > > On Tue, Jan 2, 2018 at 7:15 PM, Tels > wrote: > > > > > Just a question trying to understand how btree indexes work: > > > > > > If one inserts ever-increasing value, is the tree a balanced tree with > a > > > mini

Re: GSoC 2018

2018-01-04 Thread Stephen Frost
Alexander, * Alexander Korotkov (a.korot...@postgrespro.ru) wrote: > On Thu, Jan 4, 2018 at 11:36 PM, Stephen Frost wrote: > > * Stephen Frost (sfr...@snowman.net) wrote: > > > The deadline for Mentoring organizations to apply is: January 23. > > > > We currently only have four (4) projects for 2

Re: [HACKERS] path toward faster partition pruning

2018-01-04 Thread David Rowley
On 5 January 2018 at 07:16, Jesper Pedersen wrote: > \set b random(1, 100) > BEGIN; > SELECT t1.a, t1.b FROM t1 WHERE t1.b = :b; > COMMIT; > -- select.sql -- > > using pgbench -c X -j X -M prepared -T X -f select.sql part-hash > > On master we have generic_cost planning cost of 33.75, and an >

Re: explain analyze output with parallel workers - question about meaning of information for explain.depesz.com

2018-01-04 Thread Amit Kapila
On Thu, Jan 4, 2018 at 11:29 PM, Robert Haas wrote: > On Wed, Dec 20, 2017 at 3:38 AM, Amit Kapila wrote: >> On Tue, Dec 19, 2017 at 11:37 PM, Robert Haas wrote: >>> On Wed, Dec 13, 2017 at 9:18 PM, Amit Kapila >>> wrote: Thanks. I think now we can proceed with fix_accum_instr_paral

Re: [HACKERS] Runtime Partition Pruning

2018-01-04 Thread Alvaro Herrera
David Rowley wrote: > Looks like it's down to ExplainPropertyFloat() having > machine-dependent behaviour. > > On the machine that I was working with when testing this the following > code outputs "1" > [ sample code ] > > but on your machine it must be outputting "0"? Yeah, it does. Thanks fo

Re: bug? import foreign schema forgets to import column description

2018-01-04 Thread Michael Paquier
On Fri, Jan 5, 2018 at 4:42 AM, Fabrízio de Royes Mello wrote: > There are some impediment to don't import Comments from foreign objects? The only thing at SQL level which I know of able to copy comments from another table is LIKE COMMENTS. For IMPORT FOREIGN SCHEMA, we assume that FDWs only send

Re: [HACKERS] path toward faster partition pruning

2018-01-04 Thread David Rowley
On 5 January 2018 at 07:16, Jesper Pedersen wrote: > 1) if the patch should be more aggressive in removing planning nodes that > aren't necessary, e.g. going from Append -> IndexOnly to just IndexOnly. That's not for this patch. There's another patch [1] to do that already. [1] https://commitfes

Re: Enhance pg_stat_wal_receiver view to display connected host

2018-01-04 Thread Haribabu Kommi
On Fri, Jan 5, 2018 at 12:05 AM, Michael Paquier wrote: > On Thu, Jan 04, 2018 at 08:54:37AM -0300, Alvaro Herrera wrote: > > I think more attention should be given to the libpq side of this patch; > > maybe have a 0001 with only the new libpq function, to easily verify > > that it does all it ne

Re: [JDBC] [HACKERS] Channel binding support for SCRAM-SHA-256

2018-01-04 Thread Michael Paquier
On Fri, Jan 5, 2018 at 7:12 AM, Tom Lane wrote: > so this is looking mighty like a crashed and burned patch from here :-( Sorry for arriving late to the party, timezone and such.. The lack of access to the signature algorithm type is being covered by this commit from upstream which introduced X5

Re: [HACKERS] Runtime Partition Pruning

2018-01-04 Thread David Rowley
On 5 January 2018 at 05:37, Alvaro Herrera wrote: > I tried this patch (applying it on Amit's last current version on top of > 4e2970f8807f which is the latest it applies to) and regression tests > fail with the attached diff; in all cases it appears to be an off-by-one > in row count. Would you

Re: [HACKERS] Runtime Partition Pruning

2018-01-04 Thread David Rowley
On 5 January 2018 at 05:37, Alvaro Herrera wrote: > I tried this patch (applying it on Amit's last current version on top of > 4e2970f8807f which is the latest it applies to) and regression tests > fail with the attached diff; in all cases it appears to be an off-by-one > in row count. Would you

Re: Libpq support to connect to standby server as priority

2018-01-04 Thread Jing Wang
Hi Takayuki, Thanks your reminder. I will have a look your patch and the review comments and update the patch soon. Please leave my current submitted patch now. -- Regards, Jing Wang Fujitsu Australia 2018-01-04 17:40 GMT+11:00 Tsunakawa, Takayuki < tsunakawa.ta...@jp.fujitsu.com>: > From: J

Re: Faster inserts with mostly-monotonically increasing values

2018-01-04 Thread Tels
Hello Alvaro, On Thu, January 4, 2018 7:35 am, Alvaro Herrera wrote: > Pavan Deolasee wrote: >> On Tue, Jan 2, 2018 at 7:15 PM, Tels >> wrote: >> >> > Just a question trying to understand how btree indexes work: >> > >> > If one inserts ever-increasing value, is the tree a balanced tree with >> a

Re: [HACKERS] [PATCH] Incremental sort

2018-01-04 Thread Tels
Hello Alexander, On Thu, January 4, 2018 4:36 pm, Alexander Korotkov wrote: > On Fri, Dec 8, 2017 at 4:06 PM, Alexander Korotkov < > a.korot...@postgrespro.ru> wrote: > >> Thank you for pointing that. Sure, both cases are better. I've added >> second case as well as comments. Patch is attached.

Re: [HACKERS] Pluggable storage

2018-01-04 Thread Haribabu Kommi
On Fri, Jan 5, 2018 at 9:55 AM, Alexander Korotkov < a.korot...@postgrespro.ru> wrote: > On Thu, Jan 4, 2018 at 8:03 AM, Haribabu Kommi > wrote: > >> On Thu, Jan 4, 2018 at 10:00 AM, Alexander Korotkov < >> a.korot...@postgrespro.ru> wrote: >> >>> On Wed, Jan 3, 2018 at 10:08 AM, Haribabu Kommi <

Re: [HACKERS] Pluggable storage

2018-01-04 Thread Alexander Korotkov
On Thu, Jan 4, 2018 at 8:03 AM, Haribabu Kommi wrote: > On Thu, Jan 4, 2018 at 10:00 AM, Alexander Korotkov < > a.korot...@postgrespro.ru> wrote: > >> On Wed, Jan 3, 2018 at 10:08 AM, Haribabu Kommi > > wrote: >> >>> Apart from rebase, Added storage shared memory API, currently this API >>> is us

Re: [HACKERS] Re: Improve OR conditions on joined columns (common star schema problem)

2018-01-04 Thread Tom Lane
I wrote: > Jim Nasby writes: >> I've verified that the patch still applies and make check-world is clean. > Not any more :-(. Here's a v3 rebased over HEAD. No substantive > change from v2. Again rebased up to HEAD; still no substantive changes. regards, tom lane diff

Re: Finalizing logical replication limitations as well as potential features

2018-01-04 Thread Joshua D. Drake
On 01/04/2018 01:26 PM, Alvaro Herrera wrote: Joshua D. Drake wrote: We just queue/audit the changes as they happen and sync up the changes after the initial sync completes. This already happens. There is an initial sync, and there's logical decoding that queues any changes that exist "after"

Re: Libpq support to connect to standby server as priority

2018-01-04 Thread Jing Wang
Hi, Enclosed please find the patch that the libpq support 'prefer-read' feature. If the *target_session_attrs* is set to 'prefer-read', the patch will connect to server and send 'SHOW transaction_read_only' query to check the server being 'read-only' or not. If server is 'read-write' then it will

Re: [Patch] Make block and file size for WAL and relations defined at cluster creation

2018-01-04 Thread Remi Colinet
2018-01-03 22:04 GMT+01:00 Robert Haas : > On Wed, Jan 3, 2018 at 3:43 PM, Remi Colinet > wrote: > > Justifications are: > > I think this is all missing the point. If varying the block size (or > whatever) is beneficial, then having it configurable at initdb is > clearly useful. But, as Andres

Re: [JDBC] [HACKERS] Channel binding support for SCRAM-SHA-256

2018-01-04 Thread Tom Lane
Peter Eisentraut writes: > On 1/4/18 16:17, Tom Lane wrote: >> dromedary is whinging about OBJ_find_sigid_algs, as well. > Yeah, it seems like we might need to fine-tune this a bit more to make > it work across all OpenSSL versions. I'm going to let the buildfarm > take a run through the current

Re: [Patch v2] Make block and file size for WAL and relations defined at cluster creation

2018-01-04 Thread Remi Colinet
2018-01-03 23:11 GMT+01:00 Alvaro Herrera : > Remi Colinet wrote: > > Hello, > > > > This is version 2 of the patch to make the file and block sizes for WAL > and > > relations, run-time configurable at initdb. > > I don't think this works, since we have a rule that pallocs are > prohibited within

Re: [HACKERS] Proposal: Local indexes for partitioned table

2018-01-04 Thread Alvaro Herrera
Peter Eisentraut wrote: > On 1/4/18 12:00, Robert Haas wrote: > >> The catalog representations of partitioned tables and partitioned > >> indexes are completely different, which may or may not be desirable. > > > > How so? > > If someone wants to write a query, show me all the partitions of this

Re: GSoC 2018

2018-01-04 Thread Alexander Korotkov
Hi! On Thu, Jan 4, 2018 at 11:36 PM, Stephen Frost wrote: > Greetings -hackers, > > * Stephen Frost (sfr...@snowman.net) wrote: > > The deadline for Mentoring organizations to apply is: January 23. > > We currently only have four (4) projects for 2018 listed on our > projects page here: > > http

Re: [JDBC] [HACKERS] Channel binding support for SCRAM-SHA-256

2018-01-04 Thread Peter Eisentraut
On 1/4/18 16:17, Tom Lane wrote: > Peter Eisentraut writes: >> Some hosts don't seem to have X509_get_signature_nid(). Looking into >> that ... > > dromedary is whinging about OBJ_find_sigid_algs, as well. Yeah, it seems like we might need to fine-tune this a bit more to make it work across all

Re: [HACKERS] GSoC 2017 : Patch for predicate locking in Gist index

2018-01-04 Thread Alexander Korotkov
On Thu, Jan 4, 2018 at 7:07 PM, Andrey Borodin wrote: > 29 нояб. 2017 г., в 22:50, Shubham Barai > написал(а): > > I have fixed formatting style. Please take a look at updated patch. > > > Here's rebased patch. Every issue has been addressed, so I'm marking this > patch as ready for committer.

Re: [HACKERS] Proposal: Local indexes for partitioned table

2018-01-04 Thread Peter Eisentraut
On 1/4/18 12:00, Robert Haas wrote: >> The catalog representations of partitioned tables and partitioned >> indexes are completely different, which may or may not be desirable. > > How so? If someone wants to write a query, show me all the partitions of this table versus show me all the partition

Re: [HACKERS] [PATCH] Incremental sort

2018-01-04 Thread Alexander Korotkov
On Fri, Dec 8, 2017 at 4:06 PM, Alexander Korotkov < a.korot...@postgrespro.ru> wrote: > Thank you for pointing that. Sure, both cases are better. I've added > second case as well as comments. Patch is attached. > I just found that patch apply is failed according to commitfest.cputube.org. Ple

Re: [HACKERS] UPDATE of partition key

2018-01-04 Thread Robert Haas
On Wed, Jan 3, 2018 at 6:29 AM, Amit Khandekar wrote: > ExecSetupPartitionTupleRouting() now returns PartitionTupleRouting *. > > Did this change in v3 version of > 0001-Encapsulate-partition-related-info-in-a-structure.patch I'll have to come back to some of the other open issues, but 0001 and 0

Re: Finalizing logical replication limitations as well as potential features

2018-01-04 Thread Alvaro Herrera
Joshua D. Drake wrote: > We just queue/audit the changes as they happen and sync up the changes > after the initial sync completes. This already happens. There is an initial sync, and there's logical decoding that queues any changes that exist "after" the sync's snapshot. What you seem to want

Re: Fwd: [BUGS] pg_trgm word_similarity inconsistencies or bug

2018-01-04 Thread Alexander Korotkov
On Wed, Dec 13, 2017 at 2:13 PM, Alexander Korotkov < a.korot...@postgrespro.ru> wrote: > On Tue, Dec 12, 2017 at 2:33 PM, Teodor Sigaev wrote: > >> 0002-pg-trgm-strict_word-similarity.patch – implementation of >>> strict_word_similarity() with comments, docs and tests. >>> >> After some looking

Re: [JDBC] [HACKERS] Channel binding support for SCRAM-SHA-256

2018-01-04 Thread Tom Lane
Peter Eisentraut writes: > Some hosts don't seem to have X509_get_signature_nid(). Looking into > that ... dromedary is whinging about OBJ_find_sigid_algs, as well. regards, tom lane

Re: [JDBC] [HACKERS] Channel binding support for SCRAM-SHA-256

2018-01-04 Thread Peter Eisentraut
On 1/4/18 15:41, Peter Eisentraut wrote: > On 12/28/17 02:19, Michael Paquier wrote: >> On Wed, Dec 27, 2017 at 09:27:40AM +0900, Michael Paquier wrote: >>> On Tue, Dec 26, 2017 at 03:28:09PM -0500, Peter Eisentraut wrote: On 12/22/17 03:10, Michael Paquier wrote: > Second thoughts on 0002

Re: Condition variable live lock

2018-01-04 Thread Andres Freund
On 2018-01-04 12:39:47 -0500, Robert Haas wrote: > > Given that the proclist_contains() checks in condition_variable.c are > > already racy, I think it might be feasible to collect all procnos to > > signal while holding the spinlock, and then signal all of them in one > > go. > > That doesn't see

Re: pgsql: Add parallel-aware hash joins.

2018-01-04 Thread Andres Freund
On 2018-01-04 15:16:15 -0500, Tom Lane wrote: > Andres Freund writes: > > On 2018-01-04 11:20:33 -0800, Andres Freund wrote: > >> Some packages on skink have been upgraded. It appears that there either > >> was a libc or valgrind change that made valgrind not recognize that a > >> pointer of 0 mig

Re: [JDBC] [HACKERS] Channel binding support for SCRAM-SHA-256

2018-01-04 Thread Peter Eisentraut
On 12/28/17 02:19, Michael Paquier wrote: > On Wed, Dec 27, 2017 at 09:27:40AM +0900, Michael Paquier wrote: >> On Tue, Dec 26, 2017 at 03:28:09PM -0500, Peter Eisentraut wrote: >>> On 12/22/17 03:10, Michael Paquier wrote: Second thoughts on 0002 as there is actually no need to move around >>

Re: GSoC 2018

2018-01-04 Thread Stephen Frost
Greetings -hackers, * Stephen Frost (sfr...@snowman.net) wrote: > The deadline for Mentoring organizations to apply is: January 23. We currently only have four (4) projects for 2018 listed on our projects page here: https://wiki.postgresql.org/index.php?title=GSoC_2018 Last year we had quite a

Re: Finalizing logical replication limitations as well as potential features

2018-01-04 Thread Joshua D. Drake
On 12/21/2017 06:15 PM, Craig Ringer wrote: On 22 December 2017 at 05:24, Joshua D. Drake > wrote: -Hackers, Lastly, I noted that a full sync of a replication set is performed by a COPY, this is fine for small sets but if we have a large data set

Re: pgsql: Add parallel-aware hash joins.

2018-01-04 Thread Tom Lane
Andres Freund writes: > On 2018-01-04 11:20:33 -0800, Andres Freund wrote: >> Some packages on skink have been upgraded. It appears that there either >> was a libc or valgrind change that made valgrind not recognize that a >> pointer of 0 might not point anywhere :( > ==5718== Invalid write of si

Re: pgsql: Add parallel-aware hash joins.

2018-01-04 Thread Andres Freund
On 2018-01-04 11:20:33 -0800, Andres Freund wrote: > On 2018-01-04 12:11:37 -0500, Tom Lane wrote: > > Robert Haas writes: > > > On Thu, Jan 4, 2018 at 11:00 AM, Tom Lane wrote: > > >> Also, what the devil is happening on skink? > > > > > So, skink is apparently dying during shutdown of a user-c

Re: [HACKERS] wrong t_bits alignment in pageinspect

2018-01-04 Thread Tom Lane
Maksim Milyutin writes: > Attached a new version of patch with regression test. Looks good, pushed. I also removed one error check from tuple_data_split --- there doesn't seem to be a lot of point in checking that bits_str_len is some multiple of 8 when we're about to check that it's equal to a

Re: bug? import foreign schema forgets to import column description

2018-01-04 Thread Fabrízio de Royes Mello
On Thu, Jan 4, 2018 at 5:20 PM, Tom Lane wrote: > > Erik Rijkers writes: > > Using IMPORT FOREIGN SCHEMA I notice that the column descriptions of > > the remote tables are not taken along to the imported schema. > > Comments, you mean? > > > Do you agree this is an oversight that should be fixe

Re: [HACKERS] Proposal: Local indexes for partitioned table

2018-01-04 Thread Alvaro Herrera
Peter Eisentraut wrote: > CompareIndexInfo() doesn't compare indexes' operator classes and collations. Hmm ... will look into these. > As mentioned elsewhere already, the tests fail because \di shows the > owner, which can vary between sites. Already fixed in v10 which I posted this morning. -

Re: bug? import foreign schema forgets to import column description

2018-01-04 Thread Tom Lane
Erik Rijkers writes: > Using IMPORT FOREIGN SCHEMA I notice that the column descriptions of > the remote tables are not taken along to the imported schema. Comments, you mean? > Do you agree this is an oversight that should be fixed? Not particularly. It certainly isn't a bug.

Re: pgsql: Add parallel-aware hash joins.

2018-01-04 Thread Andres Freund
On 2018-01-04 12:11:37 -0500, Tom Lane wrote: > Robert Haas writes: > > On Thu, Jan 4, 2018 at 11:00 AM, Tom Lane wrote: > >> Also, what the devil is happening on skink? > > > So, skink is apparently dying during shutdown of a user-connected > > backend, and specifically the one that executed th

Re: [HACKERS] Proposal: Local indexes for partitioned table

2018-01-04 Thread Alvaro Herrera
Robert Haas wrote: > On Thu, Jan 4, 2018 at 11:44 AM, Peter Eisentraut > wrote: > > I'm not sure why this feature of automatically picking up matching > > indexes even exists. Is it for some specific workflows or upgrade > > scenarios? It's kind of a surprising feature in a way. > > It allows y

Re: [HACKERS] wrong t_bits alignment in pageinspect

2018-01-04 Thread Andrey Borodin
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: not tested Spec compliant: tested, passed Documentation:tested, passed Everything is fixed, works properly and I have no new notices. I

Re: [HACKERS] path toward faster partition pruning

2018-01-04 Thread Jesper Pedersen
Hi Amit, On 12/21/2017 11:25 PM, Amit Langote wrote: Thanks again. Please find attached updated patches. I have been looking at this patch from a simple hash partition point of view. -- ddl.sql -- CREATE TABLE t1 ( a integer NOT NULL, b integer NOT NULL ) PARTITION BY HASH (b); C

Re: [HACKERS] wrong t_bits alignment in pageinspect

2018-01-04 Thread Maksim Milyutin
Hi! 02.01.2018 12:33, Andrey Borodin wrote: 15 дек. 2017 г., в 18:53, Maksim Milyutin написал(а): I found out the problem in exposing values of t_bits field from heap_page_items function. Probably, this [0] place contains similar bug too? [0] https://github.com/postgres/postgres/blob/mast

Re: explain analyze output with parallel workers - question about meaning of information for explain.depesz.com

2018-01-04 Thread Robert Haas
On Wed, Dec 20, 2017 at 3:38 AM, Amit Kapila wrote: > On Tue, Dec 19, 2017 at 11:37 PM, Robert Haas wrote: >> On Wed, Dec 13, 2017 at 9:18 PM, Amit Kapila wrote: >>> Thanks. I think now we can proceed with >>> fix_accum_instr_parallel_workers_v8.patch posted above which will fix >>> the origina

Re: [HACKERS] MERGE SQL Statement for PG11

2018-01-04 Thread Robert Haas
On Thu, Jan 4, 2018 at 12:38 PM, Simon Riggs wrote: > On 4 January 2018 at 17:29, Robert Haas wrote: >> On Sat, Dec 30, 2017 at 6:01 AM, Simon Riggs wrote: >>> Patch uses mechanism as agreed previously with Peter G et al. on this >>> thread. >> >> I'm not sure that an agreement was reached, or

Re: [HACKERS] MERGE SQL Statement for PG11

2018-01-04 Thread Simon Riggs
On 4 January 2018 at 17:29, Robert Haas wrote: > On Sat, Dec 30, 2017 at 6:01 AM, Simon Riggs wrote: >> Patch uses mechanism as agreed previously with Peter G et al. on this thread. > > I'm not sure that an agreement was reached, or what the substance of > that agreement was. I refer to this...

Re: Condition variable live lock

2018-01-04 Thread Robert Haas
On Fri, Dec 29, 2017 at 2:38 PM, Andres Freund wrote: > Hm, I'm not quite convinced by this approach. Partially because of the > backpatch issue you mention, partially because using the list length as > a limit doesn't seem quite nice. Seems OK to me. Certainly better than your competing proposa

Re: [HACKERS] MERGE SQL Statement for PG11

2018-01-04 Thread Robert Haas
On Sat, Dec 30, 2017 at 6:01 AM, Simon Riggs wrote: > Patch uses mechanism as agreed previously with Peter G et al. on this thread. I'm not sure that an agreement was reached, or what the substance of that agreement was. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise Po

Re: heads up: Fix for intel hardware bug will lead to performance regressions

2018-01-04 Thread Robert Haas
On Tue, Jan 2, 2018 at 5:23 PM, Andres Freund wrote: > To get closer to the worst case, I've also measured: > > pgbench SELECT 1, 16 clients, i7-6820HQ CPU (skylake): > > pti=off: > tps = 420490.162391 > > pti=on: > tps = 350746.065039 (~0.83x) > > pti=on, nopcid: > tps = 324269.903152 (~0.77x) >

Re: pgsql: Add parallel-aware hash joins.

2018-01-04 Thread Tom Lane
Robert Haas writes: > On Thu, Jan 4, 2018 at 11:00 AM, Tom Lane wrote: >> Also, what the devil is happening on skink? > So, skink is apparently dying during shutdown of a user-connected > backend, and specifically the one that executed the 'tablespace' test. Well, yeah, valgrind is burping: the

Re: [HACKERS] Proposal: Local indexes for partitioned table

2018-01-04 Thread Robert Haas
On Thu, Jan 4, 2018 at 11:44 AM, Peter Eisentraut wrote: > I'm not sure why this feature of automatically picking up matching > indexes even exists. Is it for some specific workflows or upgrade > scenarios? It's kind of a surprising feature in a way. It allows you to avoid building a new indexe

Re: pgsql: Add parallel-aware hash joins.

2018-01-04 Thread Robert Haas
On Thu, Jan 4, 2018 at 11:00 AM, Tom Lane wrote: > Also, what the devil is happening on skink? I looked at the server log for the first of the two skink failures. The key lines seem to be: 2018-01-04 07:45:36.764 UTC [5a4ddb98.5a97:154] LOG: statement: DROP SCHEMA testschema CASCADE; 2018-01-04

bug? import foreign schema forgets to import column description

2018-01-04 Thread Erik Rijkers
Hi all, Using IMPORT FOREIGN SCHEMA I notice that the column descriptions of the remote tables are not taken along to the imported schema. I am usgin postgres_fdw to 'import' a schema with foreign tables (but the same omission happens with ordinary tables as well). This is a bug, no? Sur

Re: [HACKERS] Proposal: Local indexes for partitioned table

2018-01-04 Thread Peter Eisentraut
On 12/29/17 12:59, Alvaro Herrera wrote: >> Maybe we need a new "auto internal" deptype with a mix of semantics of >> the other two deptypes. It seems a bit ugly and I'm not sure it'd work >> either ... I'll try to code it tomorrow. > > This seems to work pretty well, much to my surprise. I was

Re: [HACKERS] Moving relation extension locks out of heavyweight lock manager

2018-01-04 Thread Robert Haas
On Tue, Jan 2, 2018 at 1:09 AM, Mithun Cy wrote: > So in case of N_RELEXTLOCK_ENTS = 1 we can see regression as high 25%. ? So now the question is: what do these results mean for this patch? I think that the chances of someone simultaneously bulk-loading 16 or more relations that all happen to

Re: [HACKERS] Runtime Partition Pruning

2018-01-04 Thread Alvaro Herrera
I tried this patch (applying it on Amit's last current version on top of 4e2970f8807f which is the latest it applies to) and regression tests fail with the attached diff; in all cases it appears to be an off-by-one in row count. Would you please give it a look? -- Álvaro Herrerah

Re: [HACKERS] path toward faster partition pruning

2018-01-04 Thread Alvaro Herrera
> From 8d627b910278203151853d324c3319c265cd36c0 Mon Sep 17 00:00:00 2001 > From: amit > Date: Tue, 22 Aug 2017 13:48:13 +0900 > Subject: [PATCH 2/5] Introduce a get_partitions_from_clauses() This one fails to apply. Please rebase. Did you know you can use "git format-patch -v6" to generate appr

Announcing Release 6 of PostgreSQL Buildfarm client

2018-01-04 Thread Andrew Dunstan
PostgreSQL Buildfarm client Release 6 is now available and can be downloaded from Features * use a persistent cache for configure, leading to a substantial performance improvement for that step, based on an idea from To

Re: [HACKERS] GSoC 2017 : Patch for predicate locking in Gist index

2018-01-04 Thread Andrey Borodin
Hello everyone!29 нояб. 2017 г., в 22:50, Shubham Barai написал(а): I have fixed formatting style. Please take a look at updated patch.Here's rebased patch. Every issue has been addressed, so I'm marking this patch as ready for committer.Best regards, Andrey Borodin. 000

Re: [HACKERS] path toward faster partition pruning

2018-01-04 Thread Ashutosh Bapat
On Fri, Dec 29, 2017 at 6:32 PM, Alvaro Herrera wrote: > I happened to notice that Ashutosh's patch series at > https://www.postgresql.org/message-id/CAFjFpReJhFSoy6DqH0ipFSHd=sLNEkSzAtz4VWCaS-w2jZL=u...@mail.gmail.com > has a 0001 patch that modifies the partition_bound_cmp stuff too. > Are those

Re: Enhance pg_stat_wal_receiver view to display connected host

2018-01-04 Thread Michael Paquier
On Thu, Jan 04, 2018 at 08:54:37AM -0300, Alvaro Herrera wrote: > I think more attention should be given to the libpq side of this patch; > maybe have a 0001 with only the new libpq function, to easily verify > that it does all it needs to do. It needs docs for the new function in > libpq.sgml; al

Re: Observations in Parallel Append

2018-01-04 Thread Robert Haas
On Wed, Jan 3, 2018 at 10:54 PM, Amit Kapila wrote: >> Here's a combined patch with some cosmetic changes which I will commit >> if it looks OK to you. > > Looks good to me. Committed. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company

Re: pgbench - add \if support

2018-01-04 Thread Vik Fearing
On 01/04/2018 07:32 AM, Fabien COELHO wrote: > > Another rebase to try to please the patch tester. Thank you. I plan on reviewing this over the weekend. -- Vik Fearing +33 6 46 75 15 36 http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Suppo

Re: Faster inserts with mostly-monotonically increasing values

2018-01-04 Thread Alvaro Herrera
Pavan Deolasee wrote: > On Tue, Jan 2, 2018 at 7:15 PM, Tels wrote: > > > Just a question trying to understand how btree indexes work: > > > > If one inserts ever-increasing value, is the tree a balanced tree with a > > minimum (or at least not-as-high) number of levels, or does it increase in >

Re: Deadlock in multiple CIC.

2018-01-04 Thread Alvaro Herrera
Alvaro Herrera wrote: > Pushed to all affected branches, along with a somewhat lame > isolationtester test for the condition (since we've already broken this > twice and not noticed for long). Buildfarm member okapi just failed this test in 9.4: 2018-01-04 02:44:43.481 PST [5a4e059a.3af1:6] ERRO

Re: Enhance pg_stat_wal_receiver view to display connected host

2018-01-04 Thread Michael Paquier
On Thu, Jan 04, 2018 at 05:21:02PM +1100, Haribabu Kommi wrote: > On Thu, Jan 4, 2018 at 11:53 AM, Michael Paquier > wrote: > > > On Wed, Jan 03, 2018 at 06:48:07PM +1100, Haribabu Kommi wrote: > > > On Wed, Jan 3, 2018 at 12:25 PM, Haribabu Kommi < > > kommi.harib...@gmail.com> > > > Last patch

Re: Faster inserts with mostly-monotonically increasing values

2018-01-04 Thread Pavan Deolasee
On Tue, Jan 2, 2018 at 7:15 PM, Tels wrote: > Moin, > > > >> > >> > > Hmm Ok. I am not entirely sure whether it's the depth or just purely > > binary > > searching through 3-4 index pages and/or pinning/unpinning buffers result > > in much overhead. I will run some more tests and collect evidence

Re: Enhance pg_stat_wal_receiver view to display connected host

2018-01-04 Thread Alvaro Herrera
I think more attention should be given to the libpq side of this patch; maybe have a 0001 with only the new libpq function, to easily verify that it does all it needs to do. It needs docs for the new function in libpq.sgml; also I wonder if checking conn->status before reporting values is necessar

Re: [PATCH] Logical decoding of TRUNCATE

2018-01-04 Thread Simon Riggs
On 29 December 2017 at 19:55, Andres Freund wrote: > Hi, > > On 2017-12-29 14:15:22 +0100, Marco Nenciarini wrote: >> This patch implements support for TRUNCATE statements >> in logical replication. The work has mainly done by Simon Riggs then >> finished by me. Tests are written by me. >> >> TRUN

Re: Unimpressed with pg_attribute_always_inline

2018-01-04 Thread Thomas Munro
On Tue, Jan 2, 2018 at 4:58 PM, Thomas Munro wrote: > On Tue, Jan 2, 2018 at 4:17 PM, Tom Lane wrote: >> gaur | nodeHashjoin.c:167: warning: `always_inline' attribute >> directive ignored >> mastodon | .\src\backend\executor\nodeHashjoin.c(165): warning C4141: >> 'inline' : used more th