Re: Problem while setting the fpw with SIGHUP

2018-03-28 Thread Michael Paquier
On Wed, Mar 28, 2018 at 03:40:59PM +0900, Kyotaro HORIGUCHI wrote: > The attached does that. I don't like that it uses ControlFileLock > to exlucde concurrent UpdateFullPageWrites and StartupXLOG but > WALInsertLock cannot be used since UpdateFullPageWrites may take > the same lock. You visibly fo

Re: ALTER TABLE ADD COLUMN fast default

2018-03-28 Thread Andres Freund
Hi, On 2018-03-26 09:02:10 +1030, Andrew Dunstan wrote: > Thanks for this, all looks good. Here is the consolidate patch > rebased. If there are no further comments I propose to commit this in > a few days time. Here's a bit of post commit review: @@ -1310,13 +1679,11 @@ slot_getsomeattrs(TupleT

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

2018-03-28 Thread Amit Kapila
On Tue, Mar 27, 2018 at 10:59 PM, Robert Haas wrote: > On Tue, Mar 27, 2018 at 7:42 AM, Robert Haas wrote: >> On Tue, Mar 27, 2018 at 1:45 AM, Amit Kapila wrote: >>> If we don't want to go with the upperrel logic, then maybe we should >>> consider just merging some of the other changes from my p

Re: [HACKERS] Surjective functional indexes

2018-03-28 Thread Konstantin Knizhnik
On 27.03.2018 22:08, Simon Riggs wrote: On 23 March 2018 at 15:54, Simon Riggs wrote: So please could you make the change? Committed, but I still think that change would be good. Thank you. But I still not sure whether replacement of bitmap with List or array of Oids is really good idea.

Re: Proposal: http2 wire format

2018-03-28 Thread Andres Freund
On 2018-03-26 22:44:09 +0200, Damir Simunic wrote: > > *NONE* of the interesting problems are solved by HTTP2. You *still* > > need a full blown protocol ontop of it. So no, this doesn't change that. > > If you had to nominate only one of those problems, which one would you > consider the most int

new buildfarm with gcc & clang "trunk" -Werror?

2018-03-28 Thread Fabien COELHO
Dear devs, I've been running buildfarm members moonjelly and seawasp which use gcc & clang weekly recompiled trunk versions to build postgres branch HEAD for about 6 months These helped uncover bugs in both gcc & clang, which were reported and fixed, so there is a benefit on this side. Th

Re: new buildfarm with gcc & clang "trunk" -Werror?

2018-03-28 Thread Andres Freund
Hi, On 2018-03-28 10:06:31 +0200, Fabien COELHO wrote: > Would the project feel appropriate to: > > - fix these warnings (other than putting -Wno-format-truncation or >similar workarounds...). Yes, at least for warnings that aren't entirely bogus (see clang's -Weverything for an extreme exa

Re: Proposal: http2 wire format

2018-03-28 Thread Craig Ringer
On 28 March 2018 at 00:42, Damir Simunic wrote: > > > I'm rapidly losing interest. Unless this goes back toward the concrete and > practical I think it's going nowhere. > > > > Your message is exactly what I was hoping for. Thanks for your guidance > and support, really appreciate you. > > Let me

Re: Re: csv format for psql

2018-03-28 Thread Fabien COELHO
Hello Pavel, I'd like to convince you to compromise, because otherwise I'm afraid we will not get this feature. [...] The only no-surprise, no-behavioral-change, alternative I see is to have a csv-specific fieldsep. I'm not keen on that one because it is yet another variable, one has to rem

Re: Proposal: http2 wire format

2018-03-28 Thread Craig Ringer
On 28 March 2018 at 16:02, Andres Freund wrote: > On 2018-03-26 22:44:09 +0200, Damir Simunic wrote: > > > *NONE* of the interesting problems are solved by HTTP2. You *still* > > > need a full blown protocol ontop of it. So no, this doesn't change > that. > > > > If you had to nominate only one o

Re: Cast jsonb to numeric, int, float, bool

2018-03-28 Thread Teodor Sigaev
I think, it should support from/to numeric/bool/text only. If we want to have casts to from numeric to other numeric types then it should be full set (int2, int4, int8, float4, float8). I was too optimistic about casting to/from text. It already exists and it works by differ way from suggested

Re: Proposal: http2 wire format

2018-03-28 Thread Tatsuo Ishii
> A few random, very tired, points: > > - consolidated message for common tasks: > - (bind, [describe?,] execute) to reduce overhead of prepared > statement execution (both in messages, as well as branches) > - (anonymous parse, bind, describe, execute) to make it cheaper to > send sta

Re: new function for tsquery creartion

2018-03-28 Thread Aleksander Alekseev
Hello Dmitry, > A few gotchas: > > I haven't touched gettoken_tsvector() yet. As a result, the following > queries produce errors: > > select websearch_to_tsquery('simple', ); > ERROR: syntax error in tsquery: "'" > > select websearch_to_tsquery('simple', '\'); > ERROR: there is no escape

