RE: speeding up planning with partitions

2018-12-24 Thread Imai, Yoshikazu
Hi, Amit, On Fri, Dec 7, 2018 at 0:57 AM, Imai, Yoshikazu wrote: > OK. I will continue the review of 0001 before/after your supplying of > next patch with keeping those in mind. Here's the continuation of the review. Almost all of below comments are little fixes. --- 0001: line 76-77 In commit m

Re: Tab completion for ALTER INDEX|TABLE ALTER COLUMN SET STATISTICS

2018-12-24 Thread Michael Paquier
On Tue, Dec 25, 2018 at 10:56:04AM +0900, Tatsuro Yamada wrote: > Hmm... Okey, I agree. Why I implemented the exotic part of the > feature is that it is for user-friendly. However, I suppose that > user know the syntax because the syntax is used by an expert user. Thanks, I have committed this

RE: [suggestion]support UNICODE host variables in ECPG

2018-12-24 Thread Matsumura, Ryo
> * What's the benefit of supporting UTF16 in host variables? I think that the first benefit of suggestion is providing a way to treat UTF16 chars for application. Whether or not to support above U+ (e.g. surrogate pair) may be a next discussion. For that purpose, implementation for the sugge

RE: libpq debug log

2018-12-24 Thread Iwata, Aya
Hi, I created v5 patch. Please find attached the patch. This patch updated following items; - Changed "else if" to "if" in traceLog_fprintf(). This means that both PQtrace() and new trace log are set, you can get both log result. - Implemented loglevel with enum. This change makes it easier if

Re: Cache lookup errors with functions manipulation object addresses

2018-12-24 Thread Michael Paquier
Álvaro, all, On Fri, Dec 14, 2018 at 09:04:36AM +0900, Michael Paquier wrote: > Thanks again for looking up at what was proposed. I'll see if I can > finish the refactoring part for the next CF, and be done with this > stuff. Please find attached an updated patch set which reworks the SQL interf

Re: Performance issue in foreign-key-aware join estimation

2018-12-24 Thread David Rowley
On Tue, 25 Dec 2018 at 13:46, Tomas Vondra wrote: > I however observe failures on 4 regression test suites - inherit, > equivclass, partition_join and partition_prune (diff attached). That's a > bit surprising, because AFAICS the patch merely optimizes the execution > and should not change the pla

Re: Feature: triggers on materialized views

2018-12-24 Thread Mitar
Hi! So I think this makes it work great for REFRESH MATERIALIZED VIEW CONCURRENTLY. I think we can leave empty statement triggers as they are. I have not found a nice way to not do them. For adding triggers to REFRESH MATERIALIZED VIEW I would need some help and pointers. I am not sure how to wri

Re: Feature: triggers on materialized views

2018-12-24 Thread Mitar
Hi! I made another version of the patch. This one does UPDATEs for changed row instead of DELETE/INSERT. All existing regression tests are still passing (make check). Mitar On Mon, Dec 24, 2018 at 4:13 PM Mitar wrote: > > Hi! > > Thanks for reply! > > On Mon, Dec 24, 2018 at 2:20 PM David Fet

Re: Tab completion for ALTER INDEX|TABLE ALTER COLUMN SET STATISTICS

2018-12-24 Thread Tatsuro Yamada
On 2018/12/21 16:13, Michael Paquier wrote: On Fri, Dec 21, 2018 at 02:51:51PM +0900, Tatsuro Yamada wrote: Attached file is a WIP patch. Before sorting out the exotic part of the feature, why not first fixing the simple cases where we know that tab completion is broken and can be improved? T

Re: GIN predicate locking slows down valgrind isolationtests tremendously

2018-12-24 Thread Alexander Korotkov
On Tue, Dec 25, 2018 at 12:19 AM Alexander Korotkov wrote: > So, we're checking for conflict on tree root for every entry insert. > That's right for posting tree, but completely unneeded for entry tree. > I'm intended to change that to lock root of only posting tree if > nobody explains me why I'm

Re: GIN predicate locking slows down valgrind isolationtests tremendously

2018-12-24 Thread Alexander Korotkov
On Tue, Dec 25, 2018 at 1:48 AM Andrew Dunstan wrote: > On 12/24/18 5:25 PM, Alexander Korotkov wrote: > > On Fri, Dec 21, 2018 at 1:50 AM Alexander Korotkov > > wrote: > >> чт, 20 дек. 2018 г., 2:22 Andres Freund and...@anarazel.de: > >>> On 2018-12-03 16:07:40 -0800, Andres Freund wrote: >

