RE: Timeout parameters

2019-03-02 Thread Fabien COELHO
About the tcp_user_timeout libpq parameter v8. Basically same thing about the tcp_user_timeout guc v8, especially: do you have any advice about how I can test the feature, i.e. trigger a timeout? Patch applies & compiles cleanly. Global check is ok, although there are no specific tests.

Re: Online verification of checksums

2019-03-02 Thread Fabien COELHO
Bonjour Michaël, I gotta say, my conclusion from this debate is that it's simply a mistake to do this without involvement of the server that can use locking to prevent these kind of issues. It seems pretty absurd to me to have hacky workarounds around partial writes of a live server, around tr

Re: WIP: BRIN multi-range indexes

2019-03-02 Thread Alexander Korotkov
On Sun, Mar 3, 2019 at 12:12 AM Tomas Vondra wrote: > On 3/2/19 10:05 AM, Alexander Korotkov wrote: > > assuming it's not AM-defined function, but function used for > > inter-opclass compatibility. > > I'm not sure I understand what you mean by this. Can you elaborate? Does > the current implement

Re: POC: converting Lists into arrays

2019-03-02 Thread Andres Freund
Hi, On 2019-03-02 18:11:43 -0500, Tom Lane wrote: > I wonder what test cases Andres has been looking at that convince > him that we need a reimplementation of Lists. My main observation was from when the expression evaluation was using lists all over. List iteration overhead was very substantial

Re: WIP: BRIN multi-range indexes

2019-03-02 Thread Alexander Korotkov
On Sun, Mar 3, 2019 at 12:25 AM Tomas Vondra wrote: > I've looked at that patch only very briefly so far, but I agree it's > likely a better solution than what my patch does at the moment (which I > agree is a misuse of the AM-level options). I'll take a closer look. > > I agree it makes sense to

Re: NOT IN subquery optimization

2019-03-02 Thread Tom Lane
David Rowley writes: > On Sun, 3 Mar 2019 at 05:25, Tom Lane wrote: >> My initial thought about plugging that admittedly-academic point is >> to insist that the join operator be both strict and a member of a >> btree opclass (hash might be OK too; less sure about other index types). > Why strict

Re: NOT IN subquery optimization

2019-03-02 Thread David Rowley
On Sun, 3 Mar 2019 at 05:25, Tom Lane wrote: > Hmm ... thinking about the strictness angle some more: what we really > need to optimize NOT IN, IIUC, is an assumption that the join operator > will never return NULL. While not having NULL inputs is certainly a > *necessary* condition for that (ass

Re: Online verification of checksums

2019-03-02 Thread Tomas Vondra
On 3/3/19 12:48 AM, Michael Paquier wrote: > On Sat, Mar 02, 2019 at 02:00:31PM -0800, Andres Freund wrote: >> I gotta say, my conclusion from this debate is that it's simply a >> mistake to do this without involvement of the server that can use >> locking to prevent these kind of issues. It seems

Re: Proving IS NOT NULL inference for ScalarArrayOpExpr's

2019-03-02 Thread James Coleman
On Sat, Mar 2, 2019 at 5:29 PM Tom Lane wrote: > > James Coleman writes: > > On Fri, Mar 1, 2019 at 5:28 PM Tom Lane wrote: > >> I also tweaked it to recognize the case where we can prove the > >> array, rather than the scalar, to be null. I'm not sure how useful > >> that is in practice, but i

Re: Online verification of checksums

2019-03-02 Thread Michael Paquier
On Sat, Mar 02, 2019 at 02:00:31PM -0800, Andres Freund wrote: > I gotta say, my conclusion from this debate is that it's simply a > mistake to do this without involvement of the server that can use > locking to prevent these kind of issues. It seems pretty absurd to me > to have hacky workarounds

Re: POC: converting Lists into arrays

2019-03-02 Thread Tom Lane
Here's a v3 incorporating Andres' idea of trying to avoid a separate palloc for the list cell array. In a 64-bit machine we can have up to five ListCells in the initial allocation without actually increasing space consumption at all compared to the old code. So only when a List grows larger than

Re: Proving IS NOT NULL inference for ScalarArrayOpExpr's

2019-03-02 Thread Tom Lane
James Coleman writes: > On Fri, Mar 1, 2019 at 5:28 PM Tom Lane wrote: >> I also tweaked it to recognize the case where we can prove the >> array, rather than the scalar, to be null. I'm not sure how useful >> that is in practice, but it seemed weird that we'd exploit that >> only if we can also

Re: Online verification of checksums

2019-03-02 Thread Andres Freund
Hi, On 2019-03-02 22:49:33 +0100, Tomas Vondra wrote: > > > On 3/2/19 5:08 PM, Stephen Frost wrote: > > Greetings, > > > > * Michael Banck (michael.ba...@credativ.de) wrote: > >> Am Freitag, den 01.03.2019, 18:03 -0500 schrieb Robert Haas: > >>> On Tue, Sep 18, 2018 at 10:37 AM Michael Banck >

Re: Online verification of checksums

2019-03-02 Thread Tomas Vondra
On 3/2/19 5:08 PM, Stephen Frost wrote: > Greetings, > > * Michael Banck (michael.ba...@credativ.de) wrote: >> Am Freitag, den 01.03.2019, 18:03 -0500 schrieb Robert Haas: >>> On Tue, Sep 18, 2018 at 10:37 AM Michael Banck >>> wrote: I have added a retry for this as well now, without a pg

Re: Online verification of checksums

2019-03-02 Thread Tomas Vondra
On 3/2/19 12:03 AM, Robert Haas wrote: > On Tue, Sep 18, 2018 at 10:37 AM Michael Banck > wrote: >> I have added a retry for this as well now, without a pg_sleep() as well. >> This catches around 80% of the half-reads, but a few slip through. At >> that point we bail out with exit(1), and the user

Re: Proving IS NOT NULL inference for ScalarArrayOpExpr's

2019-03-02 Thread James Coleman
On Fri, Mar 1, 2019 at 5:28 PM Tom Lane wrote: > > James Coleman writes: > > [ saop_is_not_null-v10.patch ] > > I went through this again, and this time (after some more rewriting > of the comments) I satisfied myself that the logic is correct. > Hence, pushed. Thanks! > I also tweaked it to re

Re: WIP: BRIN multi-range indexes

2019-03-02 Thread Tomas Vondra
On 3/2/19 10:00 AM, Alexander Korotkov wrote: > Hi! > > I'm starting to look at this patchset. In the general, I think it's > very cool! We definitely need this. > > On Tue, Apr 3, 2018 at 10:51 PM Tomas Vondra > wrote: >> 1) index parameters >> >> The main improvement of this version is an

