Re: Early WIP/PoC for inlining CTEs

2019-02-16 Thread Andreas Karlsson
On 16/02/2019 22.14, Tom Lane wrote: I was expecting more controversy ... pushed that way. Thanks! And thanks to everyone else who worked on this patch! Andreas

Re: Actual Cost

2019-02-16 Thread Donald Dong
On Feb 16, 2019, at 6:44 PM, Tomas Vondra wrote: > > On 2/17/19 3:40 AM, David Fetter wrote: >> >> As someone not volunteering to do any of the work, I think it'd be a >> nice thing to have. How large an effort would you guess it would be >> to build a proof of concept? > > I don't quite

Re: Actual Cost

2019-02-16 Thread Tomas Vondra
On 2/17/19 3:40 AM, David Fetter wrote: > On Sat, Feb 16, 2019 at 03:10:44PM -0800, Donald Dong wrote: >> Hi, >> >> When explaining a query, I think knowing the actual rows and pages >> in addition to the operation type (e.g seqscan) would be enough to >> calculate the actual cost. The actual

Re: BUG #15548: Unaccent does not remove combining diacritical characters

2019-02-16 Thread Ramanarayana
Hi Hugh, The patch I submitted was tested both in python 2 and 3 and it worked for me.The single line of code added in the patch runs only in python 3. I dont think it can break python2. Would like to see the error you got in python 2 Good to know the reported issue is a valid one in windows.I

Re: Actual Cost

2019-02-16 Thread Donald Dong
On Feb 16, 2019, at 9:31 PM, Tom Lane wrote: > > Donald Dong writes: >> On Feb 16, 2019, at 6:44 PM, Tomas Vondra wrote: >>> I don't quite understand what is meant by "actual cost metric" and/or >>> how is that different from running EXPLAIN ANALYZE. > >> Here is an example: > >> Hash Join

Re: Channel binding

2019-02-16 Thread Michael Paquier
On Fri, Feb 15, 2019 at 10:21:12PM -0500, Bruce Momjian wrote: > Well, my point was that this features was considered to be very > important for PG 11, but for some reason there has been no advancement > of this features for PG 12. Yeah, it is unfortunate that we have not seen patches about that

Re: allow online change primary_conninfo

