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

2018-03-06 Thread Craig Ringer
On 6 March 2018 at 09:58, Craig Ringer wrote: > On 5 March 2018 at 23:25, David Steele wrote: > >> Hi Craig, >> >> On 1/21/18 5:45 PM, Craig Ringer wrote: >> > On 6 January 2018 at 08:28, Alvaro Herrera > > > wrote: >> > >> > I think this should use ReadDirExt

Re: INOUT parameters in procedures

2018-03-06 Thread Pavel Stehule
2018-03-05 19:41 GMT+01:00 Pavel Stehule : > > > 2018-03-05 19:38 GMT+01:00 Peter Eisentraut 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 >> > inte

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

2018-03-06 Thread Craig Ringer
On 6 March 2018 at 16:07, Craig Ringer wrote: > On 6 March 2018 at 09:58, Craig Ringer wrote: > >> On 5 March 2018 at 23:25, David Steele wrote: >> >>> Hi Craig, >>> >>> On 1/21/18 5:45 PM, Craig Ringer wrote: >>> > On 6 January 2018 at 08:28, Alvaro Herrera >> >

Re: MCV lists for highly skewed distributions

2018-03-06 Thread John Naylor
On 3/5/18, Dean Rasheed wrote: > Attached is an updated patch. I decided to move the code that > determines the minimum number of occurrences for an MCV list item out > to a separate function. It's not much code, but there's a large > comment to explain its statistical justification, and I didn't

Re: WIP: Covering + unique indexes.

2018-03-06 Thread Thomas Munro
On Wed, Jan 31, 2018 at 3:09 AM, Anastasia Lubennikova wrote: > Thank you for reviewing. All mentioned issues are fixed. == Applying patch 0002-covering-btree_v4.patch... 1 out of 1 hunk FAILED -- saving rejects to file src/backend/access/nbtree/README.rej 1 out of 1 hunk FAILED -- saving rejects

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 featur

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 Professi

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 th

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 symbol name >>> 2258428.5982 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: 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. -- David Rowley

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

2018-03-06 Thread Emre Hasegeli
> 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 rows would do. Yes, I understood that. I just

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 ro

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 cleare

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

2018-03-06 Thread Amit Langote
On 2018/03/06 19:16, Emre Hasegeli wrote: >> 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 d

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 rearrangement, I am calling > > try_partitionwise_grouping() be

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

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 related

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 mostly to Ants' >> syntax, and allowing to wait for

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 dela

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: 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 >>> on *any* criteria about the page it

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

2018-03-06 Thread Simon Riggs
On 6 March 2018 at 11:24, Dmitry Ivanov wrote: >> 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 ...] opti

Re: Fwd: [BUGS] pg_trgm word_similarity inconsistencies or bug

2018-03-06 Thread Teodor Sigaev
I agree with Teodor (upthread, not quoted here) that the documentation could use some editing. I started to do it myself, but quickly realized I have no knowledge of the content. I'm afraid I would destroy the meaning while updating the grammar. Anyone understand the subject matter well enough

Re: Faster inserts with mostly-monotonically increasing values

2018-03-06 Thread Simon Riggs
On 6 March 2018 at 04:40, Pavan Deolasee wrote: > > > On Tue, Mar 6, 2018 at 7:29 AM, Peter Geoghegan wrote: >> >> On Mon, Mar 5, 2018 at 5:48 PM, Claudio Freire >> wrote: >> >> > I believe PKs are a prime candidate for this optimization, and >> > expecting it to apply only when no concurrency i

Re: inserts into partitioned table may cause crash

2018-03-06 Thread Etsuro Fujita
Hi Amit, (2018/03/06 15:28), Amit Langote wrote: On 2018/03/05 22:00, Etsuro Fujita wrote: An alternative fix for this would be to handle the set/reset of estate->es_result_relation_info in a higher level ie, ExecModifyTable, like the attached: Your patch seems like a good cleanup overall, f

Re: committing inside cursor loop

2018-03-06 Thread Ildus Kurbangaliev
On Tue, 20 Feb 2018 09:11:50 -0500 Peter Eisentraut wrote: > Here is a patch that allows COMMIT inside cursor loops in PL/pgSQL. > As alluded to in earlier threads, this is done by converting such > cursors to holdable automatically. A special flag "auto-held" marks > such cursors, so we know to

Re: Faster inserts with mostly-monotonically increasing values

2018-03-06 Thread Claudio Freire
On Tue, Mar 6, 2018 at 9:06 AM, Simon Riggs wrote: >> Simon had raised concerns about DESC indexes and whether we need to do the >> checks for leftmost page in that case. I haven't yet figured out if DESC >> indexes are actually stored in the reverse order. I am gonna look at that >> too. > > No,

Re: General purpose hashing func in pgbench

