possibly to automatic detection of bad variable types in plans?

2018-03-20 Thread Pavel Stehule
Hi I have a talk with Alex Stanev about known issue that block indexes - bad param types postgres=# do $$ declare _id numeric = 22; begin perform * from bigtable where a = _id; end; $$; DO Time: 108,775 ms postgres=# do $$ declare _id numeric = 22; begin perform * from bigtable where

Re: PostgreSQL opens all the indexes of a relation for every Query during Planning Time?

2018-03-20 Thread Meenatchi Sandanam
Please refer this https://www.postgresql.org/message-id/CAJJu9dMg3662E- wr25zyajwvdg7cz56r-8bw4ejft9i42oo...@mail.gmail.com On Fri, Mar 16, 2018 at 10:48 PM, Jason Petersen wrote: > On Mar 15, 2018, at 4:18 AM, Meenatchi Sandanam > wrote: > > On

Re: [HACKERS] taking stdbool.h into use

2018-03-20 Thread Tom Lane
Michael Paquier writes: > On Tue, Mar 13, 2018 at 03:25:39PM -0400, Peter Eisentraut wrote: >> So I'm going back to my proposal from December, to just use stdbool.h >> when sizeof(bool) == 1, and add a static assertion to prevent other >> configurations. > So, on one side of

XID-assigned idle transactions affect vacuum's job.

2018-03-20 Thread Masahiko Sawada
Hi, Long transactions often annoy users because if a long transaction exists on a database vacuum cannot reclaim efficiently. There are several reason why they exist on a database but it's a common case where users or applications forget to commit/rollback transactions. That is, transaction is

Re: [HACKERS] taking stdbool.h into use

2018-03-20 Thread Michael Paquier
On Tue, Mar 13, 2018 at 03:25:39PM -0400, Peter Eisentraut wrote: > After more digging, there are more problems with having a bool that is > not 1 byte. For example, pg_control has a bool field, so with a > different bool size, pg_control would be laid out differently. That > would require

Re: Problem while setting the fpw with SIGHUP

2018-03-20 Thread Dilip Kumar
On Tue, Mar 20, 2018 at 11:26 AM, Michael Paquier wrote: > On Tue, Mar 20, 2018 at 10:43:55AM +0530, Dilip Kumar wrote: > > I think like WALWriterProcess, we need to call InitXLogInsert for the > > CheckpointerProcess as well as for the BgWriterProcess > > because earlier

Re: [HACKERS] Add support for tuple routing to foreign partitions

2018-03-20 Thread Amit Langote
On 2018/03/19 20:25, Amit Langote wrote: > That's all I have for now. While testing this patch, I noticed a crash when performing EXPLAIN on update of a partition tree containing foreign partitions. Crash occurs in postgresEndForeignRouting() due to the following Assert failing:

Re: Online enabling of checksums

2018-03-20 Thread Magnus Hagander
On Tue, Mar 20, 2018 at 10:29 AM, Andrey Borodin wrote: > Hi! > > > 19 марта 2018 г., в 11:27, Heikki Linnakangas > написал(а): > > > > Is there no way to stop the checksum helper once it's started? That > seems rather user-unfriendly. I can imagine it

Re: XID-assigned idle transactions affect vacuum's job.

2018-03-20 Thread Amit Kapila
On Tue, Mar 20, 2018 at 12:22 PM, Masahiko Sawada wrote: > Hi, > > Long transactions often annoy users because if a long transaction > exists on a database vacuum cannot reclaim efficiently. There are > several reason why they exist on a database but it's a common case >

Re: [HACKERS] Add support for tuple routing to foreign partitions

2018-03-20 Thread Alvaro Herrera
Hi, Amit Langote wrote: > 2. If I understand the description you provided in [1] correctly, the > point of having ri_PartitionIsValid and ExecInitExtraPartitionInfo() is to > avoid possibly-redundantly performing following two steps in > ExecSetupPartitionTupleRouting() for *reused* partition

Re: [HACKERS] plpgsql - additional extra checks

2018-03-20 Thread Tomas Vondra
On 03/20/2018 05:36 AM, Pavel Stehule wrote: > > > 2018-03-19 21:47 GMT+01:00 Tomas Vondra >: > > Hi, > > I'm looking at the updated patch (plpgsql-extra-check-180316.patch), and > this time it applies and

Re: [PROPOSAL] Shared Ispell dictionaries

2018-03-20 Thread Arthur Zakirov
Hello, On Mon, Mar 19, 2018 at 08:50:46PM +0100, Tomas Vondra wrote: > Hi Arthur, > > I went through the patch - just skimming through the diffs, will do more > testing tomorrow. Here are a few initial comments. Thank you for the review! > 1) max_shared_dictionaries_size / PGC_POSTMASTER > >

Re: [HACKERS] Add support for tuple routing to foreign partitions