2019-02-16 Thread Michael Paquier
On Sat, Feb 16, 2019 at 02:50:35PM +0300, Sergei Kornilov wrote: > + if ((strcmp(conninfo, PrimaryConnInfo) != 0 || > + strcmp(slotname, PrimarySlotName) != 0) && > + WalRcvRunning()) > + { > + ereport(LOG, > +

Re: automatically assigning catalog toast oids

2019-02-16 Thread John Naylor
On 12/15/18, Andres Freund wrote: >> > [ separation of FirstBootstrapObjectId and FirstGenbkiObjectId ] I just noticed a small typo in transam.h. Patch attached. -John Naylor diff --git a/src/include/access/transam.h b/src/include/access/transam.h index 4a7eab00d8..444be4aeb5 100644 ---

Re: BUG #15548: Unaccent does not remove combining diacritical characters

2019-02-16 Thread Hugh Ranalli
On Mon, 11 Feb 2019 at 15:57, Ramanarayana wrote: > Hi Hugh, > > I tested the script in python 2.7 and it works perfect. The problem is in > python 3.7(and may be only in windows as you were not getting the issue) > and I was getting the following error > > UnicodeEncodeError: 'charmap' codec

Re: Spurious "apparent wraparound" via SimpleLruTruncate() rounding

2019-02-16 Thread Noah Misch
On Wed, Feb 13, 2019 at 11:26:23PM -0800, Noah Misch wrote: > On further study, I was able to reproduce data loss > Fixes are available: > > a. Fix the rounding in SimpleLruTruncate(). (The patch I posted upthread is >wrong; I will correct it in a separate message.) Here's a corrected

CPU costs of random_zipfian in pgbench

2019-02-16 Thread Tomas Vondra
Hi, I'm trying to use random_zipfian() for benchmarking of skewed data sets, and I ran head-first into an issue with rather excessive CPU costs. Consider an example like this: pgbench -i -s 1 test pgbench -s 1 -f zipf.sql -T 30 test where zipf.sql does this: \SET id

Re: Actual Cost

2019-02-16 Thread David Fetter
On Sat, Feb 16, 2019 at 03:10:44PM -0800, Donald Dong wrote: > Hi, > > When explaining a query, I think knowing the actual rows and pages > in addition to the operation type (e.g seqscan) would be enough to > calculate the actual cost. The actual cost metric could be useful > when we want to

Re: Early WIP/PoC for inlining CTEs

2019-02-16 Thread Tomas Vondra
On 2/16/19 10:14 PM, Tom Lane wrote: > Tomas Vondra writes: >> On 2/14/19 8:22 PM, Merlin Moncure wrote: >>> On Thu, Feb 14, 2019 at 10:02 AM Alvaro Herrera >>> wrote: On 2019-Feb-14, Peter Eisentraut wrote: > If we're not really planning to add any more options, I'd register a >

Re: Actual Cost

2019-02-16 Thread Tom Lane
Donald Dong writes: > On Feb 16, 2019, at 6:44 PM, Tomas Vondra wrote: >> I don't quite understand what is meant by "actual cost metric" and/or >> how is that different from running EXPLAIN ANALYZE. > Here is an example: > Hash Join (cost=3.92..18545.70 rows=34 width=32) (actual

Re: ALTER TABLE on system catalogs

2019-02-16 Thread John Naylor
On 2/8/19, Kyotaro HORIGUCHI wrote: > [v2 patch] I poked this around a bit and found that this mechanism only works for bootstrapped tables, as those are the only ones where we can scribble on pg_attribute entries directly during bootstrap. As such, with this patch we cannot perform ALTER TABLE

Re: Reviving the "Stopping logical replication protocol" patch from Vladimir Gordichuk

2019-02-16 Thread Dave Cramer
Andres, Thanks for looking at this. FYI, I did not originally write this, rather the original author has not replied to requests. JDBC could use this, I assume others could as well. That said I'm certainly open to suggestions on how to do this. Craig, do you have any other ideas? Dave Cramer

Re: allow online change primary_conninfo

2019-02-16 Thread Sergei Kornilov
Hi > If you do that, the startup process would try to jump to a different > source to fetch WAL if archiving is enabled. Is that really what we > want? Yes, similar behavior with exit walreceiver by any reason. Same as in all previous patch versions. (not sure this can be changed in some small

Re: 2019-03 CF Summary / Review - Tranche #2

2019-02-16 Thread Alexander Korotkov
On Sat, Feb 16, 2019 at 11:31 PM Andres Freund wrote: > On February 16, 2019 11:22:32 AM PST, Alexander Korotkov > wrote: > >On Sat, Feb 16, 2019 at 8:45 AM Andres Freund > >wrote: > >> - SQL/JSON: jsonpath > >> > >> WOA: This seems to need substantial further work before being > >>

Re: Early WIP/PoC for inlining CTEs

2019-02-16 Thread Tom Lane
Tomas Vondra writes: > On 2/14/19 8:22 PM, Merlin Moncure wrote: >> On Thu, Feb 14, 2019 at 10:02 AM Alvaro Herrera >> wrote: >>> On 2019-Feb-14, Peter Eisentraut wrote: If we're not really planning to add any more options, I'd register a light vote for MATERIALIZED. It reads easier,

Re: Synchronize with imath upstream

2019-02-16 Thread Noah Misch
On Sat, Feb 16, 2019 at 02:12:50PM -0500, Tom Lane wrote: > Noah Misch writes: > > On Thu, Feb 07, 2019 at 11:56:18PM -0500, Tom Lane wrote: > >> Maybe easier to keep the instructions in a separate README file? > > > Most imath.c patches have cause to update those lines, and patches to other > >

Re: 2019-03 CF Summary / Review - Tranche #2

2019-02-16 Thread Alexander Korotkov
On Sun, Feb 17, 2019 at 1:09 AM Alexander Korotkov wrote: > > On Sat, Feb 16, 2019 at 11:31 PM Andres Freund wrote: > > On February 16, 2019 11:22:32 AM PST, Alexander Korotkov > > wrote: > > >On Sat, Feb 16, 2019 at 8:45 AM Andres Freund > > >wrote: > > >> - SQL/JSON: jsonpath > > >> > > >>

Re: Compressed TOAST Slicing

2019-02-16 Thread Simon Riggs
On Thu, 6 Dec 2018 at 20:54, Paul Ramsey wrote: > On Sun, Dec 2, 2018 at 7:03 AM Rafia Sabih > wrote: > > > > The idea looks good and believing your performance evaluation it seems > > like a practical one too. > > Thank you kindly for the review! > Sounds good. Could we get an similarly

Re: Synchronize with imath upstream

2019-02-16 Thread Noah Misch
On Thu, Feb 07, 2019 at 11:56:18PM -0500, Tom Lane wrote: > Noah Misch writes: > > On Thu, Feb 07, 2019 at 10:12:05AM -0500, Tom Lane wrote: > >> I have no particular opinion on whether pgindent should be part of the > >> mix for imath, but I do strongly recommend setting up and documenting a >

Actual Cost

2019-02-16 Thread Donald Dong
Hi, When explaining a query, I think knowing the actual rows and pages in addition to the operation type (e.g seqscan) would be enough to calculate the actual cost. The actual cost metric could be useful when we want to look into how off is the planner's estimation, and the correlation between

Re: 2019-03 CF Summary / Review - Tranche #2

2019-02-16 Thread Alexander Korotkov
On Sat, Feb 16, 2019 at 8:45 AM Andres Freund wrote: > - SQL/JSON: jsonpath > > WOA: This seems to need substantial further work before being > committable > > Andres: +0.5 for punting to v13 I'm going to post updated patchset next week. All the issues highlighted will be resolved there.

Re: TupleTableSlot abstraction

2019-02-16 Thread Jeff Janes
On Fri, Nov 16, 2018 at 7:46 PM Andres Freund wrote: > Hi, > > On 2018-11-13 15:30:21 -0800, Andres Freund wrote: > > What I'm now planning to do is to go through the big comment in > > tuptable.h and update that to the new world. While I'm not convinced > > that that that's the best place for

Re: 2019-03 CF Summary / Review - Tranche #2

2019-02-16 Thread Michael Paquier
On Fri, Feb 15, 2019 at 09:45:26PM -0800, Andres Freund wrote: > - Making WAL receiver startup rely on GUC context for primary_conninfo > and primary_slot_name > > NR: I think this should be rejected. As noted in the thread, this > doesn't actually buy us much, and has some potential costs

Re: Synchronize with imath upstream

2019-02-16 Thread Tom Lane
Noah Misch writes: > On Thu, Feb 07, 2019 at 11:56:18PM -0500, Tom Lane wrote: >> Maybe easier to keep the instructions in a separate README file? > Most imath.c patches have cause to update those lines, and patches to other > files almost never do. Hence, I think hackers are more likely to

Re: 2019-03 CF Summary / Review - Tranche #2

2019-02-16 Thread Andres Freund
Hi, On February 16, 2019 11:22:32 AM PST, Alexander Korotkov wrote: >On Sat, Feb 16, 2019 at 8:45 AM Andres Freund >wrote: >> - SQL/JSON: jsonpath >> >> WOA: This seems to need substantial further work before being >> committable >> >> Andres: +0.5 for punting to v13 > >I'm going to post

Re: Early WIP/PoC for inlining CTEs

2019-02-16 Thread Jonathan S. Katz
On 2/16/19 4:14 PM, Tom Lane wrote: > Tomas Vondra writes: >> On 2/14/19 8:22 PM, Merlin Moncure wrote: >>> On Thu, Feb 14, 2019 at 10:02 AM Alvaro Herrera >>> wrote: On 2019-Feb-14, Peter Eisentraut wrote: > If we're not really planning to add any more options, I'd register a >

Re: [Patch][WiP] Tweaked LRU for shared buffers

2019-02-16 Thread Tomas Vondra
On 2/16/19 10:36 AM, Vladimir Sitnikov wrote: > Benjamin> A related and helpful patch would be to capture the access log and > Benjamin> provide anonymized traces. > > The traces can be captured via DTrace scripts, so no patch is required here. > Right. Or a BPF on reasonably new linux kernels.

Re: ToDo: show size of partitioned table

2019-02-16 Thread Pavel Stehule
pá 15. 2. 2019 v 7:50 odesílatel Amit Langote napsal: > Hi Pavel, > > Thanks for updating the patch. > > On 2019/02/08 17:26, Pavel Stehule wrote: > > I renamed originally calculated column "size" to "direct partitions size" > > .. see Alvaro's comment. Then I introduced new column "total

Re: libpq host/hostaddr/conninfo inconsistencies

2019-02-16 Thread Ramanarayana
Hi, I am getting error while applying patch.I think the patch needs to be redone on the latest code in master as there are some commits in master after the patch is created On Sat, 16 Feb 2019 at 13:44, Fabien COELHO wrote: > > Hello Kyotaro-san, > > > On such standpoint, the first hunk in the

Re: allow online change primary_conninfo

2019-02-16 Thread Sergei Kornilov
Hi > I don't quite think this is the right design. IMO the startup process > should signal the walreceiver to shut down, and the wal receiver should > never look at the config. Ok, i can rewrite such way. Please check attached version. > Otherwise there's chances for knowledge of > pg.conf to

Re: libpq host/hostaddr/conninfo inconsistencies

2019-02-16 Thread Fabien COELHO
Hello Kyotaro-san, On such standpoint, the first hunk in the patch attracted my eyes. host -Name of host to connect to.host name -If a host name begins with a slash, it specifies Unix-domain -communication rather than TCP/IP communication; the

Re: [Patch][WiP] Tweaked LRU for shared buffers

2019-02-16 Thread Benjamin Manes
Hi, I was not involved with Andrey and his team's work, which looks like a very promising first pass. I can try to clarify a few minor details. What is CAR? Did you mean ARC, perhaps? CAR is the Clock variants of ARC: CAR: Clock with Adaptive Replacement

Re: [Patch][WiP] Tweaked LRU for shared buffers

2019-02-16 Thread Benjamin Manes
> > No, I "synchronized scans" are an optimization to reduce I/O when multiple > processes do sequential scan on the same table. Oh, very neat. Thanks! Interesting. I assume the trace is essentially a log of which blocks were > requested? Is there some trace format specification somewhere? >

Re: [Patch][WiP] Tweaked LRU for shared buffers

2019-02-16 Thread Vladimir Sitnikov
Benjamin> A related and helpful patch would be to capture the access log and Benjamin> provide anonymized traces. The traces can be captured via DTrace scripts, so no patch is required here. For instance:

Re: DNS SRV support for LDAP authentication

2019-02-16 Thread Thomas Munro
On Sat, Feb 2, 2019 at 12:48 AM Daniel Gustafsson wrote: > + new_uris = psprintf("%s%s%s://%s:%d", > > While this construction isn't introduced in this patch, would it not make > sense > to convert uris to StringInfo instead to improve readability? Yeah. This coding is ugly and

Re: Online verification of checksums

2019-02-16 Thread Michael Banck
Hi, Am Mittwoch, den 06.02.2019, 11:39 -0500 schrieb Stephen Frost: > * Michael Banck (michael.ba...@credativ.de) wrote: > > Am Dienstag, den 05.02.2019, 11:30 +0100 schrieb Tomas Vondra: > > > On 2/5/19 8:01 AM, Andres Freund wrote: > > > > On 2019-02-05 06:57:06 +0100, Fabien COELHO wrote: > >