2018-03-06 Thread Teodor Sigaev
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 https://github.com/aappleby/smhasher/blob/master/src/MurmurHash2.cpp If so, I have notice and objections:

Re: All Taxi Services need Index Clustered Heap Append

2018-03-06 Thread Komяpa
пн, 5 мар. 2018 г. в 19:48, Ants Aasma : > On Mon, Mar 5, 2018 at 2:11 PM, Darafei "Komяpa" Praliaskouski > wrote: > >> This approach mixes well with hash > >> partitioning. It would be neat indeed if PostgreSQL do something > >> equivalent on its own, and pluggable storage work being done could

Re: BUGFIX: standby disconnect can corrupt serialized reorder buffers

2018-03-06 Thread Petr Jelinek
On 06/03/18 09:37, 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.  > > > ... and I'm not convinced it's really an improvement. > >         uint

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

2018-03-06 Thread Sergei Kornilov
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 be useful to set client_min_messages > to 'debu

Re: pgbench - allow to specify scale as a size

2018-03-06 Thread Peter Eisentraut
On 3/4/18 04:09, Fabien COELHO wrote: > So ISTM that the patch is dead because it is somehow necessarily > imprecise. People will continue to do some wild guessing on how to > translate scale to anything related to size. I think so. > Conclusion: mark the patch as rejected? OK -- Peter Eisen

cannot drop replication slot if server is running in single-user mode

2018-03-06 Thread tushar
Hi, I found that if server is running in single-user mode , there we can create replication slot but cannot drop it . backend> SELECT * FROM pg_create_physical_replication_slot('p'); 2018-03-06 13:20:03.441 GMT [14869] LOG:  statement: SELECT * FROM pg_create_physical_replication_slot('p');

Re: All Taxi Services need Index Clustered Heap Append

2018-03-06 Thread Komяpa
вт, 6 мар. 2018 г. в 4:57, Craig Ringer : > 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 to cluster heap insertions by (id, ts) index. >> We're ok with synchronuous_co

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 https://github.

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

2018-03-06 Thread Arthur Zakirov
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 patch would help FDW authors > understand why that is needed. Please find attached an updated version of > t

Re: Contention preventing locking

2018-03-06 Thread Amit Kapila
On Mon, Mar 5, 2018 at 1:26 PM, Konstantin Knizhnik wrote: > > On 03.03.2018 16:44, Amit Kapila wrote: >> >> On Thu, Mar 1, 2018 at 1:22 PM, Konstantin Knizhnik >> wrote: >>> >>> On 28.02.2018 16:32, Amit Kapila wrote: On Mon, Feb 26, 2018 at 8:26 PM, Konstantin Knizhnik wrote: >>

Re: Re: [PATCH] Atomic pgrename on Windows

2018-03-06 Thread David Steele
Hi Alexander, On 1/20/18 10:13 AM, Magnus Hagander wrote: > > On Tue, Nov 28, 2017 at 2:47 AM, Michael Paquier > mailto:michael.paqu...@gmail.com>> wrote: > > On Mon, Nov 27, 2017 at 3:28 PM, Alexander Korotkov > mailto:a.korot...@postgrespro.ru>> wrote: > > Attached patch atomic-pgr

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 > > mailto:michael.paqu...@gmail.com>> wrote: > > > > On Mon, Nov 27, 2017 at 3:28 PM, Alexander Korotkov > > mailto:a.kor

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

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. > > > > What about first tr

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: > > > > > > Unlinking it first seems dang

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 would be better to close out this

Re: [HACKERS] Partition-wise aggregation/grouping

2018-03-06 Thread Jeevan Chalke
On Tue, Mar 6, 2018 at 4:59 PM, Ashutosh Bapat < ashutosh.ba...@enterprisedb.com> wrote: > 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 con

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 using the feature to fi

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 >> +++ b/src/backend/executor/nodeLockRows.c >> @@ -218,6 +

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 sc

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

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 partition bounds as a general expression in

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 on

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: 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: Add default role 'pg_access_server_files'

2018-03-06 Thread Stephen Frost
Magnus, all, * Magnus Hagander (mag...@hagander.net) wrote: > On Tue, Jan 2, 2018 at 1:08 PM, Stephen Frost wrote: > > Suggestions on a name for this..? pg_server_copy_program? > > Presumably it would also be used in postgres_fdw, so that seems like a bad > name. Maybe pg_exec_server_command?

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 commitf

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 version of the patch i

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 a

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 req

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, the new '-s' option >> accepts segm

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 feature

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 a/doc/src/sgml/r

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 >> RemoveXlogFile with durable = f

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 did that in other tests before > thi

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: [patch] BUG #15005: ANALYZE can make pg_class.reltuples inaccurate.

2018-03-06 Thread Tom Lane
David Gould writes: > On Sun, 4 Mar 2018 07:49:46 -0800 > Jeff Janes wrote: >> I don't see how it could have caused the problem in the first place. In >> your demonstration case, you had to turn off autovac in order to get it to >> happen, and then when autovac is turned back on, it is all prime