Re: pg_dumpall --exclude-database option

2018-12-24 Thread Michael Paquier
On Mon, Dec 24, 2018 at 02:46:48PM -0500, Andrew Dunstan wrote: > I think you're mistaken. The following example shows this clearly - > there is nothing corresponding to the 20 excluded databases. What you're > referring to appears to be the statements that preceded the 'CREATE > DATABASE' statemen

Re: Performance issue in foreign-key-aware join estimation

2018-12-24 Thread Tomas Vondra
On 12/24/18 1:07 PM, David Rowley wrote: > On Mon, 24 Dec 2018 at 09:38, David Rowley > wrote: >> Using the above idea, but rather than going to the trouble of storing >> PlannerInfo->eq_classes as an array type list, if we build the array >> on the fly inside match_foreign_keys_to_quals(), then

Re: Feature: triggers on materialized views

2018-12-24 Thread Mitar
Hi! Thanks for reply! On Mon, Dec 24, 2018 at 2:20 PM David Fetter wrote: > You've got the right mailing list, a description of what you want, and > a PoC patch. You also got the patch in during the time between > Commitfests. You're doing great! Great! One thing I am unclear about is how it i

Re: Statement-level Triggers For Uniqueness Checks

2018-12-24 Thread Corey Huinker
So I took a first pass at this, and I got stuck. The basic design is that instead of creating one row-level trigger per deferrable unique constraint, we instead create one insert-statement level trigger and one update-statement level trigger. Both call the function unique_key_recheck(), which now

Re: ATTACH/DETACH PARTITION CONCURRENTLY

2018-12-24 Thread David Rowley
On Tue, 25 Dec 2018 at 08:15, Robert Haas wrote: > > On Fri, Dec 21, 2018 at 6:04 PM David Rowley > wrote: > > I don't think you need to qsort() the Oids before locking. What the > > qsort() does today is ensure we get a consistent locking order. Any > > other order would surely do, providing we

Re: GIN predicate locking slows down valgrind isolationtests tremendously

2018-12-24 Thread Andrew Dunstan
On 12/24/18 5:25 PM, Alexander Korotkov wrote: > On Fri, Dec 21, 2018 at 1:50 AM Alexander Korotkov > wrote: >> чт, 20 дек. 2018 г., 2:22 Andres Freund and...@anarazel.de: >>> On 2018-12-03 16:07:40 -0800, Andres Freund wrote: As far as I can tell that increase comes laregely from the new G

Re: GIN predicate locking slows down valgrind isolationtests tremendously

2018-12-24 Thread Alexander Korotkov
On Fri, Dec 21, 2018 at 1:50 AM Alexander Korotkov wrote: > чт, 20 дек. 2018 г., 2:22 Andres Freund and...@anarazel.de: >> On 2018-12-03 16:07:40 -0800, Andres Freund wrote: >> > As far as I can tell that increase comes laregely from the new GIN >> > tests. Could one of you please look at keeping

Re: Feature: triggers on materialized views

2018-12-24 Thread David Fetter
On Mon, Dec 24, 2018 at 12:59:43PM -0800, Mitar wrote: > Hi! > > Based on discussion about observing changes on an open query in a > reactive manner (to support reactive web applications) [1], I > identified that one critical feature is missing to fully implement > discussed design of having react

Re: Race to build pg_isolation_regress in "make -j check-world"

2018-12-24 Thread Noah Misch
On Mon, Jan 01, 2018 at 05:39:56PM -0800, Noah Misch wrote: > On Sat, Dec 16, 2017 at 08:06:05PM -0800, Noah Misch wrote: > > On Mon, Nov 06, 2017 at 12:07:52AM -0800, Noah Misch wrote: > > > I now see similar trouble from multiple > > "make" processes running "make -C contrib/test_decoding instal

Re: GIN predicate locking slows down valgrind isolationtests tremendously

2018-12-24 Thread Alexander Korotkov
On Fri, Dec 21, 2018 at 1:50 AM Alexander Korotkov wrote: > чт, 20 дек. 2018 г., 2:22 Andres Freund and...@anarazel.de: >> On 2018-12-03 16:07:40 -0800, Andres Freund wrote: >> > As far as I can tell that increase comes laregely from the new GIN >> > tests. Could one of you please look at keeping

Feature: triggers on materialized views

2018-12-24 Thread Mitar
Hi! Based on discussion about observing changes on an open query in a reactive manner (to support reactive web applications) [1], I identified that one critical feature is missing to fully implement discussed design of having reactive queries be represented as materialized views, and changes to th

