Re: [HACKERS] proposal: schema variables

2018-03-12 Thread Pavel Luzanov
Hi, I plan to make usability and feature test review in several days. Is there any chances that it will work on replicas? Such possibility is very helpful in generating reports. Now, LET command produces an error: ERROR:  cannot execute LET in a read-only transaction But if we say that

Re: [HACKERS] GSoC 2017: weekly progress reports (week 6)

2018-03-12 Thread Andrey Borodin
> 12 марта 2018 г., в 1:54, Alexander Korotkov > написал(а): > > On Wed, Mar 7, 2018 at 8:30 PM, Alvaro Herrera > wrote: > I suggest to create a new function GinPredicateLockPage() that checks > whether fast update is enabled for the

Re: [HACKERS] proposal: schema variables

2018-03-12 Thread Pavel Stehule
2018-03-12 7:49 GMT+01:00 Pavel Luzanov : > Hi, > > I plan to make usability and feature test review in several days. > > Is there any chances that it will work on replicas? > Such possibility is very helpful in generating reports. > Now, LET command produces an error: >

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

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

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

2018-03-12 Thread amul sul
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

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

[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

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

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

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.

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.

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:

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

Re: Inconsistent behavior in serializable snapshot

2018-03-12 Thread Kuntal Ghosh
On Sun, Mar 11, 2018 at 7:52 PM, Kuntal Ghosh wrote: > Hello hackers, > > While working on serializable transaction isolation, I've noticed some > strange behavior in the first permutation mentioned in > isolation/specs/read-only-anomaly-2.spec file. > > setup > { >

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 >

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: 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 > >

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

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,

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] 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

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

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

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: 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

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: 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: >

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

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

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

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

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

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

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: [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

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

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

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

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

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:

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

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

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

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

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, >

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/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. >

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

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] 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

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

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.

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

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. > >

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

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

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

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: 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

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

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

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

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

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 =

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

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

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

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.

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

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.

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

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;

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

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.

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 *,

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

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

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