Re: PATCH: Configurable file mode mask

2018-03-12 Thread Michael Paquier
On Fri, Mar 09, 2018 at 01:51:14PM -0500, David Steele wrote: > How about a GUC that enforces one mode or the other on startup? Default > would be 700. The GUC can be set automatically by initdb based on the > -g option. We had this GUC originally, but since the front-end tools > can't read it w

Re: [HACKERS] Another oddity in handling of WCO constraints in postgres_fdw

2018-03-12 Thread Etsuro Fujita
(2018/03/09 20:55), Etsuro Fujita wrote: (2018/03/08 14:24), Ashutosh Bapat wrote: For local constraints to be enforced, we use remote constraints. For local WCO we need to use remote WCO. That means we create many foreign tables pointing to same local table on the foreign server through many vi

Fix error in ECPG while connection handling

2018-03-12 Thread Jeevan Ladhe
Hi, I came across following error while working on ecpg client program. $ install/bin/ecpg ecpg_connection_ptr.pgc ecpg_connection_ptr.pgc:26: ERROR: AT option not allowed in WHENEVER statement I have attached simple ecpg program 'ecpg_connection_ptr_issue.pgc' that reproduces the above issue.

Re: Transform for pl/perl

2018-03-12 Thread Anthony Bykov
On Mon, 5 Mar 2018 14:03:37 +0100 Pavel Stehule wrote: > Hi > > I am looking on this patch. I found few issues: > > 1. compile warning > > I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 > -I/usr/lib64/perl5/CORE -c -o jsonb_plperl.o jsonb_plperl.c > jsonb_plperl.c: In function ‘SV_F

Re: GSOC 2018 proposal

2018-03-12 Thread Aleksander Alekseev
Hello Charles, > I am currently preparing a proposal for pg_thrift project. I noticed > that there are several protocols supported by thrift, which ones do we > have higher priority? I mean which ones I need to implement during > this project? Binary protocols, i.e. TBinaryProtocol and TCompactPr

Re: Protect syscache from bloating with negative cache entries

2018-03-12 Thread Kyotaro HORIGUCHI
At Fri, 09 Mar 2018 17:40:01 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI wrote in <20180309.174001.202113825.horiguchi.kyot...@lab.ntt.co.jp> > > In short, it's not really apparent to me that negative syscache entries > > are the major problem of this kind. I'm afraid that you're drawing ver

Re: Protect syscache from bloating with negative cache entries

2018-03-12 Thread Kyotaro HORIGUCHI
Oops. At Mon, 12 Mar 2018 17:34:08 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI wrote in <20180312.173408.162882093.horiguchi.kyot...@lab.ntt.co.jp> > Something like the sttached test script causes relcache This is that. #! /usr/bin/perl # printf("drop schema if exists test_schema;\n", $i

Re: Concurrency bug in UPDATE of partition-key

2018-03-12 Thread Amit Khandekar
On 8 March 2018 at 16:55, Amit Khandekar wrote: > The attached WIP patch is how the fix is turning out to be. > ExecDelete() passes back the epqslot returned by EvalPlanQual(). > ExecUpdate() uses this re-fetched tuple to re-process the row, just > like it does when heap_update() returns HeapTuple

Re: All Taxi Services need Index Clustered Heap Append

2018-03-12 Thread Konstantin Knizhnik
On 02.03.2018 19:30, Darafei "Komяpa" Praliaskouski wrote: Hi, I work at a ride sharing company and we found a simple scenario that Postgres has a lot to improve at. After my talk at pgconf.ru Alexander Korotkov encouraged me to share my story and thoughts in -hackers. S

Re: [WIP PATCH] Index scan offset optimisation using visibility map

2018-03-12 Thread Michail Nikolaev
Hello. > Sorry, seems like I've incorrectly expressed what I wanted to say. > I mean this Assert() can be checked before loop, not on every loop cycle. Yes, I understood it. Condition should be checked every cycle - at least it is done this way for index only scan: https://github.com/postgres/pos

Re: Failed to request an autovacuum work-item in silence

2018-03-12 Thread Ildar Musin
Hi, autovac_get_workitem_name() declaration seems redundant and should be removed. The same thing with including "utils/lsyscache.h" in brin.c. The 'requested' variable in brininsert() I would again rename to something like 'success' because a work item is requested anyway but what matters i

[HACKERS] Commitfest 2018-9 duplicate patch deletion request.