2018-03-20 Thread Etsuro Fujita
Hi Amit, (2018/03/20 15:57), Amit Langote wrote: On 2018/03/19 20:25, Amit Langote wrote: That's all I have for now. Will reply to your previous email. While testing this patch, I noticed a crash when performing EXPLAIN on update of a partition tree containing foreign partitions. Crash

Lack of T_TargetEntry in exprType function

2018-03-20 Thread Konstantin Knizhnik
Is there any reason for not handling T_TargetEntry node kind in exprType() function in nodeFuncs.c? Is it considered as non-valid expression tag? But why in this case it is handled in the exprLocation function? -- Konstantin Knizhnik Postgres Professional: http://www.postgrespro.com The Russian

Re: [HACKERS] path toward faster partition pruning

2018-03-20 Thread David Rowley
On 21 March 2018 at 00:07, Amit Langote wrote: > Attached is further revised version. In the 0004 patch I see: @@ -1439,6 +1441,10 @@ inheritance_planner(PlannerInfo *root) if (IS_DUMMY_PATH(subpath)) continue; + /* Add the current parent's RT index to the

Re: [HACKERS] plpgsql - additional extra checks

2018-03-20 Thread Tels
Hello Pavel and Tomas, On Tue, March 20, 2018 12:36 am, Pavel Stehule wrote: > 2018-03-19 21:47 GMT+01:00 Tomas Vondra : > >> Hi, >> >> I'm looking at the updated patch (plpgsql-extra-check-180316.patch), and >> this time it applies and builds OK. The one thing I

[no subject]

2018-03-20 Thread Torsten Grust
G'day all, what is the recommended method to dump the steps[] array of EvalSteps for a compiled expression, showing the opcodes themselves as well as details/arguments for the various opcodes? (I am asking out of curiosity and for teaching purposes.) This must have been done plenty of time

Re: ON CONFLICT DO UPDATE for partitioned tables

2018-03-20 Thread Etsuro Fujita
(2018/03/20 13:30), Amit Langote wrote: On 2018/03/19 21:59, Etsuro Fujita wrote: (2018/03/18 13:17), Alvaro Herrera wrote: Alvaro Herrera wrote: The only thing that I remain unhappy about this patch is the whole adjust_and_expand_partition_tlist() thing. I fear we may be doing redundant

Re: [HACKERS] Optional message to user when terminating/cancelling backend

2018-03-20 Thread Christoph Berg
Re: Eren Başak 2018-03-20 > Another thing is that, in a similar manner, we could allow changing the > error code which might be useful for extensions. For example, Citus could > use it to cancel remote backends when it detects a

Re: PostgreSQL 10: Segmentation fault when using GROUPING SETS with all unsortable columns

2018-03-20 Thread Andrew Gierth
> "Huong" == Huong Dangminh writes: Huong> Hi, Huong> I have found a case which could get segmentation fault when Huong> using GROUPING SETS. It occurs when columns in GROUPING SETS are Huong> all unsortable but hashable. Yes, mea culpa. will fix. BTW, you

Re: [PoC PATCH] Parallel dump to /dev/null

2018-03-20 Thread Christoph Berg
Re: Alvaro Herrera 2018-03-05 <20180305165609.kq5y7uzy64o45vsg@alvherre.pgsql> > The reason I noticed is I wondered about the amount of open() calls > (plus zlib function calls) we would save by keeping an FD open to > /dev/null, rather than opening it over and over for each object -- ie., > maybe

Re: [HACKERS] Optional message to user when terminating/cancelling backend

2018-03-20 Thread Eren Başak
Hi, I reviewed the patch. Here are my notes: I can confirm that the patches apply and pass the tests as of 03/19/2018 @ 11:00am (UTC). I didn't test whether the docs compile or look good. I have briefly tested and can confirm that the patch does what is intended. Here are my comments about the

Re: IndexJoin memory problem using spgist and boxes

2018-03-20 Thread Anton Dignös
On Tue, Mar 20, 2018 at 5:01 AM, Tom Lane wrote: > Alexander Kuzmenkov writes: >> The updated version looks good to me. > > LGTM too. Pushed with some trivial cosmetic adjustments. > > regards, tom lane Thank you both!

Re: INOUT parameters in procedures

2018-03-20 Thread Rushabh Lathia
On Tue, Mar 20, 2018 at 6:38 AM, Peter Eisentraut < peter.eisentr...@2ndquadrant.com> wrote: > On 3/19/18 03:25, Rushabh Lathia wrote: > > For the FUNCTION when we have single OUT/INOUT parameter > > the return type for that function will be set to the type of OUT > parameter. > > But in case of

Re: JIT compiling with LLVM v12.2

2018-03-20 Thread Andres Freund
Hi, I've pushed a revised and rebased version of my JIT patchset. The git tree is at https://git.postgresql.org/git/users/andresfreund/postgres.git in the jit branch https://git.postgresql.org/gitweb/?p=users/andresfreund/postgres.git;a=shortlog;h=refs/heads/jit There's a lot of tiny

Re: Online enabling of checksums

2018-03-20 Thread Andrey Borodin
Hi! > 19 марта 2018 г., в 11:27, Heikki Linnakangas написал(а): > > Is there no way to stop the checksum helper once it's started? That seems > rather user-unfriendly. I can imagine it being a pretty common mistake to > call pg_enable_data_checksums() on a 10 TB cluster, only

Re: [HACKERS] [PATCH] Generic type subscripting

2018-03-20 Thread Oleksandr Shulgin
On Tue, Mar 6, 2018 at 6:21 PM, Dmitry Dolgov <9erthali...@gmail.com> wrote: > > One more small update after fd1a421fe6 in attachments. > Before looking at the code I have a few comments about documentation: in json.sgml: +-- Extract value by key +SELECT ('{"a": 1}'::jsonb)['a']; What is the

Re: PostgreSQL 10: Segmentation fault when using GROUPING SETS with all unsortable columns

2018-03-20 Thread Andrew Gierth
> "Andrew" == Andrew Gierth writes: Huong> Not yet fully understand the related commit, but I think it is Huong> fine to put ERRCODE_FEATURE_NOT_SUPPORTED error from Huong> preprocess_grouping_sets when all columns in GROUPING SETS are Huong> unsortable. Is

Define variable only in the scope that needs it

2018-03-20 Thread Antonin Houska
I suppose the current definition in the higher scope is not intentional. This is what I suggest: diff --git a/src/backend/optimizer/plan/planner.c b/src/backend/optimizer/plan/planner.c new file mode 100644 index 9c4a1ba..ae35e1e *** a/src/backend/optimizer/plan/planner.c ---

Re: configure's checks for --enable-tap-tests are insufficient

2018-03-20 Thread Dagfinn Ilmari Mannsåker
Tom Lane writes: > Craig Ringer writes: >> On 19 March 2018 at 23:56, Tom Lane wrote: >>> ... much excavation finds a complaint about Time::HiRes not being installed > >> That's absurd. Time::HiRes is a core module, as is

Re: INOUT parameters in procedures

2018-03-20 Thread Merlin Moncure
On Wed, Feb 28, 2018 at 4:28 PM, Peter Eisentraut wrote: > This patch set adds support for INOUT parameters to procedures. > Currently, INOUT and OUT parameters are not supported. > > A top-level CALL returns the output parameters as a result row. In > PL/pgSQL,

Re: [PoC PATCH] Parallel dump to /dev/null

2018-03-20 Thread Christoph Berg
Re: Michael Paquier 2018-03-20 <20180320135720.ge13...@paquier.xyz> > Now, why are people using pg_dump > /dev/null? Mainly the lack of > better tools, which would be actually able to detect pages in corrupted > pages in one run, and not only heap pages. I honestly think that > amcheck is

Re: XID-assigned idle transactions affect vacuum's job.

2018-03-20 Thread Tom Lane
Masahiko Sawada writes: > I think that to decide which deleted tuples must be preserved we don't > need to care about backend PGXACT.xid but must care about PGXACT.xmin. Surely this is wrong? Assume that the XID in question is the oldest one visible in the ProcArray (if

Re: configure's checks for --enable-tap-tests are insufficient

2018-03-20 Thread Tom Lane
ilm...@ilmari.org (Dagfinn Ilmari =?utf-8?Q?Manns=C3=A5ker?=) writes: > Tom Lane writes: >> Ah-hah. So it seems to me that it'd be a useful exercise to start >> from perl-base and find out what has to be added to get to working >> TAP tests. Anyone? > I think the other way

Re: file cloning in pg_upgrade and CREATE DATABASE

2018-03-20 Thread Peter Eisentraut
On 3/19/18 22:58, Michael Paquier wrote: > I have been thinking about this patch over the night, and here is a list > of bullet points which would be nice to tackle: > - Remove the current diff in copydir. done > - Extend copy_file so as it is able to use fcopyfile. fcopyfile() does not support

Re: Lack of T_TargetEntry in exprType function

2018-03-20 Thread Konstantin Knizhnik
On 20.03.2018 17:00, Tom Lane wrote: Konstantin Knizhnik writes: Is there any reason for not handling T_TargetEntry node kind in exprType() function in nodeFuncs.c? It's intentional because that's not considered an executable expression. I tried to apply this

Re: [PoC PATCH] Parallel dump to /dev/null

2018-03-20 Thread Tom Lane
Christoph Berg writes: > Re: Michael Paquier 2018-03-20 <20180320135720.ge13...@paquier.xyz> >> Now, why are people using pg_dump > /dev/null? Mainly the lack of >> better tools, which would be actually able to detect pages in corrupted >> pages in one run, and not

Re: configure's checks for --enable-tap-tests are insufficient

2018-03-20 Thread Tom Lane
ilm...@ilmari.org (Dagfinn Ilmari =?utf-8?Q?Manns=C3=A5ker?=) writes: > Note that Fedora aren't the only ones to do this: Debian also splits the > Perl core dist into multiple packages. The crucial difference is that > on Debian installing the 'perl' package gives you the whole lot, while > on

Re: Lack of T_TargetEntry in exprType function

2018-03-20 Thread Tom Lane
Konstantin Knizhnik writes: > Is there any reason for not handling T_TargetEntry node kind in > exprType() function in nodeFuncs.c? It's intentional because that's not considered an executable expression. > But why in this case it is handled in the exprLocation

Re: INOUT parameters in procedures

2018-03-20 Thread Merlin Moncure
On Tue, Mar 20, 2018 at 9:09 AM, Pavel Stehule wrote: >> Edit: In one case, after dropping the function and recreating it, I >> got the procedure to return 0 where it had not before, so this smells >> like a bug. >> postgres=# call p(); >> 2018-03-20 09:04:50.543 CDT

Re: configure's checks for --enable-tap-tests are insufficient

2018-03-20 Thread Dagfinn Ilmari Mannsåker
Tom Lane writes: > ilm...@ilmari.org (Dagfinn Ilmari =?utf-8?Q?Manns=C3=A5ker?=) writes: >> Note that Fedora aren't the only ones to do this: Debian also splits the >> Perl core dist into multiple packages. The crucial difference is that >> on Debian installing the 'perl'

Re: Online enabling of checksums

2018-03-20 Thread Magnus Hagander
On Mon, Mar 19, 2018 at 7:27 AM, Heikki Linnakangas wrote: > Hi, > > The patch looks good to me at a high level. Some notes below. I didn't > read through the whole thread, so sorry if some of these have been > discussed already. > > +void >>

Re: [HACKERS] Partition-wise aggregation/grouping

2018-03-20 Thread Jeevan Chalke
Hi, On Mon, Mar 19, 2018 at 10:56 PM, Robert Haas wrote: > On Fri, Mar 16, 2018 at 1:50 PM, Ashutosh Bapat > wrote: > > Ok. That looks good. > > Here's an updated version. In this version, based on a voice > discussion with Ashutosh and

Re: [PoC PATCH] Parallel dump to /dev/null

2018-03-20 Thread Christoph Berg
Re: Tom Lane 2018-03-20 <12960.1521557...@sss.pgh.pa.us> > It might help if the patch were less enthusiastic about trying to > "optimize" by avoiding extra file opens/closes in the case of output > to /dev/null. That seems to account for a lot of the additional > complication, and I can't see a

Re: [PoC PATCH] Parallel dump to /dev/null

2018-03-20 Thread Michael Paquier
On Tue, Mar 20, 2018 at 09:54:07AM +0100, Christoph Berg wrote: > Otherwise, +1 from me. I have been thinking about this patch lately, and on the contrary I am voting -1 for the concepts behind this patch. pg_dump is by nature a tool aimed at fetching data from the database, at putting it in a

Re: INOUT parameters in procedures

2018-03-20 Thread Pavel Stehule
2018-03-20 15:05 GMT+01:00 Merlin Moncure : > On Wed, Feb 28, 2018 at 4:28 PM, Peter Eisentraut > wrote: > > This patch set adds support for INOUT parameters to procedures. > > Currently, INOUT and OUT parameters are not supported. > > > > A

Re: XID-assigned idle transactions affect vacuum's job.

2018-03-20 Thread Masahiko Sawada
Hi, Amit On Tue, Mar 20, 2018 at 8:02 PM, Amit Kapila wrote: > On Tue, Mar 20, 2018 at 12:22 PM, Masahiko Sawada > wrote: >> Hi, >> >> Long transactions often annoy users because if a long transaction >> exists on a database vacuum cannot reclaim

Re: Lack of T_TargetEntry in exprType function

2018-03-20 Thread Tom Lane
Konstantin Knizhnik writes: > On 20.03.2018 17:00, Tom Lane wrote: >> It's intentional because that's not considered an executable >> expression. > I tried to apply this function to the argument of Aggref and it has > exactly this kind. > Aggref is executable

Re: INOUT parameters in procedures

2018-03-20 Thread Pavel Stehule
2018-03-20 15:18 GMT+01:00 Merlin Moncure : > On Tue, Mar 20, 2018 at 9:09 AM, Pavel Stehule > wrote: > >> Edit: In one case, after dropping the function and recreating it, I > >> got the procedure to return 0 where it had not before, so this smells >

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

2018-03-20 Thread Michail Nikolaev
Hello everyone. I need an advice. I was reworking the patch: added support for the planner, added support for queries with projection, addded support for predicates which could be executed over index data. And.. I realized that my IndexScan is even more index-only than the original

Re: PATCH: Configurable file mode mask

2018-03-20 Thread David Steele
On 3/16/18 11:12 AM, Stephen Frost wrote: > >>> Visibly there would be no need for a -g switch in >>> pg_basebackup as it is possible to guess from the received untar'ed >>> files what should be the permissions of the data based on what is >>> received in pg_basebackup.c. It would also be

Re: Define variable only in the scope that needs it

2018-03-20 Thread Robert Haas
On Tue, Mar 20, 2018 at 7:11 AM, Antonin Houska wrote: > I suppose the current definition in the higher scope is not intentional. This > is what I suggest: This is moot in light of commit 4f15e5d09de276fb77326be5567dd9796008ca2e. -- Robert Haas EnterpriseDB:

Re: pgsql: Fix CommandCounterIncrement in partition-related DDL

2018-03-20 Thread Tom Lane
Alvaro Herrera writes: > I wonder about adding a syscache callback so that when an item in > pg_partitioned_table is invalidated, the relcache entry for partrelid > entry in pg_class is invalidated also. I can't find any precedent for > anything similar, though, and

Re: [HACKERS] per-sesson errors after interrupting CLUSTER pg_attribute (not attrdef)

2018-03-20 Thread Justin Pryzby
On Tue, Mar 20, 2018 at 01:03:57PM -0500, Justin Pryzby wrote: > On Tue, Oct 24, 2017 at 04:56:27PM -0700, Michael Paquier wrote: > > On Fri, Oct 20, 2017 at 9:01 AM, Justin Pryzby wrote: > > > This was briefly scary but seems to have been limited to my psql session > > >

Re: constraint exclusion and nulls in IN (..) clause

2018-03-20 Thread Tom Lane
I wrote: > After further thought, it seems like the place to deal with this is > really operator_predicate_proof(), as in the attached draft patch > against HEAD. This passes the smell test for me, in the sense that > it's an arguably correct and general extension of the proof rules, > but it

Re: configure's checks for --enable-tap-tests are insufficient

2018-03-20 Thread Alvaro Herrera
Tom Lane wrote: > ilm...@ilmari.org (Dagfinn Ilmari =?utf-8?Q?Manns=C3=A5ker?=) writes: > > Tom Lane writes: > >> I just want to test for modules that we know are likely to be omitted > >> on popular platforms. I've proposed testing two that would improve > >> the user

Re: pgsql: Fix CommandCounterIncrement in partition-related DDL

2018-03-20 Thread Alvaro Herrera
Tom Lane wrote: > Alvaro Herrera writes: > > I wonder about adding a syscache callback so that when an item in > > pg_partitioned_table is invalidated, the relcache entry for partrelid > > entry in pg_class is invalidated also. I can't find any precedent for > > anything

Re: [HACKERS] plpgsql - additional extra checks

2018-03-20 Thread Pavel Stehule
2018-03-20 13:56 GMT+01:00 Tels : > Hello Pavel and Tomas, > > On Tue, March 20, 2018 12:36 am, Pavel Stehule wrote: > > 2018-03-19 21:47 GMT+01:00 Tomas Vondra : > > > >> Hi, > >> > >> I'm looking at the updated patch

Re: configure's checks for --enable-tap-tests are insufficient

2018-03-20 Thread Tom Lane
Alvaro Herrera writes: > Tom Lane wrote: >> Ah, thanks. Not sure we need to make an explicit test for Opcode; we've >> not heard of anyone not having that. > In Debian stable, Opcode is in package libperl5.24. This probably > explains why nobody runs into trouble with

Re: PQHost() undefined behavior if connecting string contains both host and hostaddr types

2018-03-20 Thread Peter Eisentraut
On 3/16/18 00:03, Kyotaro HORIGUCHI wrote: > I agree to the conclusion that PQhost() shouldn't return hostaddr > "if it has any host name to return". But I still haven't found > the reason for returning '/tmp' for IP connection. > > The attached patch is revised version of that in the following

Re: configure's checks for --enable-tap-tests are insufficient

2018-03-20 Thread Dagfinn Ilmari Mannsåker
Alvaro Herrera writes: > Tom Lane wrote: > >> Ah, thanks. Not sure we need to make an explicit test for Opcode; we've >> not heard of anyone not having that. > > In Debian stable, Opcode is in package libperl5.24. This probably > explains why nobody runs into trouble

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

2018-03-20 Thread Julian Markwort
I just realized I made a whitespace error when I modified the comments. I hope I don't make a habit of sending erroneous mails. Please accept my apologies, as well as a guaranteed whitespace-error-free patch (updated to version 5 for clarity). Julian Julian Markwort schrieb am 2018-03-20: > To

Re: PATCH: Configurable file mode mask

2018-03-20 Thread Stephen Frost
David, * David Steele (da...@pgmasters.net) wrote: > On 3/16/18 11:12 AM, Stephen Frost wrote: > > > >>> Visibly there would be no need for a -g switch in > >>> pg_basebackup as it is possible to guess from the received untar'ed > >>> files what should be the permissions of the data based on

Re: [HACKERS] VACUUM and ANALYZE disagreeing on what reltuples means

2018-03-20 Thread Tomas Vondra
Hi, So here is an updated version of the patch/fix, addressing the remaining issues in v3 posted by Tom in November. The 0001 part is actually a bugfix in bloom and spgist index AM, which did something like this: reltuples = IndexBuildHeapScan(...) result->heap_tuples =

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

2018-03-20 Thread Julian Markwort
To anyone who followed along with this for so long, I'd like to present my newest version of this patch. As suggested by Arthur Zakirov, there is now only a single GUC ( pg_stat_statements.plan_track ) responsible for the selection of the plans that should be tracked. Possible values are: all,

Re: configure's checks for --enable-tap-tests are insufficient

2018-03-20 Thread Alvaro Herrera
Christoph Berg wrote: > Re: Alvaro Herrera 2018-03-20 <20180320185038.r3hjvfio4elnaqku@alvherre.pgsql> > > Time::HiRes is also in libperl5.24, so as far Debian goes, that one > > would be unnecessary; but IPC::Run and Test::More are in separate > > packages (libipc-run-perl and libtest-base-perl,

Re: [HACKERS] Partition-wise aggregation/grouping

2018-03-20 Thread Robert Haas
On Tue, Mar 20, 2018 at 10:46 AM, Jeevan Chalke wrote: > I have added all these three patches in the attached patch-set and rebased > my changes over it. > > However, I have not yet made this patch-set dependednt on UPPERREL_TLIST > changes you have proposed on

Re: [PoC PATCH] Parallel dump to /dev/null

2018-03-20 Thread Stephen Frost
Greetings, * Christoph Berg (christoph.b...@credativ.de) wrote: > Re: Tom Lane 2018-03-20 <12960.1521557...@sss.pgh.pa.us> > > It might help if the patch were less enthusiastic about trying to > > "optimize" by avoiding extra file opens/closes in the case of output > > to /dev/null. That seems

Re: [HACKERS] taking stdbool.h into use

2018-03-20 Thread Peter Eisentraut
On 3/20/18 02:18, Tom Lane wrote: > I think it'd be worth identifying exactly which platforms have > sizeof(bool) different from 1. Are any of them things that anyone > cares about going forward? The point of this patch is to ease > future development of extensions, but it's unlikely any

Re: PQHost() undefined behavior if connecting string contains both host and hostaddr types

2018-03-20 Thread Haribabu Kommi
On Wed, Mar 21, 2018 at 6:06 AM, Peter Eisentraut < peter.eisentr...@2ndquadrant.com> wrote: > On 3/16/18 00:03, Kyotaro HORIGUCHI wrote: > > I agree to the conclusion that PQhost() shouldn't return hostaddr > > "if it has any host name to return". But I still haven't found > > the reason for

Re: [PROPOSAL] Shared Ispell dictionaries

2018-03-20 Thread Tomas Vondra
On 03/20/2018 02:11 PM, Arthur Zakirov wrote: > Hello, > > On Mon, Mar 19, 2018 at 08:50:46PM +0100, Tomas Vondra wrote: >> Hi Arthur, >> >> I went through the patch - just skimming through the diffs, will do more >> testing tomorrow. Here are a few initial comments. > > Thank you for the

Add "docs" to top-level Makefile for non-GNU make?

2018-03-20 Thread Thomas Munro
Hi hackers, I regularly type "make docs" *doh* "gmake docs" on one system and "gmake docs" *doh* "make docs" on another. Is there any reason we shouldn't add it, for consistency with other targets like check, installcheck etc? Patch attached. -- Thomas Munro http://www.enterprisedb.com

Re: INOUT parameters in procedures

2018-03-20 Thread Merlin Moncure
On Tue, Mar 20, 2018 at 10:09 AM, Pavel Stehule wrote: > 2018-03-20 15:18 GMT+01:00 Merlin Moncure : >> >> postgres=# create or replace procedure p(a inout int default 7) as $$ >> >> begin return; end; $$ language plpgsql; >> >> CREATE PROCEDURE >> >>

Re: INOUT parameters in procedures

2018-03-20 Thread Merlin Moncure
On Tue, Mar 20, 2018 at 4:19 PM, Merlin Moncure wrote: > A) you can't assign output variables with into: > CALL p(1) INTO i; // gives syntax error > > B) you can't assign via assignment > i := p(1); // gives error, 'use CALL' > > C) but you *can* via execute > EXECUTE 'CALL

Re: [HACKERS] path toward faster partition pruning

2018-03-20 Thread Robert Haas
On Tue, Mar 20, 2018 at 7:07 AM, Amit Langote wrote: > On 2018/03/16 21:55, Amit Langote wrote: >> Attached updated patches. > > Attached is further revised version. > > Of note is getting rid of PartitionPruneContext usage in the static > functions of partprune.c.

Re: JIT compiling with LLVM v12.2

2018-03-20 Thread Andres Freund
Hi, On 2018-03-20 23:03:13 -0400, Stephen Frost wrote: > Greetings, > > * Andres Freund (and...@anarazel.de) wrote: > > On 2018-03-20 19:29:55 -0700, Andres Freund wrote: > > > On 2018-03-21 15:22:08 +1300, Thomas Munro wrote: > > > > Somehow your configure test correctly concludes that my $CC

Re: [HACKERS] taking stdbool.h into use

2018-03-20 Thread Michael Paquier
On Tue, Mar 20, 2018 at 02:14:23PM -0700, Andres Freund wrote: > On 2018-03-20 17:04:22 -0400, Peter Eisentraut wrote: > > On 3/20/18 02:18, Tom Lane wrote: > > > I think it'd be worth identifying exactly which platforms have > > > sizeof(bool) different from 1. Are any of them things that anyone

Re: pg_get_functiondef forgets about most GUC_LIST_INPUT GUCs

2018-03-20 Thread Tom Lane
Michael Paquier writes: > On Tue, Mar 20, 2018 at 01:27:35PM -0400, Tom Lane wrote: >> + if (flags & GUC_LIST_QUOTE) >> + elog(FATAL, "extensions cannot define GUC_LIST_QUOTE >> variables"); > This would be better as an ereport with

Re: [HACKERS] taking stdbool.h into use

2018-03-20 Thread Tom Lane
Andres Freund writes: > On March 20, 2018 8:24:41 PM PDT, Michael Paquier wrote: >> Yeah, I agree with that. Just not using stdbool.h in those cases ought >> to be fine. Any platforms where sizeof(bool) is 4 involves macos older >> than 10.5 and Windows

Re: JIT compiling with LLVM v12.2

2018-03-20 Thread Thomas Munro
On Wed, Mar 21, 2018 at 1:50 PM, Andres Freund wrote: > On 2018-03-20 03:14:55 -0700, Andres Freund wrote: >> My current plan is to push the first few commits relatively soon, give >> the BF a few cycles to shake out. Set up a few BF animals with each >> supported LLVM

Re: [HACKERS] Optional message to user when terminating/cancelling backend

2018-03-20 Thread Daniel Gustafsson
> On 20 Mar 2018, at 12:12, Eren Başak wrote: > I reviewed the patch. Here are my notes: Thanks! > The patch does not add new tests (maybe isolation tests) for the new feature. > Are there any opportunities to have tests for confirming the new behavior? Good point, not

Re: JIT compiling with LLVM v12.2

2018-03-20 Thread Andres Freund
Hi, On 2018-03-20 03:14:55 -0700, Andres Freund wrote: > My current plan is to push the first few commits relatively soon, give > the BF a few cycles to shake out. Set up a few BF animals with each > supported LLVM version. Then continue mergin. I've done that. I'll set up a number of BF

Re: JIT compiling with LLVM v12.2

2018-03-20 Thread Andres Freund
On 2018-03-20 19:29:55 -0700, Andres Freund wrote: > Hi, > > On 2018-03-21 15:22:08 +1300, Thomas Munro wrote: > > Somehow your configure test correctly concludes that my $CC (clang > > 4.0) doesn't support -fexcess-precision=standard but that my $CXX > > (clang++ 4.0) does, despite producing a

Re: JIT compiling with LLVM v12.2

2018-03-20 Thread Stephen Frost
Greetings, * Andres Freund (and...@anarazel.de) wrote: > On 2018-03-20 19:29:55 -0700, Andres Freund wrote: > > On 2018-03-21 15:22:08 +1300, Thomas Munro wrote: > > > Somehow your configure test correctly concludes that my $CC (clang > > > 4.0) doesn't support -fexcess-precision=standard but

Re: Question about WalSndWriteData

2018-03-20 Thread Peter Eisentraut
On 3/16/18 12:08, Konstantin Knizhnik wrote: > pq_putmessage_noblock copies data from ctx->out buffer to libpq buffers. > After it we write timestamp to ctx->out buffer. > And comments says that we should do it "as late as possible". > But this timestamp is not included in the copy data packet

Re: PATCH: Configurable file mode mask

2018-03-20 Thread Michael Paquier
On Tue, Mar 20, 2018 at 05:44:22PM -0400, Stephen Frost wrote: > * David Steele (da...@pgmasters.net) wrote: >> On 3/16/18 11:12 AM, Stephen Frost wrote: >> It seems to me that pg_basebackup and pg_receivexlog should have a -g >> option to control the mode of the files that they write to disk (not

Re: pg_get_functiondef forgets about most GUC_LIST_INPUT GUCs

2018-03-20 Thread Michael Paquier
On Tue, Mar 20, 2018 at 01:27:35PM -0400, Tom Lane wrote: > 1. Only GUC_LIST_QUOTE variables need to be special-cased. It works > fine to treat plain LIST variables (e.g. datestyle) with the regular > code path. This is good because there are so few of them. Check. > 2. We should make an

Re: [HACKERS] taking stdbool.h into use

2018-03-20 Thread Andres Freund
On March 20, 2018 8:24:41 PM PDT, Michael Paquier wrote: >On Tue, Mar 20, 2018 at 02:14:23PM -0700, Andres Freund wrote: >> On 2018-03-20 17:04:22 -0400, Peter Eisentraut wrote: >> > On 3/20/18 02:18, Tom Lane wrote: >> > > I think it'd be worth identifying exactly which

Re: WIP: BRIN multi-range indexes

2018-03-20 Thread Tomas Vondra
ored for most "distance" functions, because those can't overflow or underflow in double precision AFAICS. regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services 0001-Pass-all-keys-to-BRIN-consistent-f

Re: JIT compiling with LLVM v12.2

2018-03-20 Thread Andres Freund
Hi, On 2018-03-21 15:22:08 +1300, Thomas Munro wrote: > Somehow your configure test correctly concludes that my $CC (clang > 4.0) doesn't support -fexcess-precision=standard but that my $CXX > (clang++ 4.0) does, despite producing a nearly identical warning: Yea, there was a copy & pasto

Re: Removing useless DISTINCT clauses

2018-03-20 Thread Melanie Plageman
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 This is a review of the patch to remove useless DISTINCT

Re: pgsql: Fix CommandCounterIncrement in partition-related DDL

2018-03-20 Thread Alvaro Herrera
Alvaro Herrera wrote: > Alvaro Herrera wrote: > > Fix CommandCounterIncrement in partition-related DDL > > Hmm, Prion seems unhappy about this. Looking Here's a patch that seems to fix the problem, and generally looks sane to me. The previous arrangements to avoid CCI seem brittle: apparently

Re: [HACKERS] per-sesson errors after interrupting CLUSTER pg_attribute (not attrdef)

2018-03-20 Thread Justin Pryzby
On Tue, Oct 24, 2017 at 04:56:27PM -0700, Michael Paquier wrote: > On Fri, Oct 20, 2017 at 9:01 AM, Justin Pryzby wrote: > > This was briefly scary but seems to have been limited to my psql session (no > > other errors logged). Issue with catcache (?) > > > > I realized

Re: configure's checks for --enable-tap-tests are insufficient

2018-03-20 Thread Tom Lane
ilm...@ilmari.org (Dagfinn Ilmari =?utf-8?Q?Manns=C3=A5ker?=) writes: > Tom Lane writes: >> I just want to test for modules that we know are likely to be omitted >> on popular platforms. I've proposed testing two that would improve >> the user experience on Red Hat; what's

Re: pg_get_functiondef forgets about most GUC_LIST_INPUT GUCs

2018-03-20 Thread Tom Lane
So here's what I think we should do about this: 1. Only GUC_LIST_QUOTE variables need to be special-cased. It works fine to treat plain LIST variables (e.g. datestyle) with the regular code path. This is good because there are so few of them. 2. We should make an effort to minimize the number

Re: [PATCH] session_replication_role = replica with TRUNCATE

2018-03-20 Thread Peter Eisentraut
So, what should we do here? The argument of the patch is that it makes the behavior of TRUNCATE consistent with DELETE, which would be good. But my argument is that the behavior of DELETE is kind of bad, and we should create more stuff like that. I also haven't seen an argument why this change

Re: configure's checks for --enable-tap-tests are insufficient

2018-03-20 Thread Dagfinn Ilmari Mannsåker
Tom Lane writes: > ilm...@ilmari.org (Dagfinn Ilmari =?utf-8?Q?Manns=C3=A5ker?=) writes: >> Tom Lane writes: >>> Ah-hah. So it seems to me that it'd be a useful exercise to start >>> from perl-base and find out what has to be added to get to working >>>

Re: configure's checks for --enable-tap-tests are insufficient

2018-03-20 Thread Tom Lane
ilm...@ilmari.org (Dagfinn Ilmari =?utf-8?Q?Manns=C3=A5ker?=) writes: > Tom Lane writes: >> ilm...@ilmari.org (Dagfinn Ilmari =?utf-8?Q?Manns=C3=A5ker?=) writes: >>> I think the other way would be better simpler: we require a complete >>> Perl core installation. >> And you

Re: missing support of named convention for procedures

2018-03-20 Thread Peter Eisentraut
On 3/16/18 06:29, Pavel Stehule wrote: > attached patch fixes it The fix doesn't seem to work for LANGUAGE SQL procedures. For example: CREATE PROCEDURE ptest5(a int, b int DEFAULT 0) LANGUAGE SQL AS $$ INSERT INTO cp_test VALUES (a, 'foo'); INSERT INTO cp_test VALUES (b, 'bar'); $$; CALL

Re: configure's checks for --enable-tap-tests are insufficient

2018-03-20 Thread Andres Freund
On 2018-03-20 17:23:26 +, Dagfinn Ilmari Mannsåker wrote: > Tom Lane writes: > > That seems like expensive overkill to me, especially since it seems > > unlikely that we'd keep the list up-to-date over time. > > The patches uptread add about 0.2s to a 6.9s configure run

  1   2   >