Re: WIP: BRIN multi-range indexes

2019-03-02 Thread Tomas Vondra
On 3/2/19 10:05 AM, Alexander Korotkov wrote: > On Sun, Mar 4, 2018 at 3:15 AM Tomas Vondra > wrote: >> I've been thinking about this after looking at 0a459cec96, and I don't >> think this patch has the same issues. One reason is that just like the >> original minmax opclass, it does not really

GSoC 2019 - TOAST'ing in slices idea

2019-03-02 Thread Bruno Hass
Hello everyone, I am currently writing my proposal for GSoC 2019 for the TOAST'ing in slices idea. I already have a sketch of the description and approach outline, which I am sending in this e-mail. I would be happy to

Re: GSoC 2019

2019-03-02 Thread Andrey Borodin
Hello! > 2 марта 2019 г., в 21:40, Stephen Frost написал(а): > > Greetings, > > * Sumukha Pk (sumukhap...@gmail.com) wrote: >> I am Sumukha PK a student of NITK. I am interested in the WAL-G backup tool. >> I haven’t been able to catch hold of anyone through the IRC channels so I >> need some

Re: GSoC 2019

2019-03-02 Thread Stephen Frost
Greetings, * Sumukha Pk (sumukhap...@gmail.com) wrote: > I am Sumukha PK a student of NITK. I am interested in the WAL-G backup tool. > I haven’t been able to catch hold of anyone through the IRC channels so I > need someone to point me to appropriate resources so that I can be introduced > to

Re: NOT IN subquery optimization

2019-03-02 Thread Tom Lane
David Rowley writes: > On Sat, 2 Mar 2019 at 13:45, Tom Lane wrote: >> Yeah --- that has a nontrivial risk of making things significantly worse, >> which makes it a hard sell. I think the most reasonable bet here is >> simply to not perform the transformation if we can't prove the inner side >>

Re: Online verification of checksums

2019-03-02 Thread Stephen Frost
Greetings, * Michael Banck (michael.ba...@credativ.de) wrote: > Am Freitag, den 01.03.2019, 18:03 -0500 schrieb Robert Haas: > > On Tue, Sep 18, 2018 at 10:37 AM Michael Banck > > wrote: > > > I have added a retry for this as well now, without a pg_sleep() as well. > > > This catches around 80% o

