Re: Early WIP/PoC for inlining CTEs

2019-01-01 Thread Andreas Karlsson
On 1/1/19 1:42 AM, Andrew Gierth wrote: "Andreas" == Andreas Karlsson writes: Andreas> I believe I have fixed these except for the comment on the Andreas> conditions for when we inline. Andreas> Andrew Gierth: Why did you chose to not inline on FOR UPDATE Andreas> but inline volatile

Re: Early WIP/PoC for inlining CTEs

2019-01-01 Thread Andreas Karlsson
On 1/1/19 3:18 AM, Andrew Gierth wrote: I had a comment around here which seems to have been lost: * Secondly, views (and explicit subqueries) currently have * different behaviour w.r.t. SELECT FOR UPDATE than CTEs do. A * FOR UPDATE clause is treated as extending into views and *

Re: [PATCH] get rid of StdRdOptions, use individual binary reloptions representation for each relation kind instead

2019-01-01 Thread Alvaro Herrera
One thing I would like to revise here is to avoid unnecessary API change -- for example the RelationHasCascadedCheckOption macro does not really need to be renamed because it only applies to views, so there's no possible conflict with other relation types. We can keep the original name and add a

Re: shared-memory based stats collector

2019-01-01 Thread Alvaro Herrera
On 2019-Jan-01, Tomas Vondra wrote: > I agree it's a sensitive part of the code, so additional reviews would > be welcome of course. I've done as much review and testing as possible, > and overall it seems in a fairly good shape. Do you have any particular > concerns / ideas what to look for? I

Re: bitmaps and correlation

