Re: FOR EACH ROW triggers on partitioned tables

2018-02-14 Thread Amit Langote
On 2018/02/15 6:26, Alvaro Herrera wrote: > Another option is to rethink this feature from the ground up: instead of > cloning catalog rows for each children, maybe we should have the trigger > lookup code, when running DML on the child relation (the partition), > obtain trigger entries not only

Re: autovacuum: change priority of the vacuumed tables

2018-02-14 Thread Masahiko Sawada
Hi, On Thu, Feb 8, 2018 at 11:01 PM, Ildus Kurbangaliev wrote: > Hi, > > Attached patch adds 'autovacuum_table_priority' to the current list of > automatic vacuuming settings. It's used in sorting of vacuumed tables in > autovacuum worker before actual vacuum. > >

Re: Cached/global query plans, autopreparation

2018-02-14 Thread he...@visionlink.org
Any idea on how feasible it would be as an extention or is the work too central to abstract that way? Chet Henry Senior Software Developer - Dev Ops Liaison VisionLink, Inc. 3101 Iris Ave, Ste 240 Boulder, CO 80301 he...@visionlink.org Site |

Re: Python 3.7 support

2018-02-14 Thread Peter Eisentraut
On 2/13/18 21:45, Michael Paquier wrote: > On Tue, Feb 13, 2018 at 04:17:13PM -0500, Peter Eisentraut wrote: >> A small patch to tweak the tests to support output differences with >> Python 3.7 (currently in beta). > > Wouldn't it be better to wait for the version to be released before > pushing

Re: reorganizing partitioning code

2018-02-14 Thread Amit Langote
On 2018/02/15 5:30, Alvaro Herrera wrote: > BTW may I suggest that > > git config diff.algorithm=histogram > > results in better diffs? Aha! That's much better. Thanks, Amit

Re: JIT compiling with LLVM v10.1

2018-02-14 Thread Andres Freund
Hi, On 2018-02-14 23:32:17 +0100, Pierre Ducroquet wrote: > Here are the LLVM4 and LLVM3.9 compatibility patches. > Successfully built, and executed some silly queries with JIT forced to make > sure it worked. Thanks! I'm going to integrate them into my series in the next few days. Regards,

Re: JIT compiling with LLVM v10.1

2018-02-14 Thread Pierre Ducroquet
On Wednesday, February 14, 2018 7:17:10 PM CET Andres Freund wrote: > Hi, > > On 2018-02-07 06:54:05 -0800, Andres Freund wrote: > > I've pushed v10.0. The big (and pretty painful to make) change is that > > now all the LLVM specific code lives in src/backend/jit/llvm, which is > > built as a

Re: Is this a bug?

2018-02-14 Thread Tatsuo Ishii
>> "User was holding shared buffer pin for too long" sounds unusual to >> me. Is this a bug? PostgreSQL version is 10.1 according to the user. > > Sounds normal to me. Maybe the message could use some work, but this > is how hot standby works: if max_standby_archive_delay or >

Re: tapeblocks is uninitialized in logtape.c

2018-02-14 Thread Tom Lane
Alvaro Herrera writes: > Tom Lane wrote: >> Actually, on looking closer, it's more likely got something to do with >> whether or not you used --enable-cassert. If the Assert at the top of >> the function is disabled, then IMO a compiler that failed to complain >> about

Re: FOR EACH ROW triggers on partitioned tables

2018-02-14 Thread Alvaro Herrera
Robert Haas wrote: > On Tue, Jan 23, 2018 at 5:10 PM, Alvaro Herrera > wrote: > >> Also, does ALTER TABLE ... ENABLE/DISABLE TRIGGER do the right things on > >> partitioned tables? > > > > Haven't done this yet, either. I like Simon's suggestion of outright > >

Re: Cached/global query plans, autopreparation

2018-02-14 Thread Tom Lane
Andres Freund writes: > On 2018-02-13 09:13:09 -0800, Shay Rojansky wrote: >> Was wondering if anyone has a reaction to my email below about statement >> preparation, was it too long? :) > Well, the issue is that implementing this is a major piece of work. This > post doesn't

Re: tapeblocks is uninitialized in logtape.c

2018-02-14 Thread Tom Lane
Jaime Casanova writes: > i tried to fix the ones in your 2nd attachment, but i'm not real sure > about what value initialize the typename array in objectaddress.c and > the bool values in pgbench.c (both of them i initialized to NULL) Pushed with minor

Re: tapeblocks is uninitialized in logtape.c

2018-02-14 Thread Alvaro Herrera
Tom Lane wrote: > Actually, on looking closer, it's more likely got something to do with > whether or not you used --enable-cassert. If the Assert at the top of > the function is disabled, then IMO a compiler that failed to complain > about this coding would be pretty damn broken. I tried

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

2018-02-14 Thread Nikolay Shaplov
В письме от 9 февраля 2018 18:45:29 пользователь Alvaro Herrera написал: > > 1. I've changed error message from 'Valid values are "XXX", "YYY" and > > "ZZZ".' to 'Valid values are "XXX", "YYY", "ZZZ".' to make a code a bit > > simpler. If it is not acceptable, please let me know, I will add "and"

