Re: User defined data types in Logical Replication

2018-03-06 Thread Alvaro Herrera
Masahiko Sawada wrote: > On Tue, Mar 6, 2018 at 8:35 AM, Alvaro Herrera > wrote: > > Therefore, I'm inclined to make this function raise a warning, then > > return a substitute value (something like "unrecognized type XYZ"). > > [...] > > I agree with you about not

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

2018-03-06 Thread Tom Lane
Amit Langote writes: > [ v4-0001-Disregard-nulls-in-SAOP-rightarg-array-list-durin.patch ] This patch seems pretty wrong to me. The proposed proof rule is wrong for !useOr expressions (that is, "scalar op ALL (array)"); you can't just ignore null items in that

Re: [HACKERS] Partition-wise aggregation/grouping

2018-03-06 Thread Robert Haas
On Tue, Mar 6, 2018 at 5:31 AM, Jeevan Chalke wrote: > This is in-lined with enable_hashagg GUC. Do you think > enable_partitionwise_aggregate seems better? But it will be not consistent > with other GUC names like enable_hashagg then. Well, if I had my way,

Re: JIT compiling with LLVM v11

2018-03-06 Thread Andres Freund
Hi, On 2018-03-06 10:29:47 -0500, Peter Eisentraut wrote: > I think taking the total cost as the triggering threshold is probably > good enough for a start. The cost modeling can be refined over time. Cool. > We should document that both jit_optimize_above_cost and > jit_inline_above_cost

Re: check error messages in SSL tests

2018-03-06 Thread Peter Eisentraut
On 2/24/18 10:12, Peter Eisentraut wrote: > On 2/24/18 07:37, Michael Paquier wrote: >> On Fri, Feb 23, 2018 at 01:57:44PM -0500, Peter Eisentraut wrote: >>> Oh. I actually had that file as 0600 in my checked-out tree, probably >>> from earlier experiments. Fixed that. And I also changed it to

Re: Rewriting the test of pg_upgrade as a TAP test - take two

2018-03-06 Thread Peter Eisentraut
On 3/4/18 16:09, Andrew Dunstan wrote: >>> AFAICT, this still has the same problem as the previous take, namely >>> that adding a TAP test suite to the pg_upgrade subdirectory will end up >>> with the build farm client running the pg_upgrade tests twice. What we >>> likely need here is an update

Re: using index or check in ALTER TABLE SET NOT NULL

2018-03-06 Thread Tom Lane
Sergei Kornilov writes: >> ISTM that depending on DEBUG messages is bad because debugging lines >> added elsewhere will make your tests fail; > I agree and this is reason why i not used DEBUG message in tests as was > proposed. I found INFO messages in tests and decided that this

Re: PATCH: Configurable file mode mask

2018-03-06 Thread David Steele
On 3/5/18 10:46 PM, Michael Paquier wrote: > On Mon, Mar 05, 2018 at 03:07:20PM -0500, David Steele wrote: >> On 2/28/18 2:28 AM, Michael Paquier wrote: >>> On Tue, Feb 27, 2018 at 03:52:32PM -0500, David Steele wrote: >>> I don't quite understand here. I have no objection into extending >>>

Re: [HACKERS] Support for Secure Transport SSL library on macOS as OpenSSL alternative

2018-03-06 Thread Peter Eisentraut
On 3/4/18 17:15, Daniel Gustafsson wrote: > Do I think this patch is realistic to target for v11? Well. Given where we > are in the cycle, I don’t think any new TLS implementation going in is > realistic at this point since none of the proposed ones have had enough tyre > kicking done. That

Re: using index or check in ALTER TABLE SET NOT NULL

2018-03-06 Thread Sergei Kornilov
Hello > You should be able to use an event trigger that raises a message when > table_rewrite is hit, to notify the test driver that a rewrite happens. Here is no table rewrite, only verify. So here EventTriggerTableRewrite is not called. Or i missed something? > ISTM that depending on DEBUG

Re: [COMMITTERS] pgsql: Add much-more-extensive TAP tests for pgbench.

2018-03-06 Thread Peter Eisentraut
On 3/2/18 20:19, Tom Lane wrote: > Peter Eisentraut writes: >> On 9/8/17 09:32, Tom Lane wrote: >>> Add much-more-extensive TAP tests for pgbench. > >> The use of done_testing() raises the requirement of Test::More from 0.82 >> to 0.87. That seems OK, but we

Re: using index or check in ALTER TABLE SET NOT NULL

2018-03-06 Thread Sergei Kornilov
Hello > Do you actually need test output proving that this code path was taken > rather than the default one? Seems like looking at the code coverage > report might be enough. I not known. In v4 i use DEBUG1 message and do not check code path in tests at all: by full table scan or by

Re: public schema default ACL