2019-01-01 Thread Justin Pryzby
Attached for real. diff --git a/src/backend/optimizer/path/costsize.c b/src/backend/optimizer/path/costsize.c index 88780c0..1c25f36 100644 --- a/src/backend/optimizer/path/costsize.c +++ b/src/backend/optimizer/path/costsize.c @@ -548,11 +548,12 @@ cost_index(IndexPath *path, PlannerInfo *root,

bitmaps and correlation

2019-01-01 Thread Justin Pryzby
It's a new year and I'm getting reflective, so resuming a portion of conversation we had here: https://www.postgresql.org/message-id/CAMkU%3D1yVbwEAugaCmKWxjaX15ZduWee45%2B_DqCw--d_3N_O_%3DQ%40mail.gmail.com Find attached patch which implements use of correlation statistic in costing for bitmap

Re: Implicit make rules break test examples

2019-01-01 Thread Donald Dong
> I observe that ecpg's Makefile.regress is already doing #3: > %: %.o > $(CC) $(CFLAGS) $< $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@ > so what we'd be talking about is moving that to some more global spot, > probably Makefile.global. (I wonder why the target is not specified > as $@$(X)

Re: [PATCH][PROPOSAL] Add enum releation option type

2019-01-01 Thread Nikolay Shaplov
В письме от пятница, 2 ноября 2018 г. 23:52:13 MSK пользователь Nikolay Shaplov написал: > > In this case the only solution I can see is > > > > DETAIL: Valid values are: "value1", "value2", "value3". > > > > Where list '"value1", "value2", "value3"' is built in runtime but have no > > any

Re: Joins on TID

2019-01-01 Thread Tom Lane
Edmund Horner writes: > On Sat, 22 Dec 2018 at 12:34, Tom Lane wrote: >> I decided to spend an afternoon seeing exactly how much work would be >> needed to support parameterized TID scans, ie nestloop-with-inner-TID- >> scan joins, as has been speculated about before, most recently here: >> ...

Re: [PATCH] get rid of StdRdOptions, use individual binary reloptions representation for each relation kind instead

2019-01-01 Thread Nikolay Shaplov
В письме от пятница, 30 ноября 2018 г. 23:57:21 MSK пользователь Dmitry Dolgov написал: > Looks like there are some problems with this patch on windows: > src/backend/access/common/reloptions.c(1469): error C2059: syntax error : > '}' > >

Re: Implicit make rules break test examples

2019-01-01 Thread Tom Lane
Donald Dong writes: > Thank you for the explanation! That makes sense. It is strange that it does > not work for me. Yeah, I still can't account for the difference in behavior between your platform and mine (I tried several different ones here, and they all manage to build src/test/examples).

Re: explain plans with information about (modified) gucs

2019-01-01 Thread Pavel Stehule
út 1. 1. 2019 v 20:11 odesílatel Tomas Vondra napsal: > > > On 1/1/19 6:48 PM, Pavel Stehule wrote: > > > > > > út 1. 1. 2019 v 18:39 odesílatel Tomas Vondra > > mailto:tomas.von...@2ndquadrant.com>> > napsal: > > > > Attached is v4, changing how GUCs are picked for inclusion on the > query

Re: shared-memory based stats collector

2019-01-01 Thread Tomas Vondra
On 1/1/19 7:03 PM, Andres Freund wrote: > Hi, > > On 2019-01-01 18:39:12 +0100, Tomas Vondra wrote: >> On 11/29/18 1:18 PM, Alvaro Herrera wrote: >>> On 2018-Nov-28, Tomas Vondra wrote: >>> > v10-0004-Shared-memory-based-stats-collector.patch > updated not to touch guc. >

Re: explain plans with information about (modified) gucs

2019-01-01 Thread Tomas Vondra
On 1/1/19 6:48 PM, Pavel Stehule wrote: > > > út 1. 1. 2019 v 18:39 odesílatel Tomas Vondra > mailto:tomas.von...@2ndquadrant.com>> napsal: > > Attached is v4, changing how GUCs are picked for inclusion on the query > plans. Instead of picking the GUCs based on group and/or

Re: FETCH FIRST clause PERCENT option

2019-01-01 Thread Tomas Vondra
Hi, I've been looking at this patch today, and I think there's a couple of issues with the costing and execution. Consider a simple table with 1M rows: create table t as select i from generate_series(1,100) s(i); and these two queries, that both select 1% of rows select * from t fetch

Re: Implicit make rules break test examples

2019-01-01 Thread Donald Dong
Thank you for the explanation! That makes sense. It is strange that it does not work for me. > What platform are you on exactly, and what toolchain (gcc and ld > versions) are you using? I'm using Ubuntu 18.04.1 LTS. gcc version: gcc (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0 ld version: GNU ld

Re: shared-memory based stats collector

2019-01-01 Thread Andres Freund
Hi, On 2019-01-01 18:39:12 +0100, Tomas Vondra wrote: > On 11/29/18 1:18 PM, Alvaro Herrera wrote: > > On 2018-Nov-28, Tomas Vondra wrote: > > > >>> v10-0004-Shared-memory-based-stats-collector.patch > >>> updated not to touch guc. > >>> v10-0005-Remove-the-GUC-stats_temp_directory.patch > >>>

Re: Implicit make rules break test examples

2019-01-01 Thread Tom Lane
Donald Dong writes: > In src/test/example, the implicit make rules produce errors: Hm. "make" in src/test/examples works fine for me. The only way I can account for the results you're showing is if your linker is preferring libpq.a to libpq.so, so that reading the library before the *.o files

Re: explain plans with information about (modified) gucs

2019-01-01 Thread Pavel Stehule
út 1. 1. 2019 v 18:39 odesílatel Tomas Vondra napsal: > Attached is v4, changing how GUCs are picked for inclusion on the query > plans. Instead of picking the GUCs based on group and/or explicitly, a > new GUC_EXPLAIN flag is used for that. > > I went through GUCs defined in guc.c and marked

Re: explain plans with information about (modified) gucs

2019-01-01 Thread Tomas Vondra
Attached is v4, changing how GUCs are picked for inclusion on the query plans. Instead of picking the GUCs based on group and/or explicitly, a new GUC_EXPLAIN flag is used for that. I went through GUCs defined in guc.c and marked those in QUERY_TUNING* groups accordingly, with the exception of

Re: shared-memory based stats collector

2019-01-01 Thread Tomas Vondra
On 11/29/18 1:18 PM, Alvaro Herrera wrote: > On 2018-Nov-28, Tomas Vondra wrote: > >>> v10-0004-Shared-memory-based-stats-collector.patch >>> updated not to touch guc. >>> v10-0005-Remove-the-GUC-stats_temp_directory.patch >>> collected all guc-related changes. >>> updated not to break

Re: FETCH FIRST clause WITH TIES option

2019-01-01 Thread Tomas Vondra
Hi, On 11/24/18 10:28 AM, Surafel Temesgen wrote: > Attach is rebased patch against the current master > regards > Surafel > > On Thu, Nov 1, 2018 at 2:28 PM Surafel Temesgen > wrote: > > hi, > > The attached patch include all the comment given by Tomas

Re: [PATCH] check for ctags utility in make_ctags

2019-01-01 Thread Nikolay Shaplov
В письме от вторник, 1 января 2019 г. 11:24:11 MSK пользователь Michael Paquier написал: > Not sure if that's something worse bothering about, but you could do > the same in src/tools/make_etags. Good idea. Done. (I did not do it in the first place because I do not use etags and can't properly

Using vim for developing porstres wiki article

2019-01-01 Thread Nikolay Shaplov
I've been trying to use vim for postgres development some yeas ago, but I did not manage to do it for log time, as I quit the job etc. Now I am trying again, but I've lost my .vimrc and notes and had to start from the very beginning. I vaguely remember what tools I've been using, but I have to

Re: Offline enabling/disabling of data checksums

2019-01-01 Thread Michael Paquier
On Tue, Jan 01, 2019 at 11:42:49AM +0100, Michael Banck wrote: > Am Dienstag, den 01.01.2019, 11:38 +0900 schrieb Michael Paquier: >> About 3), aka --verify implied if no action is specified: >> - In favor: Fabien C, Magnus >> - Against: Michael P > > I think I'm in favor as well. Okay, it looks

Re: Removing --disable-strong-random from the code

2019-01-01 Thread Michael Paquier
On Mon, Dec 31, 2018 at 10:20:28AM +0900, Michael Paquier wrote: > I am attaching an updated patch. I'll do an extra pass on it in the > next couple of days and commit if there is nothing. The diff stats > are nice: > 32 files changed, 60 insertions(+), 1181 deletions(-) And committed. --

Re: Undo logs

2019-01-01 Thread Amit Kapila
On Sun, Dec 23, 2018 at 3:49 PM Dilip Kumar wrote: > > On Wed, Dec 12, 2018 at 3:03 PM Amit Kapila wrote: > > For addressing these issues related to multilog I have changed the > design as we discussed offlist. > 1) Now, at Do time we identify the log switch as you mentioned above > (identify

Re: Offline enabling/disabling of data checksums

2019-01-01 Thread Michael Banck
Hi, Am Dienstag, den 01.01.2019, 11:38 +0900 schrieb Michael Paquier: > On Sat, Dec 29, 2018 at 11:55:43AM +0100, Michael Banck wrote: > > Renaming applications shouldn't be a problem unless they have to be > > moved from one binary package to another. I assume all packagers ship > > all

Re: amcheck verification for GiST

2019-01-01 Thread Andrey Borodin
Hi, Peter! Thank you for the review! > 7 дек. 2018 г., в 3:59, Peter Geoghegan написал(а): > > On Sun, Sep 23, 2018 at 10:12 PM Andrey Borodin wrote: > * You do this: > >> +/* Check of an internal page. Hold locks on two pages at a time >> (parent+child). */ > > This isn't consistent with