Re: tapeblocks is uninitialized in logtape.c

2018-02-14 Thread Tom Lane
Peter Eisentraut writes: > On 2/13/18 23:10, Tom Lane wrote: >> Jaime Casanova writes: >>> My compiler gives me this message >>> logtape.c: In function ‘ltsConcatWorkerTapes’: >>> logtape.c:462:48: warning: ‘tapeblocks’ may be

Re: tapeblocks is uninitialized in logtape.c

2018-02-14 Thread Tom Lane
Peter Eisentraut writes: > On 2/13/18 23:10, Tom Lane wrote: >> FWIW, I'm not seeing that. What compiler are you using exactly? > This warning comes from using -Og instead of -O2. > It's the only such warning, so it would be nice to silence it, because > using

Re: reorganizing partitioning code (was: Re: [HACKERS] path toward faster partition pruning)

2018-02-14 Thread Alvaro Herrera
This is looking attractive. Please don't #include postgres.h in partcache.h. That's per policy. Why do you need to #include parsenodes.h in partcache.h? I think rewriteManip.h can do with just relcache.h rather than rel.h (probably partition.h can do likewise) thanks -- Álvaro Herrera

[HACKERS] Inserting data into a new catalog table via source code

2018-02-14 Thread rqtx
The company I'm working is currently trying to give some external users access to our database. Said users are partners of ours (company partners). I was tasked to create a new catalog table to log every user activity (already done) and now I'm trying to insert some information in this table

Re: Cancelling parallel query leads to segfault

2018-02-14 Thread Andres Freund
On 2018-02-12 15:43:49 -0500, Peter Eisentraut wrote: > On 2/6/18 12:06, Andres Freund wrote: > > On 2018-02-06 12:01:08 -0500, Peter Eisentraut wrote: > >> On 2/1/18 20:35, Andres Freund wrote: > >>> On February 1, 2018 11:13:06 PM GMT+01:00, Peter Eisentraut > >>>

Re: [COMMITTERS] pgsql: Rearm statement_timeout after each executed query.

2018-02-14 Thread Andres Freund
On 2018-02-09 15:50:44 -0500, Robert Haas wrote: > On Wed, Feb 7, 2018 at 7:04 PM, Thomas Munro > wrote: > > On Tue, Feb 6, 2018 at 5:21 PM, Peter Eisentraut > > wrote: > >> On 9/18/17 22:41, Andres Freund wrote: > >>> Rearm

Re: JIT compiling with LLVM v10.1

2018-02-14 Thread Andres Freund
Hi, On 2018-02-07 06:54:05 -0800, Andres Freund wrote: > I've pushed v10.0. The big (and pretty painful to make) change is that > now all the LLVM specific code lives in src/backend/jit/llvm, which is > built as a shared library which is loaded on demand. > > The layout is now as follows: > >

Re: Google Summer of Code 2018

2018-02-14 Thread Stephen Frost
Greetings, * Ankit Raj (rajankitn...@gmail.com) wrote: > I want to participate in GSOC2018 in the PostgreSQl organization, so can > you help me out as to what I have to preapre? The best thing to do is to review the Student Guide, available here: https://g.co/gsoc/studentguide As discussed

Re: Cached/global query plans, autopreparation

2018-02-14 Thread he...@visionlink.org
​Coming from a PHP application I have several of the same concerns and wishes​. Given that php can not share any (resources) between requests it would be impossible to accomplish what you have in .NET. We still prepare statements though for use in result sets and other loops (ORM driven). I'm

Re: tapeblocks is uninitialized in logtape.c

2018-02-14 Thread Jaime Casanova
On 13 February 2018 at 23:10, Tom Lane wrote: > Jaime Casanova writes: >>> My compiler gives me this message >>> logtape.c: In function ‘ltsConcatWorkerTapes’: >>> logtape.c:462:48: warning: ‘tapeblocks’ may be used uninitialized in >>> this

Re: master plpython check fails on Solaris 10

2018-02-14 Thread Tom Lane
Marina Polyakova writes: > On 14-02-2018 17:54, Tom Lane wrote: >> I think we need to fix the error callback code so that it >> uses the "arg" field to find the relevant procedure, and that >> that's a back-patchable fix, because nested plpython functions >> would show

Re: [HACKERS] MERGE SQL Statement for PG11