Re: [PROPOSAL] Shared Ispell dictionaries

2018-03-06 Thread Arthur Zakirov
On Wed, Feb 07, 2018 at 07:28:29PM +0300, Arthur Zakirov wrote: > Here is rebased version of the patch due to changes into dict_ispell.c. > The patch itself wasn't changed. Here is rebased version of the patch due to changes within pg_proc.h. I haven't implemented a mmap prototype yet, though. --

Re: STATISTICS retained in CREATE TABLE ... LIKE (INCLUDING ALL)?

2018-03-06 Thread Alvaro Herrera
David Rowley wrote: > On 6 March 2018 at 11:43, Alvaro Herrera wrote: > > 4. See elsewhere in the thread about list_copy vs. list_concat :-) > > I saw that. Thanks for fixing. The only weird thing I see in the > changes is that the comment here claims it makes a copy, but it does > not. > > + *

Re: pgsql: Clone extended stats in CREATE TABLE (LIKE INCLUDING ALL)

2018-03-06 Thread Alvaro Herrera
Alvaro Herrera wrote: > Thomas Munro wrote: > > On Tue, Mar 6, 2018 at 11:39 AM, Alvaro Herrera > > wrote: > > > Clone extended stats in CREATE TABLE (LIKE INCLUDING ALL) > > > > Is this commit responsible for this valgrind error? > > > > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=

Re: Kerberos test suite

2018-03-06 Thread Robbie Harwood
Peter Eisentraut writes: > On 3/5/18 21:08, Michael Paquier wrote: > >> Perhaps the tests should be skipped on Windows or just produce an error? >> Like LDAP tests, libraries are supported on Windows but the hardcoded >> paths make things harder to handle there. > > Hmm, why couldn't someone inst

Re: [HACKERS] Support to COMMENT ON DATABASE CURRENT_DATABASE

2018-03-06 Thread Tom Lane
Alvaro Herrera writes: > David Steele wrote: >> Based on Tom's feedback, and hearing no opinions to the contrary, I have >> marked this patch Rejected. > I think I opine contrarywise, but I haven't made time to review the > status of this in detail. I'm fine with keeping it rejected for now, > b

Re: Prefix operator for text and spgist support

2018-03-06 Thread Arthur Zakirov
On Mon, Feb 19, 2018 at 05:19:15PM +0300, Ildus Kurbangaliev wrote: > At brief look at this place seems better to move this block into > pattern_fixed_prefix function. But there is also `vartype` variable > which used to in prefix construction, and it would require pass this > variable too. And sin

Re: Kerberos test suite

2018-03-06 Thread Alvaro Herrera
Peter Eisentraut wrote: > 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

Re: 2018-03 Commitfest Summary (Andres #1)

2018-03-06 Thread Fabien COELHO
Hello, Please check your numbers before criticising someone unduly. I did. I filtered emails by threads, and counted the number of messages. I do not see how this is related to the number of patch submissions or the number of reviews posted, but it is certainly counting something. The C

Re: MCV lists for highly skewed distributions

2018-03-06 Thread Dean Rasheed
On 6 March 2018 at 08:51, John Naylor wrote: > On 3/5/18, Dean Rasheed wrote: >> Attached is an updated patch. > Nice. The results look good. Thanks for the review. > I agree it should be in a separate function. As for that large > comment, I spent some time pouring over it to verify the math

Re: Fwd: [BUGS] pg_trgm word_similarity inconsistencies or bug

2018-03-06 Thread David Steele
On 3/6/18 7:04 AM, Teodor Sigaev wrote: >> I agree with Teodor (upthread, not quoted here) that the documentation >> could use some editing. >> >> I started to do it myself, but quickly realized I have no knowledge of >> the content.  I'm afraid I would destroy the meaning while updating the >> gra

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 more

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 sho

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 reasonable. Consider a table T with N

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 hiding the actual reason for

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 mes

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

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 to cluster heap insertions by (id, ts) index

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 was an > accep

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

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 case. It's also wrong when we need

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 should update the version requirement

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 m

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

2018-03-06 Thread Peter Eisentraut
On 3/1/18 20:48, Andres Freund wrote: > On 2018-01-17 09:03:51 -0500, Peter Eisentraut wrote: >> Graham, will you be able to respond to my questions or provide an >> updated patch within the next week or so? > > Given that nothing has happend since, I've marked this as returned with > feedback. A

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 migh

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 t

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, enable_hashagg would be spelled enable

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 requ

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 > SCHEMA public TO PU

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: [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] 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 the proposed ones have had enough

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 the upgrade? IIUC, the buildfarm sc

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: > > select * from abc where a >= 1 and a

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 factor in > compare_pa

  1   2   >