2018-03-12 Thread Shinoda, Noriyoshi
Dear Hackers, CFM Last week, I posted a patch to Commitfest 2018-9 which title is "[WIP] Document update for Logical Replication security". I do not know the reason, but the same content duplicated. Since I can not delete posts, would you please delete either one? Best regards, Noriyoshi Shino

Re: Prefix operator for text and spgist support

2018-03-12 Thread Ildus Kurbangaliev
On Tue, 6 Mar 2018 19:27:21 +0300 Arthur Zakirov wrote: > On Mon, Feb 19, 2018 at 05:19:15PM +0300, Ildus Kurbangaliev wrote: > > At brief look at this place seems better to move this block into > > pattern_fixed_prefix function. But there is also `vartype` variable > > which used to in prefix co

RE: Intermittent pg_ctl failures on Windows

2018-03-12 Thread Badrul Chowdhury
Hi Tom, This is a great catch. I am looking into it: I will start by reproducing the error as you suggested. Thanks, Badrul -Original Message- From: Tom Lane [mailto:t...@sss.pgh.pa.us] Sent: Saturday, March 10, 2018 2:48 PM To: pgsql-hackers@lists.postgresql.org Subject: Intermittent

Re: [HACKERS] MERGE SQL Statement for PG11

2018-03-12 Thread Pavan Deolasee
On Sun, Mar 11, 2018 at 11:18 AM, Peter Geoghegan wrote: > > It sounds like we should try to thoroughly understand why these > duplicates arose. Did you actually call EvalPlanQualSetPlan() for all > subplans at the time? > > The reason for duplicates or even wrong answers is quite simple. The way

Re: [HACKERS] Partition-wise aggregation/grouping

2018-03-12 Thread Ashutosh Bapat
On Fri, Mar 9, 2018 at 4:21 PM, Ashutosh Bapat wrote: > On Thu, Mar 8, 2018 at 7:31 PM, Robert Haas wrote: >> >> This kind of goes along with the suggestion I made yesterday to >> introduce a new function, which at the time I proposed calling >> initialize_grouping_rel(), to set up new grouped or

Re: [WIP PATCH] Index scan offset optimisation using visibility map

2018-03-12 Thread Andrey Borodin
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: tested, passed Spec compliant: tested, passed Documentation:tested, passed I've tested this patch with different types of order by, incl

Re: [HACKERS] Restrict concurrent update/delete with UPDATE of partition key

2018-03-12 Thread amul sul
On Mon, Mar 12, 2018 at 11:45 AM, amul sul wrote: > On Sat, Mar 10, 2018 at 5:25 PM, Amit Kapila wrote: >> On Fri, Mar 9, 2018 at 3:18 PM, amul sul wrote: >>> On Thu, Mar 8, 2018 at 12:31 PM, Amit Kapila >>> wrote: On Thu, Mar 8, 2018 at 11:04 AM, Pavan Deolasee > This is just on

Re: [HACKERS] [FEATURE PATCH] pg_stat_statements with plans (v02)

2018-03-12 Thread Julian Markwort
Arthur Zakirov wrote on 2018-03-09: > I'd like to review the patch and leave a feedback. I tested it with > different indexes on same table and with same queries and it works fine. Thanks for taking some time to review my patch, Arthur! > First of all, GUC variables and functions. How about union

Re: [HACKERS] Partition-wise aggregation/grouping

2018-03-12 Thread Jeevan Chalke
On Mon, Mar 12, 2018 at 6:07 PM, Ashutosh Bapat < ashutosh.ba...@enterprisedb.com> wrote: > On Fri, Mar 9, 2018 at 4:21 PM, Ashutosh Bapat > wrote: > > On Thu, Mar 8, 2018 at 7:31 PM, Robert Haas > wrote: > >> > >> This kind of goes along with the suggestion I made yesterday to > >> introduce a

Re: [HACKERS] Commitfest 2018-9 duplicate patch deletion request.

2018-03-12 Thread David Steele
On 3/12/18 6:12 AM, Shinoda, Noriyoshi wrote: > > Last week, I posted a patch to Commitfest 2018-9 which title is "[WIP] > Document update for Logical Replication security". > > I do not know the reason, but the same content duplicated. Since I can > not delete posts, would you please delete eith

Re: FOR EACH ROW triggers on partitioned tables