2018-02-14 Thread Stephen Frost
Greetings Pavan, * Pavan Deolasee (pavan.deola...@gmail.com) wrote: > On Tue, Feb 6, 2018 at 3:37 PM, Stephen Frost wrote: > > Coming out of that, my understanding is that Simon is planning to have a > > patch which implements RLS and partitioning (though the query plans for

Re: master plpython check fails on Solaris 10

2018-02-14 Thread Marina Polyakova
On 14-02-2018 17:54, Tom Lane wrote: Marina Polyakova writes: On 14-02-2018 3:43, Peter Eisentraut wrote: OK, can you get some kind of stack trace or other debugging information? I got this backtrace from gdb: Hmm, so the only question in my mind is how did

Re: [HACKERS] Bug in to_timestamp().

2018-02-14 Thread Dmitry Dolgov
> On 12 February 2018 at 12:49, Arthur Zakirov wrote: > > Yes, I somehow missed it. I changed the behaviour of separator > characters in format string. They are greedy now and eat whitespaces > before a separator character in an input string. I suppose that there >

Re: [HACKERS] Client Connection redirection support for PostgreSQL

2018-02-14 Thread Robert Haas
On Tue, Feb 13, 2018 at 5:23 PM, Tom Lane wrote: > Robert Haas writes: >> -- might need some defense against the redirected-to server getting >> the same password as was sent to the original server. Is that a >> security risk? Does HTTP have a rule

Re: master plpython check fails on Solaris 10

2018-02-14 Thread Tom Lane
I wrote: > so how come this test case doesn't crash for everybody? I traced through this, and what I see is that the error information constructed at the time of the inner ereport includes 0x1f98528 "invalid transaction termination", detail = 0x0, detail_log = 0x0, hint = 0x0, context =

Re: [HACKERS] Partition-wise aggregation/grouping

2018-02-14 Thread Jeevan Chalke
On Wed, Feb 14, 2018 at 12:17 PM, Rafia Sabih wrote: > On Tue, Feb 13, 2018 at 6:21 PM, Jeevan Chalke < > jeevan.cha...@enterprisedb.com> wrote: > >> >> I see that partition-wise aggregate plan too uses parallel index, am I >> missing something? >> >> > You're

Re: master plpython check fails on Solaris 10

2018-02-14 Thread Tom Lane
Marina Polyakova writes: > On 14-02-2018 3:43, Peter Eisentraut wrote: >> OK, can you get some kind of stack trace or other debugging >> information? > I got this backtrace from gdb: Hmm, so the only question in my mind is how did this ever work for anyone? The

Kerberos test suite

2018-02-14 Thread Peter Eisentraut
Here is a patch with a test suite for the Kerberos/GSSAPI authentication functionality. It's very similar in principle to the recently added LDAP tests, and similar caveats apply. You will need the client and server parts of a krb5 package installation, possibly named krb5-workstation and

Re: Is this a bug?

2018-02-14 Thread Robert Haas
On Wed, Feb 14, 2018 at 7:35 AM, Tatsuo Ishii wrote: > Today one of Pgpool-II users reported an interesting fatal error > message from PostgreSQL: > > FATAL: terminating connection due to conflict with recovery > DETAIL: User was holding shared buffer pin for too long. > HINT:

Re: Is this a bug?

2018-02-14 Thread Sergei Kornilov
Hello No, this is not bug. https://www.postgresql.org/docs/10/static/hot-standby.html#HOT-STANDBY-CONFLICT Message in DETAIL describe conflict reason. > Application of a vacuum cleanup record from WAL conflicts with queries > accessing the target page on the standby, whether or not the data to

Is this a bug?

2018-02-14 Thread Tatsuo Ishii
Today one of Pgpool-II users reported an interesting fatal error message from PostgreSQL: FATAL: terminating connection due to conflict with recovery DETAIL: User was holding shared buffer pin for too long. HINT: In a moment you should be able to reconnect to the database and repeat your

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

2018-02-14 Thread Amit Kapila
On Tue, Feb 13, 2018 at 12:41 PM, amul sul wrote: > On Tue, Feb 13, 2018 at 11:32 AM, Amit Kapila wrote: >> >> Your change appears fine to me. I think one can set both block number >> and offset as we do for HeapTupleHeaderIsSpeculative, but the way

Re: master plpython check fails on Solaris 10

2018-02-14 Thread Marina Polyakova
On 14-02-2018 3:43, Peter Eisentraut wrote: On 2/13/18 05:40, Marina Polyakova wrote: Binary search has shown that this failure begins with commit 8561e4840c81f7e345be2df170839846814fa004 (Transaction control in PL procedures.). On the previous commit (b9ff79b8f17697f3df492017d454caa9920a7183)

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

2018-02-14 Thread Amit Kapila
On Fri, Feb 2, 2018 at 12:15 AM, Robert Haas wrote: > On Wed, Jan 31, 2018 at 11:48 PM, Amit Kapila wrote: > > The other cases aren't so clear. In the case of the first call within > create_ordered_paths, there's no loss in the !is_sorted case

Re: Expression errors with "FOR UPDATE" and postgres_fdw with partition wise join enabled.

2018-02-14 Thread Ashutosh Bapat
On Wed, Feb 14, 2018 at 2:50 PM, Etsuro Fujita wrote: > > I'd vote for #1, but ISTM that that's more like a feature, not a fix. > Pushing down ConvertRowtypeExprs to the remote seems to me to be the same > problem as pushing down PHVs to the remote, which is

Re: spelling of enable_partition_wise_join

2018-02-14 Thread Ashutosh Bapat
On Wed, Feb 14, 2018 at 2:15 AM, Alvaro Herrera wrote: > Peter Eisentraut wrote: >> I wonder how others feel about this, but the spelling of >> enable_partition_wise_join feels funny to me every time I look at it. I >> would write it enable_partitionwise_join. > > +1 > >