Re: Oddity in COPY FROM handling of check constraints on partition tables

2018-03-28 Thread Ashutosh Bapat
On Wed, Mar 28, 2018 at 6:58 AM, Amit Langote wrote: >> which violates the constraint on the column b (ie, b > 0), so this >> should abort. The reason for that is because CopyFrom looks at the >> parent relation's constraints, not the partition's constraints, when >> checking the constraint again

Re: [HACKERS] path toward faster partition pruning

2018-03-28 Thread David Rowley
On 28 March 2018 at 22:29, Amit Langote wrote: > Also, I have redesigned how we derive partition indexes after running > pruning steps. Previously, for each step we'd determine the indexes of > "partitions" that are not pruned leading to a list partition not being > pruned sometimes, as shown in

Re: [HACKERS] [PATCH] Lockable views

2018-03-28 Thread Yugo Nagata
On Wed, 28 Mar 2018 15:45:09 +0900 (JST) Tatsuo Ishii wrote: > >> I found the previous patch was broken and this can't handle > >> views that has subqueries as bellow; > >> > >>  CREATE VIEW lock_view6 AS SELECT * from (select * from lock_tbl1) sub; > >> > >> I fixed this and attached the updat

Re: [HACKERS] A design for amcheck heapam verification

2018-03-28 Thread Pavan Deolasee
On Wed, Mar 28, 2018 at 2:48 AM, Peter Geoghegan wrote: > On Tue, Mar 27, 2018 at 6:48 AM, Pavan Deolasee > wrote: > > + * When index-to-heap verification is requested, a Bloom filter is used > to > > + * fingerprint all tuples in the target index, as the index is > traversed to > > + * verify i

Re: Oddity in COPY FROM handling of check constraints on partition tables

2018-03-28 Thread Etsuro Fujita
(2018/03/28 10:28), Amit Langote wrote: >> Attached is a patch for fixing this issue. > > That looks good to me. This one would need to be back-patched to v10. Thanks for the review! Best regards, Etsuro Fujita

Re: Oddity in COPY FROM handling of check constraints on partition tables

2018-03-28 Thread Etsuro Fujita
(2018/03/28 18:51), Ashutosh Bapat wrote: On Wed, Mar 28, 2018 at 6:58 AM, Amit Langote wrote: Attached is a patch for fixing this issue. That looks good to me. This one would need to be back-patched to v10. Thanks. Please add to the next commitfest so that it doesn't get lost. We can no

Re: Parallel Aggregates for string_agg and array_agg

2018-03-28 Thread Tomas Vondra
On 03/28/2018 05:28 AM, Tom Lane wrote: > Tomas Vondra writes: >> On 03/27/2018 04:51 AM, David Rowley wrote: >>> Seems I didn't mean "trans types". I should have said aggregate >>> function argument types. > >> I'm not sure that's better than the check proposed by Tom. An argument >> type with

Re: Jsonb transform for pl/python

2018-03-28 Thread Peter Eisentraut
On 3/21/18 18:50, Peter Eisentraut wrote: > On 3/12/18 11:26, Nikita Glukhov wrote: >> I have reviewed this patch. Attached new 6th version of the patch with >> v5-v6 delta-patch. > > Thanks for the update. I'm working on committing this. Committed. Everything seemed to work well. I just did

Re: [HACKERS] A design for amcheck heapam verification

2018-03-28 Thread Pavan Deolasee
On Wed, Mar 28, 2018 at 2:48 AM, Peter Geoghegan wrote: > > I don't think so. The transaction involved is still an ordinary user > transaction. > > Mostly a nitpick, but I guess we should leave a comment after IndexBuildHeapScan() saying heap_endscan() is not necessary since IndexBuildHeapScan()

Re: PL/pgSQL nested CALL with transactions

2018-03-28 Thread Peter Eisentraut
On 3/27/18 20:43, Tomas Vondra wrote: >>> 3) utility.c >>> >>> I find this condition rather confusing: >>> >>> (!(context == PROCESS_UTILITY_TOPLEVEL || >>>context == PROCESS_UTILITY_QUERY_NONATOMIC) || >>>IsTransactionBlock()) >>> >>> I mean, negated || with another || - it too

Re: PL/pgSQL nested CALL with transactions