2018-03-06 Thread Robert Haas
On Sat, Mar 3, 2018 at 4:56 AM, Noah Misch wrote: > Commit 5770172 ("Document security implications of search_path and the public > schema.") is largely a workaround for the fact that the boot_val of > search_path contains "public" while template0 gets "GRANT CREATE, USAGE ON >

Re: JIT compiling with LLVM v11

2018-03-06 Thread Andres Freund
On 2018-03-06 12:16:01 -0800, Andres Freund wrote: > > I ran some performance assessments: > > > > merge base (0b1d1a038babff4aadf0862c28e7b667f1b12a30) > > > > make installcheck 3.14s user 3.34s system 17% cpu 37.954 total > > > > jit branch default settings > > > > make installcheck 3.17s user

Re: All Taxi Services need Index Clustered Heap Append

2018-03-06 Thread Evgeniy Shishkin
> On Mar 6, 2018, at 04:57, Craig Ringer wrote: > > On 3 March 2018 at 00:30, Darafei "Komяpa" Praliaskouski > wrote: > > I gave this all some thought and it looks like it all could have not happened > if Postgres was able

Re: [HACKERS] Support for Secure Transport SSL library on macOS as OpenSSL alternative

2018-03-06 Thread Tom Lane
Peter Eisentraut writes: > On 3/4/18 17:15, Daniel Gustafsson wrote: >> Do I think this patch is realistic to target for v11? Well. Given where we >> are in the cycle, I don’t think any new TLS implementation going in is >> realistic at this point since none of

Re: Server won't start with fallback setting by initdb.

2018-03-06 Thread Peter Eisentraut
On 3/4/18 15:31, Tom Lane wrote: > Then, seeing that the factory defaults are ReservedBackends = 3 and > max_wal_senders = 10, something's got to give; there's no way that > max_connections = 10 can work with those. But what I would argue is that > of those three choices, the least defensible one

Re: JIT compiling with LLVM v11

2018-03-06 Thread Tom Lane
Andres Freund writes: > I'm not too worried about that scenario. If, for a cheap plan, the > planner ends up with a seqscan despite it being disabled, you're pretty > close to randomly choosing plans already, as the pruning doesn't work > well anymore (as the %1 percent fuzz

Re: public schema default ACL

2018-03-06 Thread Tom Lane
Robert Haas writes: > On Sat, Mar 3, 2018 at 4:56 AM, Noah Misch wrote: >> I propose, for v11, switching to "GRANT USAGE ON SCHEMA >> public TO PUBLIC" (omit CREATE). Concerns? An alternative is to change the >> default search_path to "$user"; that

Re: Re: BUGFIX: standby disconnect can corrupt serialized reorder buffers

2018-03-06 Thread Alvaro Herrera
Craig Ringer wrote: > Revised patch attached. > > I have _not_ rewritten to use sscanf yet. I'll do that next, so you can > choose the fewer-changes patch for backpatching if desired. Pushed, with a further change: it seems more sensible to centralize the whole operation of building the path,

Re: Server won't start with fallback setting by initdb.

2018-03-06 Thread Tom Lane
I wrote: > Therefore, the condition that actually ought to be getting enforced here > is either "ReservedBackends + max_wal_senders < MaxConnections", or > "ReservedBackends + max_wal_senders <= MaxConnections", depending on > whether you think it's appropriate to require at least one

Re: line_perp() (?-|) is broken.

2018-03-06 Thread Kyotaro HORIGUCHI
Hello, I'm returning to here sonn. I regard Emre's work is aiming to refactor (not improve its functionality of) the code, on the other hand thins one is a separate bug fix which also should be backpatched. But, honestrly I'm not sure such small fix would improve the current situnation of the

Re: TAP test module - PostgresClient

2018-03-06 Thread Kyotaro HORIGUCHI
At Sat, 3 Mar 2018 09:46:11 -0500, Peter Eisentraut wrote in <7f1e5f2f-4902-2c29-de82-381de8cc6...@2ndquadrant.com> > On 3/1/18 23:39, Michael Paquier wrote: > > On Thu, Mar 01, 2018 at 02:27:13AM -0800, Andres Freund wrote: > >> If I understand correctly

Re: Hash Joins vs. Bloom Filters / take 2

2018-03-06 Thread Patrick Krecker
On Thu, Mar 1, 2018 at 4:04 PM, David Steele wrote: > On 3/1/18 6:52 PM, Tomas Vondra wrote: >> >> On 03/02/2018 12:31 AM, Andres Freund wrote: >>> >>> >>> >>> On March 1, 2018 3:22:44 PM PST, Tomas Vondra >>> wrote: On

Re: Index-only scan returns incorrect results when using a composite GIST index with a gist_trgm_ops column.

2018-03-06 Thread Kyotaro HORIGUCHI
At Thu, 01 Mar 2018 15:39:18 -0500, Tom Lane wrote in <22609.1519936...@sss.pgh.pa.us> > Kyotaro HORIGUCHI writes: > > At Wed, 24 Jan 2018 00:13:51 +0300, Sergei Kornilov wrote > > in <348951516742...@web54j.yandex.ru> > >>

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