Re: Move regression.diffs of pg_upgrade test suite

2018-12-24 Thread Andrew Dunstan
On 12/23/18 10:44 PM, Noah Misch wrote: > src/bin/pg_upgrade/test.sh runs installcheck, which writes to files in > src/test/regress. This has at least two disadvantages when check-world runs > both this test suite and the "make check" suite: > > 1. The suite finishing second will overwrite the o

Re: pg_dumpall --exclude-database option

2018-12-24 Thread Andrew Dunstan
On 12/19/18 3:55 PM, Andrew Dunstan wrote: > On 12/18/18 11:53 PM, Michael Paquier wrote: >> On Fri, Nov 30, 2018 at 04:26:41PM -0500, Andrew Dunstan wrote: >>> On 11/18/18 1:41 PM, Andrew Dunstan wrote: On 11/17/18 9:55 AM, Alvaro Herrera wrote: > In the long run, I think we should add

Re: ATTACH/DETACH PARTITION CONCURRENTLY

2018-12-24 Thread Robert Haas
On Fri, Dec 21, 2018 at 6:06 PM David Rowley wrote: > > I didn't handle that. If partition pruning relies on nothing changing > > between planning and execution, isn't that broken regardless of any of > > this? It's true that with the simple query protocol we'll hold locks > > continuously from

Re: ATTACH/DETACH PARTITION CONCURRENTLY

2018-12-24 Thread Robert Haas
On Fri, Dec 21, 2018 at 6:04 PM David Rowley wrote: > I don't think you need to qsort() the Oids before locking. What the > qsort() does today is ensure we get a consistent locking order. Any > other order would surely do, providing we stick to it consistently. I > think PartitionDesc order is fin

Re: [Patch] pg_rewind: options to use restore_command from recovery.conf or command line

2018-12-24 Thread Alexey Kondratov
Hi Dmitry, On 30.11.2018 19:04, Dmitry Dolgov wrote: Just to confirm, patch still can be applied without conflicts, and pass all the tests. Also I like the original motivation for the feature, sounds pretty useful. For now I'm moving it to the next CF. Thanks, although I have slightly updated

Re: Removing unneeded self joins

2018-12-24 Thread Alexander Kuzmenkov
Here is a rebased version with some bugfixes. -- Alexander Kuzmenkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company >From 5ad486a16346a0141146c488dac74331da777af8 Mon Sep 17 00:00:00 2001 From: Alexander Kuzmenkov Date: Mon, 17 Dec 2018 17:47:18 +0300 Subject: [P

Re: Performance issue in foreign-key-aware join estimation

2018-12-24 Thread David Rowley
On Mon, 24 Dec 2018 at 09:38, David Rowley wrote: > Using the above idea, but rather than going to the trouble of storing > PlannerInfo->eq_classes as an array type list, if we build the array > on the fly inside match_foreign_keys_to_quals(), then build a > Bitmapset type index to mark which of t

Re: Change pgarch_readyXlog() to return .history files first

2018-12-24 Thread Michael Paquier
On Sat, Dec 22, 2018 at 08:55:14AM +0900, Michael Paquier wrote: > Thanks for the lookups. I can see that the patch applies without > conflicts down to 9.4, and based on the opinions gathered on this > thread back-patching this stuff is the consensus, based on input from > Kyotaro Horiguchi and Da

Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace on the fly

2018-12-24 Thread Alexey Kondratov
Hi Hackers, I would like to propose a change, which allow CLUSTER, VACUUM FULL and REINDEX to modify relation tablespace on the fly. Actually, all these commands rebuild relation filenodes from the scratch, thus it seems natural to allow specifying them a new location. It may be helpful, when

Re: [WIP] CREATE SUBSCRIPTION with FOR TABLES clause (table filter)

2018-12-24 Thread Andrey Borodin
Hi! Thanks for working on the patch! > 6 дек. 2018 г., в 21:47, Evgeniy Efimkin написал(а): > And i don't know how do export for user created subscriptions, because now > non superuser can't select subconninfo column BTW, docs say >When dumping logical replication subscriptions, pg_dump will

Re: Minor comment fix for pg_config_manual.h

2018-12-24 Thread Michael Paquier
On Mon, Dec 24, 2018 at 01:05:25PM +0900, Ian Barwick wrote: > Attached is mainly to fix a comment in $subject which has a typo in > the referenced initdb option ("--walsegsize", should be > "--wal-segsize"), and while I'm there also adds a couple of "the" > for readability. All that (the error as