2018-03-28 Thread Tomas Vondra
On 03/28/2018 02:54 PM, Peter Eisentraut wrote: > On 3/27/18 20:43, Tomas Vondra wrote: 3) utility.c I find this condition rather confusing: (!(context == PROCESS_UTILITY_TOPLEVEL || context == PROCESS_UTILITY_QUERY_NONATOMIC) || IsTransactionB

Re: [HACKERS] [PATCH] Lockable views

2018-03-28 Thread Tatsuo Ishii
> On Wed, 28 Mar 2018 15:45:09 +0900 (JST) > Tatsuo Ishii wrote: > >> >> I found the previous patch was broken and this can't handle >> >> views that has subqueries as bellow; >> >> >> >>  CREATE VIEW lock_view6 AS SELECT * from (select * from lock_tbl1) sub; >> >> >> >> I fixed this and attach

Re: [HACKERS] [PATCH] Incremental sort

2018-03-28 Thread Teodor Sigaev
BTW, patch had conflicts with master.  Please, find rebased version attached. Sorry, but patch conflicts with master again. -- Teodor Sigaev E-mail: teo...@sigaev.ru WWW: http://www.sigaev.ru/

Re: WIP: Covering + unique indexes.

2018-03-28 Thread Andrey Borodin
Hi! > 21 марта 2018 г., в 21:51, Alexander Korotkov > написал(а): > > > I took a look at this patchset. I have some notes about it. > > * I see patch changes dblink, amcheck and tcl contribs. It would be nice to > add corresponding > check to dblink and amcheck regression tests. It would

Re: [HACKERS] [PATCH] Incremental sort

2018-03-28 Thread Teodor Sigaev
BTW, patch had conflicts with master.  Please, find rebased version attached. Despite by patch conflist patch looks commitable, has anybody objections to commit it? Patch recieved several rounds of review during 2 years, and seems to me, keeping it out from sources may cause a lost it. Altho

Re: [HACKERS] [PATCH] Incremental sort

2018-03-28 Thread Tomas Vondra
On 03/28/2018 03:28 PM, Teodor Sigaev wrote: >> BTW, patch had conflicts with master.  Please, find rebased version >> attached. > > Despite by patch conflist patch looks commitable, has anybody objections > to commit it? > > Patch recieved several rounds of review during 2 years, and seems to me

Re: [HACKERS] Partition-wise aggregation/grouping

2018-03-28 Thread Ashutosh Bapat
On Tue, Mar 27, 2018 at 2:43 PM, Jeevan Chalke wrote: >> else if (IS_UPPER_REL(foreignrel)) >> { >> PgFdwRelationInfo *ofpinfo; >> -PathTarget *ptarget = >> root->upper_targets[UPPERREL_GROUP_AGG]; >> +PathTarget *ptarget = fpinfo->grouped_ta

Re: [PROPOSAL] Shared Ispell dictionaries

2018-03-28 Thread Arthur Zakirov
Please find the attached new version of the patch. I got rid of 0005 and 0006 parts. There are no max_shared_dictionaries_size variable, Shareable option, pg_ts_shared_dictionaries view anymore. On Sat, Mar 24, 2018 at 04:56:36PM -0400, Tom Lane wrote: > I do think it's required that changing the

segfault due to invalid cached plan

2018-03-28 Thread Nicolas Thauvin
Hello, A customer sent us a core dump of the crash of the background worker of the powa extension, running on 9.6.8 along side with cstore_fdw. The background worker loops on a plpgsql function, which then execute another plpgsql function that issues the query "TRUNCATE powa_statements_history_cu

Re: Parallel Aggregates for string_agg and array_agg

2018-03-28 Thread Tom Lane
Tomas Vondra writes: > On 03/28/2018 05:28 AM, Tom Lane wrote: >> Getting a solution that would work for other polymorphic serialization >> functions seems like a bit of a research project to me. In the meantime, >> I think David's right that what we need to look at is the actual input >> type of

Re: Parallel Aggregates for string_agg and array_agg

2018-03-28 Thread David Rowley
On 28 March 2018 at 03:58, Tom Lane wrote: > David Rowley writes: >> On 27 March 2018 at 13:26, Alvaro Herrera wrote: >>> synchronized_seqscans is another piece of precedent in the area, FWIW. > >> This is true. I guess the order of aggregation could be made more >> certain if we remove the cost

Re: Proposal: http2 wire format

2018-03-28 Thread Tom Lane
Andres Freund writes: > A few random, very tired, points: > - consolidated message for common tasks: > - (bind, [describe?,] execute) to reduce overhead of prepared > statement execution (both in messages, as well as branches) > - (anonymous parse, bind, describe, execute) to make it chea

Re: Parallel Aggregates for string_agg and array_agg

2018-03-28 Thread Tomas Vondra
On 03/28/2018 03:54 PM, Tom Lane wrote: > Tomas Vondra writes: >> On 03/28/2018 05:28 AM, Tom Lane wrote: >>> Getting a solution that would work for other polymorphic serialization >>> functions seems like a bit of a research project to me. In the meantime, >>> I think David's right that what w

Re: [HACKERS] PATCH: multivariate histograms and MCV lists

2018-03-28 Thread Dean Rasheed
On 28 March 2018 at 01:34, Tomas Vondra wrote: > Attached is a patch fixing this. In the end I've decided to keep both > branches - one handling boolean Vars and one for NOT clauses. I think > you're right we can only see (NOT var) cases, but I'm not sure about that. > > For example, what if an op

Re: segfault due to invalid cached plan

2018-03-28 Thread Tomas Vondra
On 03/28/2018 03:54 PM, Nicolas Thauvin wrote: > Hello, > > A customer sent us a core dump of the crash of the background worker of > the powa extension, running on 9.6.8 along side with cstore_fdw. > > The background worker loops on a plpgsql function, which then execute > another plpgsql functi

Re: [HACKERS] GSoC 2017: weekly progress reports (week 6)

2018-03-28 Thread Dmitry Ivanov
I'd like to see fastupdate=on in test too, now tests cover only case without fastupdate. Please, add them. Here's a couple of tests for pending list (fastupdate = on). -- Dmitry Ivanov Postgres Professional: http://www.postgrespro.com The Russian Postgres Companydiff --git a/src/backend/access/

Re: segfault due to invalid cached plan

2018-03-28 Thread Tom Lane
Nicolas Thauvin writes: > A customer sent us a core dump of the crash of the background worker of > the powa extension, running on 9.6.8 along side with cstore_fdw. > The background worker loops on a plpgsql function, which then execute > another plpgsql function that issues the query "TRUNCATE >

Re: [HACKERS] PATCH: multivariate histograms and MCV lists

2018-03-28 Thread Tomas Vondra
On 03/28/2018 04:12 PM, Dean Rasheed wrote: > On 28 March 2018 at 01:34, Tomas Vondra wrote: >> Attached is a patch fixing this. In the end I've decided to keep both >> branches - one handling boolean Vars and one for NOT clauses. I think >> you're right we can only see (NOT var) cases, but I'm no

Re: segfault due to invalid cached plan

2018-03-28 Thread Nicolas Thauvin
On Wed, 28 Mar 2018 16:14:04 +0200 Tomas Vondra wrote: > On 03/28/2018 03:54 PM, Nicolas Thauvin wrote: > > Hello, > > > > A customer sent us a core dump of the crash of the background > > worker of the powa extension, running on 9.6.8 along side with > > cstore_fdw. > > > > The background work

Re: [HACKERS] GSoC 2017: weekly progress reports (week 6)

2018-03-28 Thread Dmitry Ivanov
I'd like to see fastupdate=on in test too, now tests cover only case without fastupdate. Please, add them. Here's a couple of tests for pending list (fastupdate = on). By the way, isn't it strange that permutation "fu1" "rxy3" "wx3" "rxy4" "c1" "wy4" "c2" doesn't produce an ERROR? -- Dmitry

Re: Implementing SQL ASSERTION

2018-03-28 Thread David Fetter
On Sun, Mar 18, 2018 at 12:29:50PM +, Joe Wildish wrote: > > > >> > >> This patch no longer applies. Any chance of a rebase? > > Attached is a rebased version of this patch. It takes into account > the ACL checking changes and a few other minor amendments. Sorry to bother you again, but th

Re: [HACKERS] [PATCH] Incremental sort

2018-03-28 Thread Tomas Vondra
On 03/28/2018 05:12 PM, Alexander Korotkov wrote: > On Wed, Mar 28, 2018 at 4:44 PM, Tomas Vondra > mailto:tomas.von...@2ndquadrant.com>> wrote: > > On 03/28/2018 03:28 PM, Teodor Sigaev wrote: > >> BTW, patch had conflicts with master.  Please, find rebased version > >> attached. >

Re: WIP: Covering + unique indexes.

2018-03-28 Thread Erik Rijkers
On 2018-03-28 16:59, Anastasia Lubennikova wrote: Here is the new version of the patch set. I can't get these to apply: patch -b -l -F 25 -p 1 < /home/aardvark/download/pgpatches/0110/covering_indexes/20180328/0001-Covering-core-v8.patch 1 out of 19 hunks FAILED -- saving rejects

Re: committing inside cursor loop

2018-03-28 Thread Ildus Kurbangaliev
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 I have checked new version. Although I can miss something, t

Re: Parallel Aggregates for string_agg and array_agg

2018-03-28 Thread David Rowley
On 27 March 2018 at 09:27, Tom Lane wrote: > The main thing that remains undone is to get some test coverage --- > AFAICS, none of these new functions get exercised in the standard > regression tests. I've attached a patch which implements some tests for the new functions. -- David Rowley

Re: [HACKERS] [PATCH] Incremental sort

2018-03-28 Thread Alvaro Herrera
Teodor Sigaev wrote: > > BTW, patch had conflicts with master.  Please, find rebased version > > attached. > > Despite by patch conflist patch looks commitable, has anybody objections to > commit it? > > Patch recieved several rounds of review during 2 years, and seems to me, > keeping it out fr

Re: Proposal: http2 wire format

2018-03-28 Thread Andres Freund
Hi, On 2018-03-28 16:29:37 +0800, Craig Ringer wrote: > > - allow *streaming* of large datums > > Yes, very much +1 there. That's already on the wiki. Yeah: > > * Permit lazy fetches of large values, at least out-of-line TOASTED values > http://www.postgresql.org/message-id/53ff0ef8@2ndquadr

Re: Proposal: http2 wire format

2018-03-28 Thread Andres Freund
Hi, On 2018-03-28 09:59:34 -0400, Tom Lane wrote: > Andres Freund writes: > > A few random, very tired, points: > > > - consolidated message for common tasks: > > - (bind, [describe?,] execute) to reduce overhead of prepared > > statement execution (both in messages, as well as branches) >

Re: [HACKERS] [PATCH] Incremental sort

2018-03-28 Thread Andres Freund
Hi, On 2018-03-28 16:28:01 +0300, Teodor Sigaev wrote: > > BTW, patch had conflicts with master.  Please, find rebased version > > attached. > > Despite by patch conflist patch looks commitable, has anybody objections to > commit it? > Patch recieved several rounds of review during 2 years, and

Re: [HACKERS] Pluggable storage

2018-03-28 Thread David Steele
On 2/26/18 3:19 AM, Alexander Korotkov wrote: > On Fri, Feb 23, 2018 at 2:20 AM, Robert Haas > wrote: > > On Fri, Feb 16, 2018 at 5:56 AM, Alexander Korotkov > mailto:a.korot...@postgrespro.ru>> wrote: > > BTW, EnterpriseDB announces zheap table access me

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

2018-03-28 Thread Andres Freund
Hi, On 2018-03-08 13:46:53 -0500, Tom Lane wrote: > Robert Haas writes: > > On Thu, Mar 8, 2018 at 12:03 PM, Tom Lane wrote: > >> FWIW, I would also vote for (1), especially if the only way to do (2) > >> is stuff as outright scary as this. I would far rather have (3) than > >> this, because IM

Re: [HACKERS] path toward faster partition pruning

2018-03-28 Thread Jesper Pedersen
Hi, On 03/28/2018 06:30 AM, Amit Langote wrote: On 2018/03/28 18:29, Amit Langote wrote: Attached is the updated set of patches, which contains other miscellaneous changes such as updated comments, beside the main changes described above. Sorry, one of those miscellaneous changes was a typo t

Re: Re: csv format for psql

2018-03-28 Thread Pavel Stehule
2018-03-28 10:24 GMT+02:00 Fabien COELHO : > > Hello Pavel, > > I'd like to convince you to compromise, because otherwise I'm afraid we >>> will not get this feature. >>> >> >> [...] >> >>> >>> The only no-surprise, no-behavioral-change, alternative I see is to have >>> a >>> csv-specific fieldsep

Re: [HACKERS] GSoC 2017: weekly progress reports (week 6)

2018-03-28 Thread Teodor Sigaev
Hi! I slightly modified test for clean demonstration of difference between fastupdate on and off. Also I added CheckForSerializableConflictIn() to fastupdate off codepath, but only in case of non-empty pending list. The next question what I see: why do not we lock entry leaf pages in some cas

Re: [HACKERS] logical decoding of two-phase transactions

2018-03-28 Thread Simon Riggs
On 28 March 2018 at 16:28, Nikhil Sontakke wrote: > Simon, 0003-Add-GID-and-replica-origin-to-two-phase-commit-abort.patch > is the exact patch that you had posted for an earlier commit. 0003 Pushed -- Simon Riggshttp://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support,

Re: disable SSL compression?

2018-03-28 Thread Konstantin Knizhnik
On 17.03.2018 17:18, Peter Eisentraut wrote: On 3/11/18 13:28, Tom Lane wrote: My proposal is the attached patch that sets the default in libpq to off and adjusts the documentation a bit so it doesn't sound like we have missed the news altogether. Seems reasonable as far as it goes, but do we

Re: [HACKERS] Transactions involving multiple postgres foreign servers

2018-03-28 Thread David Steele
On 2/27/18 2:21 AM, Masahiko Sawada wrote: > > Hmm, although I've thought concern in case where we don't consider > local xids of un-resolved fdwxact in GetOldestXmin, I could not find > problem. Could you share your concern if you have? I'll try to find a > possibility based on it. It appears th

Re: PostgreSQL crashes with SIGSEGV

2018-03-28 Thread Tom Lane
Peter Geoghegan writes: > On Mon, Mar 26, 2018 at 5:14 AM, Kyotaro HORIGUCHI > wrote: >> If no one objects, I'll mark this as Ready for Commit in a couple >> of days. > Thank you for the review, Horiguchi-san. It's hard to decide how > important each goal is when coming up with a back-patchable

Re: PostgreSQL crashes with SIGSEGV

2018-03-28 Thread Peter Geoghegan
On Wed, Mar 28, 2018 at 10:30 AM, Tom Lane wrote: > It looks good to me. The only real objection would be if someone came > up with a test case proving that there's a significant performance > degradation from the extra copies. But given that these are back > branches, it would take a pretty ste

Re: disable SSL compression?

2018-03-28 Thread Konstantin Knizhnik
On 28.03.2018 20:26, Konstantin Knizhnik wrote: On 17.03.2018 17:18, Peter Eisentraut wrote: On 3/11/18 13:28, Tom Lane wrote: My proposal is the attached patch that sets the default in libpq to off and adjusts the documentation a bit so it doesn't sound like we have missed the news altoget

Re: Reopen logfile on SIGHUP

2018-03-28 Thread David Steele
On 2/27/18 8:54 PM, Michael Paquier wrote: > On Tue, Feb 27, 2018 at 05:52:20PM -0500, Tom Lane wrote: >> It already does treat SIGUSR1 as a log rotation request. Apparently >> the point of this patch is that some people don't find that easy enough >> to use, which is fair, because finding out the

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

2018-03-28 Thread Tom Lane
Andres Freund writes: > On 2018-03-08 13:46:53 -0500, Tom Lane wrote: >> ... Breaking fundamental invariants like >> "ctid points to this tuple or its update successor" is going to cause >> trouble. There's a lot of code that knows that; more than knows the >> details of what's in xmax, I believe

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

2018-03-28 Thread Andres Freund
Hi, On 2018-03-28 13:52:24 -0400, Tom Lane wrote: > Andres Freund writes: > > Given, as explained nearby, we already do store transient data in the > > ctid for speculative insertions (i.e. ON CONFLICT), and it hasn't caused > > even a whiff of trouble, I'm currently not inclined to see a huge is

Re: Rangejoin rebased

2018-03-28 Thread David Steele
On 3/2/18 11:44 AM, Robert Haas wrote: > On Fri, Mar 2, 2018 at 11:12 AM, Alexander Kuzmenkov > wrote: >> On 16.01.2018 10:49, Jeff Davis wrote: >>> My proposed fix is to make an internal opfamily identical to the >>> external one, such that it's not recognized as part of the same EC, >>> and the

Re: Rangejoin rebased

2018-03-28 Thread Andres Freund
Hi, On 2018-03-28 14:18:42 -0400, David Steele wrote: > It seems that a new patch is needed here but none has been presented. > I've marked this Waiting on Author for the moment, but I really think it > should be marked Returned with Feedback and submitted to the next CF > when a new patch is read

Re: Rangejoin rebased

2018-03-28 Thread David Steele
On 3/28/18 2:23 PM, Andres Freund wrote: > On 2018-03-28 14:18:42 -0400, David Steele wrote: >> It seems that a new patch is needed here but none has been presented. >> I've marked this Waiting on Author for the moment, but I really think it >> should be marked Returned with Feedback and submitted

Re: PL/pgSQL nested CALL with transactions

2018-03-28 Thread Peter Eisentraut
On 3/28/18 09:00, Tomas Vondra wrote: > I see. I thought "fixed" means you adopted the #define, but that's not > the case. I don't think an extra comment is needed - the variable name > is descriptive enough IMHO. Committed as presented then. Thanks. -- Peter Eisentraut http://www.

Re: Function to track shmem reinit time

2018-03-28 Thread David Steele
On 3/4/18 11:17 AM, Tomas Vondra wrote: > > Furthermore, the patch is yet another victim of fd1a421fe - fixing the > pg_proc entries is trivial, but a new version is needed. > > I'd also like to see an example/explanation how this improves this > situation compared to only having pg_postmaster_st

Re: [bug fix] pg_rewind creates corrupt WAL files, and the standby cannot catch up the primary

2018-03-28 Thread Fujii Masao
On Wed, Mar 28, 2018 at 11:24 AM, Michael Paquier wrote: > On Wed, Mar 28, 2018 at 04:45:49AM +0900, Fujii Masao wrote: >> The patch looks good to me! Barring objection, I will commit it >> and back-patch to 9.5 where pg_rewind was added. > > Thanks in advance! I just eyeballed the patch again an

Re: csv format for psql

2018-03-28 Thread David G. Johnston
On Wednesday, March 28, 2018, Pavel Stehule wrote: > > Are there some possible alternatives? >>> >> >> Given the date and the fact that the cf end is 3 days away, the proposed >> short term alternative is Daniel's version, that I feel is reasonable. Ok, >> people have to do two pset to get comma-

Re: Trigger file behavior with the standby

2018-03-28 Thread Keiko Oda
Thanks a lot for the answer, Michael (and sorry for the slow response)! So, if I understand what you're saying correctly, I'm seeing this behavior because wal-e keeps fetching wal files from s3 regardless of this trigger_file, and these fetched wal files are in pg_wal (or pg_xlog), therefore Postg

Re: csv format for psql

2018-03-28 Thread David G. Johnston
On Wednesday, March 28, 2018, David G. Johnston wrote: > On Wednesday, March 28, 2018, Pavel Stehule > wrote: > >> >> Are there some possible alternatives? >>> >>> Given the date and the fact that the cf end is 3 days away, the proposed >>> short term alternative is Daniel's version, that I

Re: csv format for psql

2018-03-28 Thread David G. Johnston
On Monday, March 26, 2018, Daniel Verite wrote: > > We could even support only the comma and make it non-configurable > based on the fact it's Comma-Separated-Values, not > Whatever-Separated-Values, except that won't do much > to serve the users interests, as the reality is that > people use var

Re: Sample values for pg_stat_statements

2018-03-28 Thread David Steele
On 3/21/18 1:31 PM, David Steele wrote: > > On 3/10/18 9:02 AM, Tomas Vondra wrote: >> >> I've looked at this patch today. I like the idea / intent in general, as >> it helps with some investigation tasks. That being said, I have a couple >> of questions/comments based on read through the patch: >

Re: csv format for psql

2018-03-28 Thread Joshua D. Drake
On 03/28/2018 12:35 PM, David G. Johnston wrote: On Monday, March 26, 2018, Daniel Verite > wrote: We could even support only the comma and make it non-configurable based on the fact it's Comma-Separated-Values, not Whatever-Separated-Values, except t

Re: Using base backup exclusion filters to reduce data transferred with pg_rewind

2018-03-28 Thread Fujii Masao
On Wed, Mar 28, 2018 at 7:54 AM, Michael Paquier wrote: > On Wed, Mar 28, 2018 at 04:13:25AM +0900, Fujii Masao wrote: >> This code is almost ok in practice, but using the check of >> "strstr(path, localpath) == path" is more robust here? > > No problems with that either. > >> Using the following

Re: csv format for psql

2018-03-28 Thread David G. Johnston
On Wednesday, March 28, 2018, Fabien COELHO wrote: > > > And if we introduce csv-specific fieldsep, then we multiply this wrong >> design. The fix in this direction is renaming fieldsep to fieldsep-unaliagn >> - but it is probably too big change too. So this design is nothing what I >> can mark a

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

2018-03-28 Thread Robert Haas
On Wed, Mar 28, 2018 at 3:06 AM, Amit Kapila wrote: > Good idea, such an optimization will ensure that the cases reported > above will not have regression. However isn't it somewhat beating the > idea you are using in the patch which is to avoid modifying the path > in-place? Sure, but you can't

Re: reorganizing partitioning code

2018-03-28 Thread Robert Haas
On Wed, Mar 28, 2018 at 12:07 AM, Amit Langote wrote: > On 2018/03/22 11:45, Amit Langote wrote: >> FWIW, I did manage to rebase it this morning and posting it here. > > Rebased again. > > I started wondering if we should separate out stuff related to partition > bounds. That is create a utils/pa

Re: [HACKERS] advanced partition matching algorithm for partition-wise join

2018-03-28 Thread Dmitry Dolgov
> On 22 March 2018 at 14:18, Ashutosh Bapat > wrote: > On Thu, Mar 22, 2018 at 4:32 AM, Dmitry Dolgov <9erthali...@gmail.com> wrote: >>> On 12 March 2018 at 06:00, Ashutosh Bapat >>> wrote: >>> Thanks for the note. Here are rebased patches. >> >> Since I started to look at this patch, I can sha

Re: JIT compiling with LLVM v12

2018-03-28 Thread Andres Freund
On 2018-03-27 10:34:26 -0700, Andres Freund wrote: > On 2018-03-27 10:05:47 -0400, Peter Eisentraut wrote: > > On 3/13/18 19:40, Andres Freund wrote: > > > I've pushed a revised and rebased version of my JIT patchset. > > > > What is the status of this item as far as the commitfest is concerned? >

Re: JIT compiling with LLVM v12

2018-03-28 Thread Andres Freund
Hi, On 2018-03-28 14:27:51 -0700, Andres Freund wrote: > > 7/10 committed. Inlining, Explain, Docs remain. > > I've pushed these three. One tiny pending commit I have is to add a few pg_noinline annotations to slow-path functions, to avoid very common spurious inlines. I'll play a littlebit more

Re: new buildfarm with gcc & clang "trunk" -Werror?

2018-03-28 Thread Peter Eisentraut
On 3/28/18 04:06, Fabien COELHO wrote: > Would the project feel appropriate to: > > - fix these warnings (other than putting -Wno-format-truncation or > similar workarounds...). I've been tracking gcc-8, and I have a patch ready, but these things change a bit with every compiler snapshot, s

Re: [HACKERS] [PATCH] Vacuum: Update FSM more frequently

2018-03-28 Thread Tom Lane
Claudio Freire writes: > Attached patches, rebased and modified as discussed: > 1 no longer does tree pruning, it just vacuums a range of the FSM > 2 reintroduces tree pruning for the initial FSM vacuum > 3 and 4 remain as they were, but rebased I reviewed and cleaned up 0001. The API for FreeSp

Re: JIT compiling with LLVM v12

2018-03-28 Thread Peter Eisentraut
On 3/28/18 17:27, Andres Freund wrote: > I've pushed these three. Great, now the only thing remaining is to prepare an unconference session explaining all this to the rest of us. ;-) -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Tr

Re: WIP: Covering + unique indexes.

2018-03-28 Thread Peter Eisentraut
On 1/25/18 23:19, Thomas Munro wrote: > + PRIMARY KEY ( class="parameter">column_name [, ... ] ) class="parameter">index_parameters INCLUDE > (column_name [, > ...]) | > > I hadn't seen that use of "" before. Almost everywhere else > we use explicit [ and ] characters, but I see that there are

Re: JIT compiling with LLVM v12

2018-03-28 Thread Andres Freund
Hi, On 2018-03-28 18:06:24 -0400, Peter Eisentraut wrote: > On 3/28/18 17:27, Andres Freund wrote: > > I've pushed these three. > > Great, now the only thing remaining is to prepare an unconference > session explaining all this to the rest of us. ;-) Hah! Happy to, if there's enough people inter

Re: Fix a typo in walsender.c

2018-03-28 Thread Bruce Momjian
On Tue, Feb 27, 2018 at 07:22:20PM +0900, atorikoshi wrote: > Hi, > > Attached a minor patch for a typo: s/log/lag > > Regards, > > -- > Atsushi Torikoshi > NIPPON TELEGRAPH AND TELEPHONE CORPORATION > NTT Open Source Software Center > diff --git a/src/backend/replication/walsender.c > b/src/

Re: JIT compiling with LLVM v12

2018-03-28 Thread David Steele
On 3/28/18 6:09 PM, Andres Freund wrote: On 2018-03-28 18:06:24 -0400, Peter Eisentraut wrote: On 3/28/18 17:27, Andres Freund wrote: I've pushed these three. Great, now the only thing remaining is to prepare an unconference session explaining all this to the rest of us. ;-) Hah! Happy to,

Re: Fix for pg_stat_activity putting client hostaddr into appname field

2018-03-28 Thread Edmund Horner
I sent the original in haste, and now I need to make some corrections... sigh. > Subject: Fix for pg_stat_activity putting client hostaddr into appname field Actually, it's the hostname appears in the appname field. > I noticed when querying pg_stat_activity (in 10.1): 10.1 was where I first no

Re: Updating parallel.sgml's treatment of parallel joins

2018-03-28 Thread Thomas Munro
On Fri, Mar 23, 2018 at 6:26 AM, Robert Haas wrote: > On Fri, Feb 23, 2018 at 10:30 PM, Thomas Munro > wrote: >> Here is an attempt at updating parallel.sgml to cover Parallel Hash. >> I will be neither surprised nor offended if Robert would like to put >> it differently! > > Looks nice. Committ

Re: [HACKERS] [PATCH] Vacuum: Update FSM more frequently

2018-03-28 Thread Claudio Freire
On Wed, Mar 28, 2018 at 6:54 PM, Tom Lane wrote: > Claudio Freire writes: >> Attached patches, rebased and modified as discussed: >> 1 no longer does tree pruning, it just vacuums a range of the FSM >> 2 reintroduces tree pruning for the initial FSM vacuum >> 3 and 4 remain as they were, but reba

Re: [PROPOSAL] Shared Ispell dictionaries

2018-03-28 Thread Arthur Zakirov
Here is the new version of the patch. Now RemoveTSDictionaryById() and AlterTSDictionary() unpin the dictionary DSM segment. So if all attached backends disconnect allocated DSM segments will be released. lookup_ts_dictionary_cache() may unping DSM mapping for all invalid dictionary cache entries

Re: disable SSL compression?

2018-03-28 Thread Peter Eisentraut
On 3/28/18 13:26, Konstantin Knizhnik wrote: > If SSL compression is deprecated, should we provide own compression? > I have implemented some prototype implementation of it (patch is attached). > I have added compression=on/off parameter to connection string and -Z > option to psql and pgbench util

Re: committing inside cursor loop

2018-03-28 Thread Peter Eisentraut
On 3/28/18 11:34, Ildus Kurbangaliev wrote: > 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 > > I h

Re: disable SSL compression?

2018-03-28 Thread Andres Freund
On March 28, 2018 4:15:02 PM PDT, Peter Eisentraut wrote: >On 3/28/18 13:26, Konstantin Knizhnik wrote: >> If SSL compression is deprecated, should we provide own compression? >> I have implemented some prototype implementation of it (patch is >attached). >> I have added compression=on/off para

Re: csv format for psql

2018-03-28 Thread Isaac Morland
On 28 March 2018 at 15:43, Joshua D. Drake wrote: > On 03/28/2018 12:35 PM, David G. Johnston wrote: > > I like to call it "Character Separated Values" now for just that reason. > > > Isn't the actual wording Character Delimited Values? I may be picking at > hairs here but every single time I use

  1   2   >