2018-03-06 Thread Michail Nikolaev
Hello, Andrey. Thanks for review. I have updated comments according your review also renamed some fields for consistency. Additional some notes added to documentation. Updated patch in attach, github updated too. offset_index_only_v3.patch Description: Binary data

Re: [HACKERS] path toward faster partition pruning

2018-03-06 Thread Robert Haas
On Fri, Mar 2, 2018 at 7:32 PM, David Rowley wrote: > Let's look at the following perhaps unlikely case. (I picked an > extreme case to demonstrate why this may be an inferior method) > > Given the table abc (...) partition by range (a,b,c), with the query: > >

Re: Server won't start with fallback setting by initdb.

2018-03-06 Thread Tom Lane
Peter Eisentraut writes: > On 3/4/18 15:31, Tom Lane wrote: >> Then, seeing that the factory defaults are ReservedBackends = 3 and >> max_wal_senders = 10, something's got to give; there's no way that >> max_connections = 10 can work with those. But what I would

Re: Rewriting the test of pg_upgrade as a TAP test - take two

2018-03-06 Thread Tom Lane
Peter Eisentraut writes: > On 3/4/18 16:09, Andrew Dunstan wrote: >> If you want to do this soon I can put out a Buildfarm Client release >> fairly quickly. > I think the dependency is mostly the other way around. How quickly > would build farm owners install

Re: [HACKERS] Support for Secure Transport SSL library on macOS as OpenSSL alternative

2018-03-06 Thread Daniel Gustafsson
> On 06 Mar 2018, at 22:08, Tom Lane wrote: > > Peter Eisentraut writes: >> On 3/4/18 17:15, Daniel Gustafsson wrote: >>> Do I think this patch is realistic to target for v11? Well. Given where we >>> are in the cycle, I don’t think any

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

2018-03-06 Thread Tels
Hello Michail, On Tue, March 6, 2018 4:03 pm, Michail Nikolaev wrote: > Hello, Andrey. > > Thanks for review. > > I have updated comments according your review also renamed some fields for > consistency. > Additional some notes added to documentation. > > Updated patch in attach, github updated

Re: Temporary tables prevent autovacuum, leading to XID wraparound