2018-03-12 Thread Peter Eisentraut
On 3/9/18 16:05, Alvaro Herrera wrote: > ... and this little addendum makes pg_dump work correctly. The header file says "recursing", but the .c file calls the argument "in_partition". -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA,

Google Summer of Code: Potential Applicant

2018-03-12 Thread Christos Maris
Hey there, My name is Christos (Chris for short) and I would love to work with you via the GSoC program this summer. I am sending this mail because I am in a need for some instructions on how to find a mentor and a project to work on. Can anyone help me with that? Also is there any potential men

Re: pg_serial early wraparound

2018-03-12 Thread Anastasia Lubennikova
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: tested, passed Spec compliant: not tested Documentation:not tested The patch doesn't break anything in regression tests and does the cod

Re: [HACKERS] GSoC 2017: weekly progress reports (week 4) and patch for hash index

2018-03-12 Thread Amit Kapila
On Mon, Mar 12, 2018 at 12:18 AM, Alexander Korotkov wrote: > On Sat, Mar 3, 2018 at 2:53 PM, Amit Kapila wrote: >> >> On Fri, Mar 2, 2018 at 9:27 AM, Thomas Munro >> > If that is indeed a race, could it be fixed by >> > calling PredicateLockPageSplit() at the start of _hash_splitbucket() >> > i

Re: Google Summer of Code: Potential Applicant

2018-03-12 Thread Aleksander Alekseev
Hello Chris, > I am sending this mail because I am in a need for some instructions on how > to find a mentor and a project to work on. > > Can anyone help me with that? Also is there any potential mentor here? Take a look on the list of our GSoC projects: https://wiki.postgresql.org/wiki/GSoC_2

Re:Re: [GSOC 18] Performance Farm Project——Initialization Project

2018-03-12 Thread Hongyuan Ma
Hi Dave, Thank you for your reminder. This is indeed my negligence. In fact, I have browsed the code in the pgperffarm.git repository, including the client folder and the web folder. However, I found that the web folder has some unfinished html files and does not contain model class files. And th

Re:Google Summer of Code: Potential Applicant

2018-03-12 Thread Hongyuan Ma
Hi, Maybe you can try searching for the name of the tutor for the item you are interested in on this page below. https://www.postgresql.org/list/pgsql-hackers/ Then you can find the email address of the tutor you want to contact, and then share your thoughts with him. It is exactly what I h

Re: [HACKERS] Partition-wise aggregation/grouping

2018-03-12 Thread Jeevan Chalke
On Mon, Mar 12, 2018 at 6:07 PM, Ashutosh Bapat < ashutosh.ba...@enterprisedb.com> wrote: > On Fri, Mar 9, 2018 at 4:21 PM, Ashutosh Bapat > > GroupPathExtraData now completely absorbs members from and replaces > OtherUpperPathExtraData. This means that we have to consider a way to > pass GroupPat

Re: FOR EACH ROW triggers on partitioned tables

2018-03-12 Thread Peter Eisentraut
On 3/9/18 15:41, Alvaro Herrera wrote: >> One thing I'd like to add before claiming this committable (backend- >> side) is enabling constraint triggers. AFAICT that requires a bit of >> additional logic, but it shouldn't be too terrible. This would allow >> for deferrable unique constraints, for

Re: Cast jsonb to numeric, int, float, bool