Re: Question about pg_upgrade from 9.2 to X.X

2019-03-02 Thread Perumal Raj
Hi Sergei and Team Could you share your observation further. Perumal Raju On Thu, Feb 28, 2019, 11:21 AM Perumal Raj wrote: > here is the data, > > postgres=# \c template1 > You are now connected to database "template1" as user "postgres". > template1=# \dx > List of installe

Re: NOT IN subquery optimization

2019-03-02 Thread David Rowley
On Sat, 2 Mar 2019 at 13:45, Tom Lane wrote: > > David Rowley writes: > > I think you're fighting a losing battle here with adding OR quals to > > the join condition. > > Yeah --- that has a nontrivial risk of making things significantly worse, > which makes it a hard sell. I think the most reas

Re: [HACKERS] PATCH: multivariate histograms and MCV lists

2019-03-02 Thread David Rowley
On Fri, 1 Mar 2019 at 08:56, Tomas Vondra wrote: > Attached is an updated version of this patch series. I made a quick pass over the 0001 patch. I edited a few small things along the way; patch attached. I'll try to do a more in-depth review soon. -- David Rowley http://www.

RE: Timeout parameters

2019-03-02 Thread Fabien COELHO
Hello again Ryohei-san, About the tcp_user_timeout libpq parameter v8. Patch applies & compiles cleanly. Global check is ok, although there are no specific tests. Documentation English can be improved. Could a native speaker help, please? ISTM that the documentation both states that it w

Re: allow online change primary_conninfo

2019-03-02 Thread Sergei Kornilov
Hello This might be not the right way, but I can't think of a better way to not switch to a different method than split of lastSourceFailed processing and starting new source. Something like refactoring in first attached patch. I move RequestXLogStreaming logic from lastSourceFailed processing

Re: Online verification of checksums

2019-03-02 Thread Michael Banck
Hi, Am Freitag, den 01.03.2019, 18:03 -0500 schrieb Robert Haas: > On Tue, Sep 18, 2018 at 10:37 AM Michael Banck > wrote: > > I have added a retry for this as well now, without a pg_sleep() as well. > > This catches around 80% of the half-reads, but a few slip through. At > > that point we bail

Re: Looks heap_create_with_catalog ignored the if_not_exists options

2019-03-02 Thread Michael Paquier
On Sat, Mar 02, 2019 at 12:15:19AM +0800, Andy Fan wrote: > Looks we need some locking there, but since PG is processes model, I even > don't know how to sync some code among processes in PG (any hint on this > will be pretty good as well). No, you shouldn't need any kind of extra locking here. -

Re: pg_partition_tree crashes for a non-defined relation

2019-03-02 Thread Michael Paquier
On Fri, Mar 01, 2019 at 11:38:20AM -0500, Tom Lane wrote: > Right, while you'd get zero rows out for a non-partitioned table. > WFM. Exactly. I have committed a patch doing exactly that, and I have added test cases with a partitioned table and a partitioned index which have no partitions. -- Mic

Re: [PATCH 0/3] Introduce spgist quadtree @<(point,circle) operator

2019-03-02 Thread Alexander Korotkov
Hi! On Fri, Feb 1, 2019 at 7:08 PM Matwey V. Kornilov wrote: > This patch series is to add support for spgist quadtree @<(point,circle) > operator. The first two patches are to refactor existing code before > implemention the new feature. The third commit is the actual implementation > provided w

RE: Timeout parameters

2019-03-02 Thread Fabien COELHO
Hello Ryohei-san, There are three independent patches in this thread. About the socket timeout patch v7: Patch applies & compiles cleanly. "make check" is ok, although there are no specific tests, which is probably ok. Doc build is ok. I'd simplify the doc first sentence to: """ Number of

Re: WIP: BRIN multi-range indexes

2019-03-02 Thread Alexander Korotkov
On Sun, Mar 4, 2018 at 3:15 AM Tomas Vondra wrote: > I've been thinking about this after looking at 0a459cec96, and I don't > think this patch has the same issues. One reason is that just like the > original minmax opclass, it does not really mess with the data it > stores. It only does min/max on

Re: WIP: BRIN multi-range indexes

2019-03-02 Thread Alexander Korotkov
Hi! I'm starting to look at this patchset. In the general, I think it's very cool! We definitely need this. On Tue, Apr 3, 2018 at 10:51 PM Tomas Vondra wrote: > 1) index parameters > > The main improvement of this version is an introduction of a couple of > BRIN index parameters, next to page