2018-03-06 Thread Tom Lane
Robert Haas writes: > This is really two separate changes: > 1. Teach backends to remove any leftover pg_temp_%d schema on startup. > 2. Teach autovacuum to remove any leftover tables in a pg_temp_%d > schema if the backend is active but in some other database (rather >

Re: check error messages in SSL tests

2018-03-06 Thread Michael Paquier
On Tue, Mar 06, 2018 at 02:54:16PM -0500, Peter Eisentraut wrote: > This contains a slight problem: The tests contain two different > branches, depending on whether tls-server-end-point is supported. But > these branches run a different number of tests, so the test count of the > top of the test

Re: [HACKERS] Partition-wise aggregation/grouping

2018-03-06 Thread Ashutosh Bapat
On Tue, Mar 6, 2018 at 7:52 PM, Jeevan Chalke wrote: > > > Changes look good to me and refactoring will be useful for partitionwise > patches. > > However, will it be good if we add agg_costs into the GroupPathExtraData > too? > Also can we pass this to the

Re: Speed up the removal of WAL files

2018-03-06 Thread Michael Paquier
On Wed, Mar 07, 2018 at 12:55:43AM +0900, Fujii Masao wrote: > So, what about, as another approach, making the checkpointer instead of > the startup process call RemoveNonParentXlogFiles() when end-of-recovery > checkpoint is executed? ISTM that a recovery doesn't need to wait for >

Re: PATCH: Configurable file mode mask

2018-03-06 Thread Michael Paquier
On Tue, Mar 06, 2018 at 01:32:49PM -0500, David Steele wrote: > On 3/5/18 10:46 PM, Michael Paquier wrote: > Ah, I see what you mean now. Fixed using follow_fast. This variant > claims to be faster and it doesn't matter if files are occasionally > checked twice. Fine for me. I can see this

Some message fixes

2018-03-06 Thread Kyotaro HORIGUCHI
Hello. While translating message catalogs, I found that some messages listing object names are missing partitioned tables/indices. And GUC comment for autovacuum_work_mem has a typo. 1. some messages are missing partitioned table/index The first attached. I'm not sure how the orering ought to

Re: Suspicious call of initial_cost_hashjoin()

2018-03-06 Thread Peter Eisentraut
On 3/2/18 05:01, Thomas Munro wrote: > On Fri, Mar 2, 2018 at 9:06 PM, Antonin Houska wrote: >> David Steele wrote: >>> Does this look right to you? >> >> Yes, this is what I meant. The patch applies cleanly and the code compiles >> well. >> >>> If so, can

Re: GSOC 2018 ideas

2018-03-06 Thread Charles Cui
2018-03-05 1:42 GMT-08:00 Aleksander Alekseev : > Hello Charles, > > >Went through the documents listed by you, and they are helpful! > > It seems the main purpose of extension pg_protobuf is to parse > > a protobuf struct and return the decoded field. May I ask how

RE: Speed up the removal of WAL files

2018-03-06 Thread Tsunakawa, Takayuki
From: Michael Paquier [mailto:mich...@paquier.xyz] > On Wed, Mar 07, 2018 at 12:55:43AM +0900, Fujii Masao wrote: > > So, what about, as another approach, making the checkpointer instead > > of the startup process call RemoveNonParentXlogFiles() when > > end-of-recovery checkpoint is executed?

Re: [HACKERS] make async slave to wait for lsn to be replayed

2018-03-06 Thread Michael Paquier
On Tue, Mar 06, 2018 at 02:24:24PM +0300, Ivan Kartyshov wrote: > Hello, I now is preparing the patch over syntax that Simon offered. And in > few day I will update the patch. > Thank you for your interest in thread. It has been more than one month since a patch update has been requested, and

Re: JIT compiling with LLVM v11

2018-03-06 Thread Thomas Munro
On Tue, Mar 6, 2018 at 10:39 PM, Andres Freund wrote: > [more commits] +* OSX prefixes all object level symbols with an underscore. But neither "macOS" (see commit da6c4f6c and all mentions since). make check at today's HEAD of your jit branch crashes on my FreeBSD

Re: Server won't start with fallback setting by initdb.

2018-03-06 Thread Stephen Frost
Greetings Tom Peter, all, * Tom Lane (t...@sss.pgh.pa.us) wrote: > Peter Eisentraut writes: > > On 3/4/18 15:31, Tom Lane wrote: > >> Then, seeing that the factory defaults are ReservedBackends = 3 and > >> max_wal_senders = 10, something's got to give; there's

Comment on top of RangeVarGetRelidExtended in namespace.c mentioning RangeVarGetRelid

2018-03-06 Thread Michael Paquier
Hi all, While reviewing the NOWAIT patch for VACUUM (well, SKIP_LOCKED per these day's trends), I bumped into $subject. Attached is a one-liner. Thanks, -- Michael diff --git a/src/backend/catalog/namespace.c b/src/backend/catalog/namespace.c index 65e271a8d1..52dd400b96 100644 ---

Re: Rewrite of pg_dump TAP tests

2018-03-06 Thread Michael Paquier
On Tue, Mar 06, 2018 at 11:53:41AM -0500, Stephen Frost wrote: > Greetings, > > * Stephen Frost (sfr...@snowman.net) wrote: >> Attached is a patch (which applies cleaning against a2a2205, but not so >> much anymore, obviously, but I will fix after the releases) which >> greatly improves the big

Re: [doc fix] Correct calculation of vm.nr_hugepages

2018-03-06 Thread Peter Eisentraut
On 2/26/18 08:25, Vasundhar Boddapati wrote: > The following review has been posted through the commitfest application: > make installcheck-world: not tested > Implements feature: not tested > Spec compliant: not tested > Documentation:tested, passed > > It works. Can

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

2018-03-06 Thread Stephen Frost
Greetings Robert, Ashutosh, Arthur, Etsuro, all, * Arthur Zakirov (a.zaki...@postgrespro.ru) wrote: > On Tue, Mar 06, 2018 at 08:09:50PM +0900, Etsuro Fujita wrote: > > Agreed. I added a comment to that function. I think that that comment in > > combination with changes to the FDW docs in the

Re: [HACKERS] path toward faster partition pruning

2018-03-06 Thread Robert Haas
On Tue, Mar 6, 2018 at 8:34 PM, David Rowley wrote: > One thing I've learned in my time working with PostgreSQL is that, if > there's a known hole, someone's probably going to fall down it > eventually. I like working with PostgreSQL because we're pretty > careful

Re: Comment on top of RangeVarGetRelidExtended in namespace.c mentioning RangeVarGetRelid

2018-03-06 Thread Michael Paquier
On Tue, Mar 06, 2018 at 11:37:15PM -0500, Stephen Frost wrote: > Thanks, fix pushed. Thanks, Stephen. -- Michael signature.asc Description: PGP signature

Missing break statement after transformCallStmt in transformStmt

2018-03-06 Thread Ashutosh Bapat
HI, Commit 76b6aa41f41db66004b1c430f17a546d4102fbe7 a new case for CallStmt in transformStmt but forgot to add a break statement at the end of the case. This doesn't create any problems since the default case to which it continues without break doesn't change the result. But this is going to cause

Re: public schema default ACL

2018-03-06 Thread Stephen Frost
Greetings Tom, all, * Tom Lane (t...@sss.pgh.pa.us) wrote: > Robert Haas writes: > > On Sat, Mar 3, 2018 at 4:56 AM, Noah Misch wrote: > >> I propose, for v11, switching to "GRANT USAGE ON SCHEMA > >> public TO PUBLIC" (omit CREATE). Concerns? An

Re: Comment on top of RangeVarGetRelidExtended in namespace.c mentioning RangeVarGetRelid

2018-03-06 Thread Stephen Frost
Greetings Michael, * Michael Paquier (mich...@paquier.xyz) wrote: > While reviewing the NOWAIT patch for VACUUM (well, SKIP_LOCKED per these > day's trends), I bumped into $subject. > > Attached is a one-liner. Thanks, fix pushed. Stephen signature.asc Description: PGP signature

Re: [HACKERS] path toward faster partition pruning

2018-03-06 Thread David Rowley
On 7 March 2018 at 10:15, Robert Haas wrote: > On Fri, Mar 2, 2018 at 7:32 PM, David Rowley > wrote: >> It appears to me, for your method to work we'd need to try every >> combination of the clauses matching each partition key, which in this

Re: [HACKERS] [Patch] Log SSL certificate verification errors

2018-03-06 Thread Michael Paquier
On Tue, Mar 06, 2018 at 02:56:41PM -0500, Peter Eisentraut wrote: > But this patch was quite useful while debugging some of the other > ongoing SSL work. So if it were revived at some point in the future, it > would be welcome. +1! -- Michael signature.asc Description: PGP signature

Re: BUG #14941: Vacuum crashes

2018-03-06 Thread Michael Paquier
On Mon, Mar 05, 2018 at 09:55:13PM +, Bossart, Nathan wrote: > On 3/3/18, 6:13 PM, "Andres Freund" wrote: >> I was working on committing 0002 and 0003, when I noticed that the >> second patch doesn't actually fully works. NOWAIT does what it says on >> the tin iff the

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

2018-03-06 Thread Andrey Borodin
> 7 марта 2018 г., в 3:25, Tels написал(а): > > It could be named "SkipTuples" (e.g. this is the number of tuples we need > to skip, not the number we have skipped), and the other one then > "iss_SkipTuplesRemaining" so they are consistent with each other. I

Re: Rewrite of pg_dump TAP tests

2018-03-06 Thread Alvaro Herrera
Stephen Frost wrote: > Greetings, > > * Stephen Frost (sfr...@snowman.net) wrote: > > Attached is a patch (which applies cleaning against a2a2205, but not so > > much anymore, obviously, but I will fix after the releases) which > > greatly improves the big pg_dump TAP tests. There's probably

Re: using index or check in ALTER TABLE SET NOT NULL

2018-03-06 Thread Alvaro Herrera
Sergei Kornilov wrote: > Hello, Ildar > Thanks. I looked ATTACH PARTITION tests and found such checks. If no one is > against i will just use in my patch INFO level instead DEBUG1, similarly > ATTACH PARTITION code. Updated patch attached. > > Or i can rewrite tests to use DEBUG1 level. You

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

2018-03-06 Thread Tom Lane
David Gould writes: > On Thu, 01 Mar 2018 18:49:20 -0500 > Tom Lane wrote: >> The sticking point in my mind right now is, if we do that, what to do with >> VACUUM's estimates. > For what it's worth, I think the current estimate formula for VACUUM is > pretty

Re: 2018-03 CFM

2018-03-06 Thread Andrey Borodin
> 7 марта 2018 г., в 12:00, Michael Paquier написал(а): > > On Wed, Mar 07, 2018 at 11:56:01AM +0500, Andrey Borodin wrote: >> Actually, as for now, it is impossible to register patch at CF >> 2018-09. At least I do not see the "new patch" button. May be CF >> should be

Re: [HACKERS] make async slave to wait for lsn to be replayed

2018-03-06 Thread Ivan Kartyshov
Andres Freund писал 2018-03-02 03:47: On 2018-02-02 19:41:37 +, Simon Riggs wrote: On 2 February 2018 at 18:46, Robert Haas wrote: > On Fri, Feb 2, 2018 at 3:46 AM, Simon Riggs wrote: >> In PG11, I propose the following command, sticking

Re: ALTER TABLE ADD COLUMN fast default

2018-03-06 Thread David Rowley
On 6 March 2018 at 22:40, David Rowley wrote: > Okay, it looks like the patch should disable physical tlists when > there's a missing column the same way as we do for dropped columns. > Patch attached. Please disregard the previous patch in favour of the attached.

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

2018-03-06 Thread Amit Langote
On 2018/03/06 18:46, Emre Hasegeli wrote: >> Patch teaches it to ignore nulls when it's known that the operator being >> used is strict. It is harmless and has the benefit that constraint >> exclusion gives an answer that is consistent with what actually running >> such a qual against a table's

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

2018-03-06 Thread Emre Hasegeli
> Hmm, state->next refers to two different pointer values on line 1 and line > 2. It may end up being set to NULL on line 1. Am I missing something? True, lnext(state->next) can set it to NULL. I confused by the below code on the same function doing the steps in reverse order. With this

Re: IndexJoin memory problem using spgist and boxes

2018-03-06 Thread Anton Dignös
>> The better alternative may be to have two temporary memory contexts, >> one per-tuple for calling the inner consistent method and one >> per-index-scan for the traversal memory. > > > Yes, this seems to be a better way of fixing the problem without introducing > regressions mentioned by Tom.

Re: JIT compiling with LLVM v11

2018-03-06 Thread Andres Freund
On 2018-03-05 14:01:05 -0800, Andres Freund wrote: > On 2018-03-05 13:36:04 -0800, Andres Freund wrote: > > On 2018-03-05 16:19:52 -0500, Peter Eisentraut wrote: > > > Testing 0732ee73cf3ffd18d0f651376d69d4798d351ccc on Debian testing ... > > > > > > The build works out of the box with whatever

Re: [HACKERS] Partition-wise aggregation/grouping

2018-03-06 Thread Ashutosh Bapat
Hi Jeevan, I am back reviewing this. Here are some comments. @@ -1415,7 +1413,8 @@ add_paths_to_append_rel(PlannerInfo *root, RelOptInfo *rel, * the unparameterized Append path we are constructing for the parent. * If not, there's no workable unparameterized path. */

Re: ALTER TABLE ADD COLUMN fast default

2018-03-06 Thread David Rowley
On 1 March 2018 at 11:49, Andrew Dunstan wrote: > On Wed, Feb 28, 2018 at 5:39 AM, Andres Freund wrote: >> On 2018-02-27 14:29:44 +1030, Andrew Dunstan wrote: >>> Profiling through timer interrupt >>> samples %image name

Re: [HACKERS] Partition-wise aggregation/grouping

2018-03-06 Thread Jeevan Chalke
On Tue, Mar 6, 2018 at 2:29 AM, Robert Haas wrote: > On Mon, Mar 5, 2018 at 3:56 AM, Jeevan Chalke > wrote: > > However, to perform Gather or Gather Merge once we have all partial paths > > ready, and to avoid too many existing code

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

2018-03-06 Thread Etsuro Fujita
(2018/03/06 1:57), Arthur Zakirov wrote: IMHO, it is worth to add more explaining comment into deparseReturningList, why it is necessary to merge WCO attributes to RETURNING clause. You already noted it in the thread. I think it could confuse someone who not very familiar how RETURNING is

Re: INOUT parameters in procedures

2018-03-06 Thread Pavel Stehule
2018-03-05 19:38 GMT+01:00 Peter Eisentraut < peter.eisentr...@2ndquadrant.com>: > On 3/5/18 11:00, Pavel Stehule wrote: > > I am looking on attached code, and it looks pretty well. Can be really > > nice if this code will be part of release 11, because it is very > > interesting, important

Re: [HACKERS] PoC: full merge join on comparison clause

2018-03-06 Thread Alexander Kuzmenkov
On 05.03.2018 08:30, Ashutosh Bapat wrote: But creating such patches using git format-patch (with -v as some suggest) really helps in general. Thanks for the advice. I heard about this workflow, but never used it myself. Perhaps it's time to try it. -- Alexander Kuzmenkov Postgres

Re: WIP Patch: Pgbench Serialization and deadlock errors

2018-03-06 Thread Marina Polyakova
On 05-03-2018 18:21, David Steele wrote: Hello Marina, Hello, David! On 1/12/18 12:01 PM, Marina Polyakova wrote: ... This patch was marked Waiting on Author on Jan 8 and no new patch was submitted before this commitfest. I think we should mark this patch as Returned with Feedback. I'm

Re: [HACKERS] make async slave to wait for lsn to be replayed

2018-03-06 Thread Dmitry Ivanov
In PG11, I propose the following command, sticking mostly to Ants' syntax, and allowing to wait for multiple events before it returns. It doesn't hold snapshot and will not get cancelled by Hot Standby. WAIT FOR event [, event ...] options event is LSN value TIMESTAMP value options TIMEOUT

Re: Faster inserts with mostly-monotonically increasing values

2018-03-06 Thread Claudio Freire
On Tue, Mar 6, 2018 at 1:45 AM, Peter Geoghegan wrote: > On Mon, Mar 5, 2018 at 7:10 PM, Claudio Freire wrote: >>> Introducing any case that allows us to land on a recycled page, and >>> reason that it must at least not be the page we were looking for based

Re: Re: [HACKERS] Support to COMMENT ON DATABASE CURRENT_DATABASE

2018-03-06 Thread Alvaro Herrera
David Steele wrote: > On 3/1/18 2:09 PM, Tom Lane wrote: > > > TBH, I think we should reject this patch. While it's not huge, > > it's not trivial either, and I find the grammar changes rather ugly. > > The argument for using the feature to fix pg_dump issues has evaporated, > > but I don't see

Re: [HACKERS] pg_upgrade to clusters with a different WAL segment size

2018-03-06 Thread Bossart, Nathan
Thanks for taking a look. On 3/3/18, 12:22 PM, "Peter Eisentraut" wrote: > On 2/7/18 13:34, Bossart, Nathan wrote: >> Here is a patch to allow users to change the WAL segment size of a cluster >> with >> pg_resetwal. Like the '--wal-segize' option in initdb,

Re: [HACKERS] Support to COMMENT ON DATABASE CURRENT_DATABASE

2018-03-06 Thread David Steele
Hi Álvaro, On 3/6/18 10:25 AM, Alvaro Herrera wrote: > David Steele wrote: > >> On 3/1/18 2:09 PM, Tom Lane wrote: >> >>> TBH, I think we should reject this patch. While it's not huge, >>> it's not trivial either, and I find the grammar changes rather ugly. >>> The argument for using the

Re: using index or check in ALTER TABLE SET NOT NULL

2018-03-06 Thread Sergei Kornilov
Hello, Ildar Thanks. I looked ATTACH PARTITION tests and found such checks. If no one is against i will just use in my patch INFO level instead DEBUG1, similarly ATTACH PARTITION code. Updated patch attached. Or i can rewrite tests to use DEBUG1 level. regards, Sergeidiff --git

Re: Re: [HACKERS] Subscription code improvements

2018-03-06 Thread David Steele
Hi Masahiko, On 1/30/18 5:00 AM, Masahiko Sawada wrote: > On Fri, Jan 26, 2018 at 11:41 AM, Peter Eisentraut > wrote: >> On 1/24/18 02:33, Masahiko Sawada wrote: >>> Thank you for notification. Since it seems to me that no one is >>> interested in this patch, it

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

2018-03-06 Thread Amit Kapila
On Tue, Mar 6, 2018 at 4:53 AM, Andres Freund wrote: > Hi, > >> diff --git a/src/backend/executor/nodeLockRows.c >> b/src/backend/executor/nodeLockRows.c >> index 7961b4be6a..b07b7092de 100644 >> --- a/src/backend/executor/nodeLockRows.c >> +++

Re: Changing the autovacuum launcher scheduling; oldest table first algorithm

2018-03-06 Thread Alvaro Herrera
Hello I haven't read your respective patches yet, but both these threads brought to memory a patch I proposed a few years ago that I never completed: https://www.postgresql.org/message-id/flat/20130124215715.GE4528%40alvh.no-ip.org In that thread I posted a patch to implement a prioritisation

Re: Re: [HACKERS] [PATCH] kNN for SP-GiST

2018-03-06 Thread David Steele
Hi Nikita, On 3/2/18 1:35 AM, Andres Freund wrote: > > On 2018-03-01 00:58:42 +0300, Nikita Glukhov wrote: >> Attached 3rd version of kNN for SP-GiST. > > Given that this was submitted to the last v11 CF, after not being > developed for a year, I think it's unfortunately too late for v11. As we

Re: Re: [HACKERS] Can ICU be used for a database's default sort order?

2018-03-06 Thread David Steele
On 3/2/18 1:14 AM, Andres Freund wrote: > > On 2018-02-10 20:45:40 +0500, Andrey Borodin wrote: >> I've contacted Postgres Professional. Marina Polyakova had kindly provided >> their patch. >> The patch allows to use libc locale with ICU collation as default for >> cluster or database. >> >> It

Re: JIT compiling with LLVM v11

2018-03-06 Thread Peter Eisentraut
With the build issues in check, I'm looking at the configuration settings. I think taking the total cost as the triggering threshold is probably good enough for a start. The cost modeling can be refined over time. We should document that both jit_optimize_above_cost and jit_inline_above_cost

Re: Speed up the removal of WAL files

2018-03-06 Thread Fujii Masao
On Wed, Feb 21, 2018 at 5:27 PM, Tsunakawa, Takayuki wrote: > From: Michael Paquier [mailto:mich...@paquier.xyz] > It seems to me that you would reintroduce partially the problems that >> 1d4a0ab1 has fixed. In short, if a crash happens in the code paths calling

Re: Kerberos test suite

2018-03-06 Thread Peter Eisentraut
On 3/5/18 16:34, Thomas Munro wrote: > On Tue, Mar 6, 2018 at 8:45 AM, Peter Eisentraut > wrote: >> New patch attached. > > Passes here. LGTM. committed > Only complaint is your assumption that 'darwin' implies HomeBrew > installation paths, but you already

Re: Kerberos test suite

2018-03-06 Thread Peter Eisentraut
On 3/5/18 21:08, Michael Paquier wrote: > +my $kdc_port = int(rand() * 16384) + 49152; > That may not be worth worrying as that's an ephemeral port range but it > can make the test a bit unstable... This is what we've been using in the other tests as well. It's clearly not optimal, but making it

Re: JIT compiling with LLVM v11

2018-03-06 Thread Peter Eisentraut
On 3/6/18 04:39, Andres Freund wrote: > I did, and reproduced. Turned out I just missed the error in the above > test. > > The bug was caused by one ifdef in get_LifetimeEnd() being wrong > (function is is overloaded starting in 5 rather than 4). The comment > above it even had it right... OK,

Re: using index or check in ALTER TABLE SET NOT NULL

2018-03-06 Thread Ildar Musin
On 06.03.2018 16:12, Sergei Kornilov wrote: Hello thank you for review! Adding check constraint will also force the full table scan. So I think it would be better to rephrased it as follows: Agree. I updated docs in new attached patch slightly different Regarding regression tests it may

Re: Re: [PATCH] Add support for ON UPDATE/DELETE actions on ALTER CONSTRAINT

2018-03-06 Thread David Steele
Hi Matheus, On 3/3/18 1:32 PM, Peter Eisentraut wrote: > On 2/20/18 10:10, Matheus de Oliveira wrote: >> Besides that, there is a another change in this patch on current ALTER >> CONSTRAINT about deferrability options. Previously, if the user did >> ALTER CONSTRAINT without specifying an option

Re: BUG #14941: Vacuum crashes

2018-03-06 Thread Bossart, Nathan
On 3/5/18, 7:58 PM, "Andres Freund" wrote: > I've pushed the first one now. There seems to be no reason to wait with > it, even it takes a bit till we can get the second part right. Thanks! Nathan

Re: WIP Patch: Pgbench Serialization and deadlock errors

2018-03-06 Thread David Steele
Hi Marina, On 3/6/18 4:45 AM, Marina Polyakova wrote: > On 05-03-2018 18:21, David Steele wrote: >> Hello Marina, > > Hello, David! > >> On 1/12/18 12:01 PM, Marina Polyakova wrote: > ... >> >> This patch was marked Waiting on Author on Jan 8 and no new patch was >> submitted before this

Re: Re: Re: [HACKERS] Cached plans and statement generalization

2018-03-06 Thread David Steele
On 3/2/18 9:26 AM, David Steele wrote: > On 1/12/18 7:53 AM, Konstantin Knizhnik wrote: >> >> >> On 12.01.2018 03:40, Thomas Munro wrote: >>> On Sun, Jan 7, 2018 at 11:51 AM, Stephen Frost >>> wrote: * Konstantin Knizhnik (k.knizh...@postgrespro.ru) wrote: > Updated

Re: Re: [PATCH] Atomic pgrename on Windows

2018-03-06 Thread Alexander Korotkov
Hi, David! On Tue, Mar 6, 2018 at 5:04 PM, David Steele wrote: > On 1/20/18 10:13 AM, Magnus Hagander wrote: > > > > On Tue, Nov 28, 2017 at 2:47 AM, Michael Paquier > > > wrote: > > > > On Mon, Nov 27, 2017

Re: [PATCH] Atomic pgrename on Windows

2018-03-06 Thread David Steele
On 3/6/18 9:06 AM, Alexander Korotkov wrote: > > On Tue, Mar 6, 2018 at 5:04 PM, David Steele > wrote: > > On 1/20/18 10:13 AM, Magnus Hagander wrote: > > > > Unlinking it first seems dangerous, as pointed out by Andres. > > >

Re: [PATCH] Atomic pgrename on Windows

2018-03-06 Thread Alexander Korotkov
On Tue, Mar 6, 2018 at 5:11 PM, David Steele wrote: > On 3/6/18 9:06 AM, Alexander Korotkov wrote: > > > > On Tue, Mar 6, 2018 at 5:04 PM, David Steele > > wrote: > > > > On 1/20/18 10:13 AM, Magnus Hagander wrote: > >

Re: Re: [HACKERS] Support to COMMENT ON DATABASE CURRENT_DATABASE

2018-03-06 Thread David Steele
Hi Jing, On 3/1/18 2:09 PM, Tom Lane wrote: > Jing Wang writes: >> [ support_CURRENT_DATABASE_keyword_v4.7.patch ] > > TBH, I think we should reject this patch. While it's not huge, > it's not trivial either, and I find the grammar changes rather ugly. > The argument for

Re: Re: Boolean partitions syntax

2018-03-06 Thread David Steele
Hi Amit, On 3/2/18 2:27 AM, Amit Langote wrote: > On 2018/03/02 15:58, Andres Freund wrote: >> On 2018-02-02 17:00:24 -0500, Tom Lane wrote: >>> Peter Eisentraut writes: There might be other options, but one way to solve this would be to treat

Re: General purpose hashing func in pgbench

2018-03-06 Thread Ildar Musin
Hello Teodor, Thank you for reviewing this patch. On 06.03.2018 15:53, Teodor Sigaev wrote: Patch applies, compiles, pgbench & global "make check" ok, doc built ok. Agree. If I understand upthread correctly, implementation of Murmur hash algorithm based on Austin Appleby work

  1   2   >