2018-03-12 Thread Komяpa
> > I think that only cast to a numeric type can be made implicit, because > it does not lose precision. > So, sum(jsonb) will work, but ST_MakePoint(float8, float8) still will > require an explicit cast. > What would be required to make ST_MakePoint(x, y) work? Will ST_MakePoint(numeric, numeric

Re: [patch] BUG #15005: ANALYZE can make pg_class.reltuples inaccurate.

2018-03-12 Thread Tom Lane
David Gould writes: > On Wed, 7 Mar 2018 21:39:08 -0800 > Jeff Janes wrote: >> As for preventing it in the first place, based on your description of your >> hardware and operations, I was going to say you need to increase the max >> number of autovac workers, but then I remembered you from "Autov

Re: Cast jsonb to numeric, int, float, bool

2018-03-12 Thread Tom Lane
Nikita Glukhov writes: > On 01.03.2018 11:19, Darafei "Komяpa" Praliaskouski wrote: >> I would expect some casts to be implicit, so that chaining with other >> functions is possible: > I think that only cast to a numeric type can be made implicit, because > it does not lose precision. I hadn't

Re: Transform for pl/perl

2018-03-12 Thread Pavel Stehule
2018-03-12 9:08 GMT+01:00 Anthony Bykov : > On Mon, 5 Mar 2018 14:03:37 +0100 > Pavel Stehule wrote: > > > Hi > > > > I am looking on this patch. I found few issues: > > > > 1. compile warning > > > > I../../src/include -D_GNU_SOURCE -I/usr/include/libxml2 > > -I/usr/lib64/perl5/CORE -c -o json

Re: JIT compiling with LLVM v11

2018-03-12 Thread Peter Eisentraut
On 3/11/18 14:25, Andres Freund wrote: >> It's perhaps a bit confusing that some of the jit_* settings take effect >> at plan time and some at execution time. At the moment, this mainly >> affects me reading the code ;-), but it would also have some effect on >> prepared statements and such. > Not

Re: Cast jsonb to numeric, int, float, bool

2018-03-12 Thread Komяpa
Hi Tom, > I hadn't been following this thread particularly, but I happened to notice > this bit, and I thought I'd better pop up to say No Way. There will be > *no* implicit casts from json to any numeric type. We have learned the > hard way that implicit cross-category casts are dangerous. >

Re: Jsonb transform for pl/python

2018-03-12 Thread Nikita Glukhov
On 01.02.2018 19:06, Peter Eisentraut wrote: On 1/12/18 10:43, Aleksander Alekseev wrote: The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: tested, passed Spec compliant: tested, passed Documenta

Re: PATCH: Unlogged tables re-initialization tests

2018-03-12 Thread Peter Eisentraut
On 3/11/18 05:11, Michael Paquier wrote: > On Fri, Mar 09, 2018 at 05:23:48PM -0500, Peter Eisentraut wrote: >> This seems like a useful test. >> >> On 3/5/18 12:35, David Steele wrote: >>> +mkdir($tablespaceDir) >>> + or die "unable to mkdir \"$tablespaceDir\""; >> >> Use BAIL_OUT instead of die

Re: PATCH: Unlogged tables re-initialization tests

2018-03-12 Thread David Steele
On 3/12/18 11:27 AM, Peter Eisentraut wrote: > On 3/11/18 05:11, Michael Paquier wrote: >> On Fri, Mar 09, 2018 at 05:23:48PM -0500, Peter Eisentraut wrote: >>> This seems like a useful test. >>> >>> On 3/5/18 12:35, David Steele wrote: +mkdir($tablespaceDir) + or die "unable to mkdir \"

Re: [HACKERS] proposal: schema variables

2018-03-12 Thread Pavel Luzanov
On 12.03.2018 09:54, Pavel Stehule wrote: 2018-03-12 7:49 GMT+01:00 Pavel Luzanov >: Is there any chances that it will work on replicas? ... sure, it should to work. Now, I am try to solve a issues on concept level - the LET code is based on DML code b

Re: pgsql: Local partitioned indexes

2018-03-12 Thread Alvaro Herrera
Amit Langote wrote: > Sorry, I'd missed reporting one more sentence that doesn't apply anymore. > Attached gets rid of that. Thanks, applied. -- Álvaro Herrerahttps://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Re: PATCH: Unlogged tables re-initialization tests

2018-03-12 Thread Dagfinn Ilmari Mannsåker
David Steele writes: > On 3/12/18 11:27 AM, Peter Eisentraut wrote: >> On 3/11/18 05:11, Michael Paquier wrote: >>> On Fri, Mar 09, 2018 at 05:23:48PM -0500, Peter Eisentraut wrote: This seems like a useful test. On 3/5/18 12:35, David Steele wrote: > +mkdir($tablespaceDir) >>>

Re: pgsql: Allow UNIQUE indexes on partitioned tables

2018-03-12 Thread Alvaro Herrera
David Rowley wrote: > On 20 February 2018 at 09:40, Alvaro Herrera wrote: > > Modified Files > > -- > > doc/src/sgml/ddl.sgml | 9 +- > > Attached is a very small fix to a small error this patch created in the docs. Pushed, thanks. -- Álvaro Herrera

Re: [HACKERS] proposal: schema variables

2018-03-12 Thread Pavel Stehule
2018-03-12 16:38 GMT+01:00 Pavel Luzanov : > > On 12.03.2018 09:54, Pavel Stehule wrote: > > > 2018-03-12 7:49 GMT+01:00 Pavel Luzanov : > >> >> Is there any chances that it will work on replicas? >> > ... > > sure, it should to work. Now, I am try to solve a issues on concept level > - the LET co

Re: [patch] BUG #15005: ANALYZE can make pg_class.reltuples inaccurate.

2018-03-12 Thread Tom Lane
I wrote: > Maybe this type of situation is an argument for trusting an ANALYZE-based > estimate more than the VACUUM-based estimate. I remain uncomfortable with > that in cases where VACUUM looked at much more of the table than ANALYZE > did, though. Maybe we need some heuristic based on the numb

Ambigous Plan - Larger Table on Hash Side

2018-03-12 Thread Narendra Pradeep U U
Hi , Recently I came across a case where the planner choose larger table on hash side. I am not sure whether it is an intended behavior or we are missing something. I have two tables (a and b) each with single column in it. One table 'a' is large with around 30 million

Re: pgsql: Allow UNIQUE indexes on partitioned tables

2018-03-12 Thread Alvaro Herrera
David G. Johnston wrote: > Something like: > > When establishing a unique constraint for a multi-level partition hierarchy > all the "partition by" columns of the target partitioned table, as well as > those of all its descendant partitioned tables, must be included in the > constraint definition

Re: Cast jsonb to numeric, int, float, bool

2018-03-12 Thread Tom Lane
=?UTF-8?Q?Darafei_=22Kom=D1=8Fpa=22_Praliaskouski?= writes: > But what would be the scenario of failure if we have an implicit cast from > jsonb datatype (that likely already parsed the number internally, or knows > it holds non-numeric value) to numeric, that returns an error if it's > unable to

Re: Ambigous Plan - Larger Table on Hash Side

2018-03-12 Thread Tom Lane
Narendra Pradeep U U writes: > Recently I came across a case where the planner choose larger table on > hash side. I am not sure whether it is an intended behavior or we are > missing something. Probably the reason is that the smaller table has a less uniform distribution of the hash ke

Additional Statistics Hooks

2018-03-12 Thread Mat Arye
Hi All, I have a question about statistics hooks. I am trying to teach the planner that when grouping by something like date_trunc('1 day', time) will produce a lot less rows than the number of distinct time values. I want to do that in an extension. The problem is that I don't see a way to make t

Re: JIT compiling with LLVM v11

2018-03-12 Thread Andres Freund
On 2018-03-12 11:21:36 -0400, Peter Eisentraut wrote: > On 3/11/18 14:25, Andres Freund wrote: > >> It's perhaps a bit confusing that some of the jit_* settings take effect > >> at plan time and some at execution time. At the moment, this mainly > >> affects me reading the code ;-), but it would a

Re: All Taxi Services need Index Clustered Heap Append

2018-03-12 Thread stalkthetiger
Have you looked at Timescale DB extension on postgresql? -- Sent from: http://www.postgresql-archive.org/PostgreSQL-hackers-f1928748.html

Re: Ambigous Plan - Larger Table on Hash Side

2018-03-12 Thread Andres Freund
On 2018-03-12 12:52:00 -0400, Tom Lane wrote: > Narendra Pradeep U U writes: > > Recently I came across a case where the planner choose larger table > > on hash side. I am not sure whether it is an intended behavior or we are > > missing something. > > Probably the reason is that the sm

Re: CURRENT OF causes an error when IndexOnlyScan is used

2018-03-12 Thread Tom Lane
Anastasia Lubennikova writes: > [ return_heaptuple_in_btree_indexonlyscan_v2.patch ] I took a quick look at this, but I'm concerned about a couple of points: 1. What's the performance penalty of forming (and then deforming) the added heap tuple? We'd be paying it for every index-only scan, whet

Re: Ambigous Plan - Larger Table on Hash Side

2018-03-12 Thread Tom Lane
Andres Freund writes: > Not sure I follow. Unless the values are equivalent (i.e. duplicate key > values), why should non-uniformity in key space translate to hash space? Duplicates are exactly the problem. See estimate_hash_bucket_stats. > And if there's duplicates it shouldn't hurt much eithe

Re: PATCH: Unlogged tables re-initialization tests

2018-03-12 Thread David Steele
On 3/12/18 11:59 AM, Dagfinn Ilmari Mannsåker wrote: > David Steele writes: > >> On 3/12/18 11:27 AM, Peter Eisentraut wrote: >>> On 3/11/18 05:11, Michael Paquier wrote: On Fri, Mar 09, 2018 at 05:23:48PM -0500, Peter Eisentraut wrote: > This seems like a useful test. > > On 3/5

Re: Function to track shmem reinit time

2018-03-12 Thread Grigory Smolkin
On 03/03/2018 09:00 PM, Peter Eisentraut wrote: I find this premise a bit dubious. Why have a log file if it's too big to find anything in it? Server crashes aren't the only thing people are interested in. So we'll need a function for "last $anything". Thank you for your interest in this to

Re: Additional Statistics Hooks

2018-03-12 Thread Euler Taveira
2018-03-12 14:03 GMT-03:00 Mat Arye : > I have a question about statistics hooks. I am trying to teach the planner > that when grouping by something like date_trunc('1 day', time) will produce > a lot less rows than the number of distinct time values. I want to do that > in an extension. The proble

Re: Re: [GSOC 18] Performance Farm Project——Initialization Project

2018-03-12 Thread Dave Page
Hi On Mon, Mar 12, 2018 at 9:57 AM, Hongyuan Ma wrote: > Hi Dave, > Thank you for your reminder. This is indeed my negligence. > In fact, I have browsed the code in the pgperffarm.git > repository, > including the client folder and

Re: PATCH: Configurable file mode mask

2018-03-12 Thread Stephen Frost
Michael, David, * Michael Paquier (mich...@paquier.xyz) wrote: > On Fri, Mar 09, 2018 at 01:51:14PM -0500, David Steele wrote: > > How about a GUC that enforces one mode or the other on startup? Default > > would be 700. The GUC can be set automatically by initdb based on the > > -g option. We

Re: JIT compiling with LLVM v11

2018-03-12 Thread Peter Eisentraut
On 3/12/18 13:05, Andres Freund wrote: >> will *not* use JIT, becaue jit_expressions applies at execution time. > Right. It'd be easy to change that so jit_expressions=off wouldn't have > an effect there anymore. But I'm not sure we want that? I don't have a > strong feeling about this, except th

Re: [WIP PATCH] Index scan offset optimisation using visibility map

2018-03-12 Thread Tom Lane
Michail Nikolaev writes: > [ offset_index_only_v4.patch ] I started to go through this patch with the intention of committing it, but the more I looked at it the less happy I got. What you've done to IndexNext() is a complete disaster from a modularity standpoint: it now knows all about the inte

Re: JIT compiling with LLVM v11

2018-03-12 Thread Andres Freund
On 2018-03-09 13:08:36 -0800, Andres Freund wrote: > On 2018-03-09 15:42:24 -0500, Peter Eisentraut wrote: > > What I'd quite like is if EXPLAIN or EXPLAIN ANALYZE showed something > > about what kind of JIT processing was done, if any, to help with this > > kind of testing. > > Yea, I like that.

Re: JIT compiling with LLVM v11

2018-03-12 Thread Tom Lane
Andres Freund writes: > Currently a handful of explain outputs in the regression tests change > output when compiled with JITing. Therefore I'm thinking of adding > JITINFO or such option, which can be set to false for those tests? > Maintaining duplicate output for them seems painful. Better idea

Re: JIT compiling with LLVM v11

2018-03-12 Thread Andres Freund
Hi, On 2018-03-12 17:14:00 -0400, Tom Lane wrote: > Andres Freund writes: > > Currently a handful of explain outputs in the regression tests change > > output when compiled with JITing. Therefore I'm thinking of adding > > JITINFO or such option, which can be set to false for those tests? > > Mai

Re: Additional Statistics Hooks

2018-03-12 Thread Mat Arye
On Mon, Mar 12, 2018 at 2:52 PM, Euler Taveira wrote: > 2018-03-12 14:03 GMT-03:00 Mat Arye : > > I have a question about statistics hooks. I am trying to teach the > planner > > that when grouping by something like date_trunc('1 day', time) will > produce > > a lot less rows than the number of d

Re: Google Summer of Code: Potential Applicant

2018-03-12 Thread Christos Maris
Hey Aleksander, I am mostly interested in anything that requires C/C++ implementation and AlgoDS. For that reason I would love to work in any of the following (in that order of preference): 1. Sorting algorithms benchmark and implementation 2. Enhancing amcheck for all AMs 3. TOAST'ing

Re: [patch] BUG #15005: ANALYZE can make pg_class.reltuples inaccurate.

2018-03-12 Thread Tom Lane
I wrote: > Re-reading that thread, it seems like we should have applied Jeff's > initial trivial patch[1] (to not hold AutovacuumScheduleLock across > table_recheck_autovac) rather than waiting around for a super duper > improvement to get agreed on. I'm a bit tempted to go do that; > if nothing e

explain with costs in subselect.sql

2018-03-12 Thread Andres Freund
Hi Tom, all, When forcing JITing to be enabled for all queries, obviously only useful for testing, I noticed that two explain outputs changed after I added explain support. The only differences come from: -- Unspecified-type literals in output columns should resolve as text SELECT *, pg_typeof(

Re: explain with costs in subselect.sql

2018-03-12 Thread Tom Lane
Andres Freund writes: > When forcing JITing to be enabled for all queries, obviously only useful > for testing, I noticed that two explain outputs changed after I added > explain support. > The only differences come from: > -- Unspecified-type literals in output columns should resolve as text >

Re: explain with costs in subselect.sql

2018-03-12 Thread Andres Freund
On 2018-03-12 18:25:42 -0400, Tom Lane wrote: > Andres Freund writes: > > When forcing JITing to be enabled for all queries, obviously only useful > > for testing, I noticed that two explain outputs changed after I added > > explain support. > > > The only differences come from: > > > -- Unspeci

Re: Additional Statistics Hooks

2018-03-12 Thread Tom Lane
Mat Arye writes: > So the use-case is an analytical query like > SELECT date_trunc('hour', time) AS MetricMinuteTs, AVG(value) as avg > FROM hyper > WHERE time >= '2001-01-04T00:00:00' AND time <= '2001-01-05T01:00:00' > GROUP BY MetricMinuteTs > ORDER BY MetricMinuteTs DESC; > Right now this qu

Re: unique indexes on partitioned tables

2018-03-12 Thread Alvaro Herrera
Shinoda, Noriyoshi wrote: Hi, > I tried this feature with the latest snapshot. When I executed the > following SQL statement, multiple primary keys were created on the > partition. > Is this the intended behavior? It turns out that the error check for duplicate PKs is only invoked if you tell t

RE: [HACKERS] Commitfest 2018-9 duplicate patch deletion request.

2018-03-12 Thread Shinoda, Noriyoshi
Thank you so much. -Original Message- From: David Steele [mailto:da...@pgmasters.net] Sent: Monday, March 12, 2018 10:24 PM To: Shinoda, Noriyoshi ; pgsql-hackers Subject: Re: [HACKERS] Commitfest 2018-9 duplicate patch deletion request. On 3/12/18 6:12 AM, Shinoda, Noriyoshi wrote: >

RE: unique indexes on partitioned tables

2018-03-12 Thread Shinoda, Noriyoshi
Hi Álvaro, Thank you for your developing the new patch. I will continue testing. -Original Message- From: Alvaro Herrera [mailto:alvhe...@2ndquadrant.com] Sent: Tuesday, March 13, 2018 7:51 AM To: Shinoda, Noriyoshi Cc: Amit Langote ; Peter Eisentraut ; Jaime Casanova ; Jesper Pederse

Re: Google Summer of Code: Potential Applicant

2018-03-12 Thread Craig Ringer
On 13 March 2018 at 05:34, Christos Maris wrote: > Hey Aleksander, > > I am mostly interested in anything that requires C/C++ implementation and > AlgoDS. > > For that reason I would love to work in any of the following (in that > order of preference): > >1. Sorting algorithms benchmark and i

Re: Google Summer of Code: Potential Applicant

2018-03-12 Thread Craig Ringer
On 13 March 2018 at 05:34, Christos Maris wrote: > Hey Aleksander, > > I am mostly interested in anything that requires C/C++ implementation and > AlgoDS. > > For that reason I would love to work in any of the following (in that > order of preference): > >1. Sorting algorithms benchmark and i

Re: [HACKERS] Partition-wise aggregation/grouping

2018-03-12 Thread Ashutosh Bapat
On Mon, Mar 12, 2018 at 7:49 PM, Jeevan Chalke wrote: > > > On Mon, Mar 12, 2018 at 6:07 PM, Ashutosh Bapat > wrote: >> >> On Fri, Mar 9, 2018 at 4:21 PM, Ashutosh Bapat >> >> GroupPathExtraData now completely absorbs members from and replaces >> OtherUpperPathExtraData. This means that we have t

Re: WARNING in parallel index creation.

2018-03-12 Thread Peter Geoghegan
On Sun, Mar 11, 2018 at 10:15 PM, Jeff Janes wrote: > Then when I create in index, I get a warning: > > jjanes=# create index on pgbench_accounts (foobar(filler)); > WARNING: cannot set parameters during a parallel operation > WARNING: cannot set parameters during a parallel operation > > If I c

Re: ALTER TABLE ADD COLUMN fast default

2018-03-12 Thread Andrew Dunstan
On Mon, Mar 12, 2018 at 1:29 AM, David Rowley wrote: > On 9 March 2018 at 02:11, David Rowley wrote: >> On 8 March 2018 at 18:40, Andrew Dunstan >> wrote: >>> select * from t; >>> fastdef tps = 107.145811 >>> master tps = 150.207957 >>> >>> "select * from t" used to be about a wash, but wit

Re: [HACKERS] Another oddity in handling of WCO constraints in postgres_fdw

2018-03-12 Thread Ashutosh Bapat
On Mon, Mar 12, 2018 at 1:25 PM, Etsuro Fujita wrote: > (2018/03/09 20:55), Etsuro Fujita wrote: >> >> (2018/03/08 14:24), Ashutosh Bapat wrote: >>> >>> For local constraints to be enforced, we use remote >>> constraints. For local WCO we need to use remote WCO. That means we >>> create many forei

Re: GSOC 2018 proposal

2018-03-12 Thread Charles Cui
2018-03-12 1:25 GMT-07:00 Aleksander Alekseev : > Hello Charles, > > > I am currently preparing a proposal for pg_thrift project. I noticed > > that there are several protocols supported by thrift, which ones do we > > have higher priority? I mean which ones I need to implement during > > this pro

Re: parallel append vs. simple UNION ALL

2018-03-12 Thread Ashutosh Bapat
On Fri, Mar 9, 2018 at 1:28 AM, Robert Haas wrote: > >> 0003 >> Probably we want to rename generate_union_path() as generate_union_rel() or >> generate_union_paths() since the function doesn't return a path anymore. >> Similarly for generate_nonunion_path(). > > Good point. Changed. It looks lik

Re: [HACKERS] why not parallel seq scan for slow functions

2018-03-12 Thread Ashutosh Bapat
On Sun, Mar 11, 2018 at 5:49 PM, Amit Kapila wrote: > >> +/* Add projection step if needed */ >> +if (target && simple_gather_path->pathtarget != target) >> >> If the target was copied someplace, this test will fail. Probably we want to >> check containts of the PathTarget structure? Righ

Re: [patch] BUG #15005: ANALYZE can make pg_class.reltuples inaccurate.

2018-03-12 Thread David Gould
On Mon, 12 Mar 2018 10:43:36 -0400 Tom Lane wrote: > Re-reading that thread, it seems like we should have applied Jeff's > initial trivial patch[1] (to not hold across > table_recheck_autovac) rather than waiting around for a super duper > improvement to get agreed on. I'm a bit tempted to go

Re: PATCH: Unlogged tables re-initialization tests

2018-03-12 Thread Michael Paquier
On Mon, Mar 12, 2018 at 02:33:18PM -0400, David Steele wrote: > On 3/12/18 11:59 AM, Dagfinn Ilmari Mannsåker wrote: >> However, that is still wrong, because die() and BAIL_OUT() mean >> different things: die() aborts the current test script, while BAIL_OUT() >> aborts the entire 'prove' run, i.e.

Re: [WIP PATCH] Index scan offset optimisation using visibility map

2018-03-12 Thread Andrey Borodin
Tom, thanks for inspecting the patch. There's so many problems that slipped from my attention... But one thing that bothers me most is the problem with predicate locking > 13 марта 2018 г., в 0:55, Tom Lane написал(а): > > The PredicateLockPage call also troubles me quite a bit, not only from >

Re: PATCH: Configurable file mode mask

2018-03-12 Thread Michael Paquier
On Mon, Mar 12, 2018 at 03:14:13PM -0400, Stephen Frost wrote: > We already had a discussion about having a GUC for this and concluded, > rightly in my view, that it's not sensible to have since we don't want > all of the various tools having to read and parse out postgresql.conf. If the problem i