Re: "WIP: Data at rest encryption" patch and, PostgreSQL 11-beta3

2018-08-12 Thread Antonin Houska
Toshi Harada wrote: > Hi. > > If "data-at-rest-encryption-wip-2018.07.25.patch" is applied to PostgreSQL > 11-beta3 released last week, > patch execution will fail as follows. > > patching file src/backend/replication/logical/reorderbuffer.c > Hunk #9 FAILED at 2464. > > 1 out of 7 hunk

"WIP: Data at rest encryption" patch and, PostgreSQL 11-beta3

2018-08-12 Thread Toshi Harada
Hi. If "data-at-rest-encryption-wip-2018.07.25.patch" is applied to PostgreSQL 11-beta3 released last week, patch execution will fail as follows. patching file src/backend/replication/logical/reorderbuffer.c Hunk #9 FAILED at 2464. 1 out of 7 hunks FAILED -- saving rejects to file src/bi

Re: Allowing printf("%m") only where it actually works

2018-08-12 Thread Fabien COELHO
Indeed, there are hundreds of warnings around "pg_printf_attribute_m" added with gcc 7.3.0 on by ubuntu 18.04 laptop, thanks to 3a60c8ff. Oh? What warnings exactly? I would not expect any new warnings except on platforms where gcc believes the local printf is non POSIX compliant, which cert

Re: Explain buffers wrong counter with parallel plans

2018-08-12 Thread Amit Kapila
On Fri, Aug 3, 2018 at 6:56 PM, Robert Haas wrote: > On Fri, Aug 3, 2018 at 4:39 AM, Amit Kapila wrote: >> I have noticed that part of the comment atop ExecShutdownNode is now >> redundant. See attached edit_comments_shutdown_node_v1, let me know >> if you think otherwise. > > Oh, yes, that shou

Re: Explain buffers wrong counter with parallel plans

2018-08-12 Thread Amit Kapila
On Sun, Aug 5, 2018 at 5:34 PM, Amit Kapila wrote: > On Fri, Aug 3, 2018 at 2:09 PM, Amit Kapila wrote: >> On Thu, Aug 2, 2018 at 11:14 PM, Robert Haas wrote: >>> In the third one, I don't think >>> "See ExecLimit" is a good thing to put a comment like this, because >>> it's too hard to find th

Fix quadratic performance of regexp match/split functions

2018-08-12 Thread Andrew Gierth
While poking at that xml issue I tried to compare the memory usage of the xml queries with vaguely comparable regexp_split_to_table queries, and found that I could not do so; the regexp queries simply did not complete in any sensible timeframe. Investigation showed that in UTF8 (or other multibyte

Re: Allowing printf("%m") only where it actually works

2018-08-12 Thread Robert Haas
On Sun, Aug 12, 2018 at 3:08 PM, Tom Lane wrote: > Moreover, > at least for the elog/ereport use-case, we'd be buying back some > nontrivial part of that hit by getting rid of expand_fmt_string(). Yeah. I think expand_fmt_string() is pretty costly if you are doing a lot of errors (e.g. write a f

Re: Expression errors with "FOR UPDATE" and postgres_fdw with partition wise join enabled.

2018-08-12 Thread Robert Haas
On Mon, Aug 6, 2018 at 8:30 AM, Etsuro Fujita wrote: > In the above I used the test whether the relation's reloptkind is > RELOPT_BASEREL or not, but I noticed that I had overlooked the case of a > multi-level partitioned table. So I fixed that and added regression test > cases for that. I also

Re: Scariest patch tournament, PostgreSQL 11 edition

2018-08-12 Thread Robert Haas
On Wed, Aug 8, 2018 at 5:59 PM, Fabien COELHO wrote: > Another way to look at it: > > Alvaro = 6*2 + 4*4 = 28 > Robert = 4*5 + 2 = 22 > Andres = 5 + 3 + 1 = 9 > Peter = 5 > Andrew = 4 > Teodor = 3 > Simon = 3 > > A round of applause for our winner! Wow, apparently Alvaro and I are terrif

Re: POC for a function trust mechanism

2018-08-12 Thread Robert Haas
On Wed, Aug 8, 2018 at 1:15 PM, Tom Lane wrote: > that they had to worry about this themselves. Of the various ideas that > we'd kicked around and not been able to finish, the one that seemed most > promising to me was to invent a "function trust" mechanism. In the interest of giving credit wher

Re: Doc patch for index access method function

2018-08-12 Thread Tatsuro Yamada
Hi Alexander, On 2018/08/10 20:27, Alexander Korotkov wrote: On Fri, Aug 10, 2018 at 1:37 PM Alexander Korotkov wrote: On Fri, Aug 10, 2018 at 6:24 AM Tatsuro Yamada wrote: Attached patch for fixing documents of "61.2. Index Access Method Functions" and "61.6. Index Cost Estimation Function

Re: Postgres 11 release notes

2018-08-12 Thread Masahiko Sawada
On Fri, Aug 10, 2018 at 7:10 PM, Alexander Korotkov wrote: > On Fri, Aug 10, 2018 at 8:08 AM Masahiko Sawada > wrote: >> >> I found that the release note says "Add pgtrgm function >> strict_word_similarity() to compute the similarity of whole words" but >> I think "pgtrgm" should be "pg_trgm". At

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

2018-08-12 Thread Daniel Gustafsson
> On 12 Aug 2018, at 11:01, Andres Freund wrote: > > On August 12, 2018 12:17:59 AM GMT+02:00, Daniel Gustafsson > wrote: >>> On 6 Aug 2018, at 09:47, Heikki Linnakangas wrote: >>> >>> Has there been any consideration to encodings? >> >> Thats a good point, no =/ >> >>> What happens if the

Improve behavior of concurrent ANALYZE/VACUUM

2018-08-12 Thread Michael Paquier
Hi all, (In CC are the folks who have reviewed the first patch versions, Nathan and Horiguchi-san.) After TRUNCATE and REINDEX, here is the third and last thread I am spawning for the previous thread "Canceling authentication due to timeout aka Denial of Service Attack": https://www.postgresql.or

Re: lazy detoasting

2018-08-12 Thread Chapman Flack
On 04/11/18 11:27, Chapman Flack wrote: > In most cases I can easily imagine, a function that gets an SQLXML > object is going to read it "pretty soon" ... > However, the spec does explicitly provide that you could, for whatever > reason, sit on the thing for a while, then read it later in the sam

Re: Allowing printf("%m") only where it actually works

2018-08-12 Thread Tom Lane
I wrote: > ... So we would be taking a hit on most platforms, but I've not really > seen sprintf as a major component of very many profiles. Moreover, > at least for the elog/ereport use-case, we'd be buying back some > nontrivial part of that hit by getting rid of expand_fmt_string(). > Also wort

Re: Allowing printf("%m") only where it actually works

2018-08-12 Thread Tom Lane
I wrote: > So this is all pretty much of a mess. If we annotate the elog functions > differently from printf's annotation then we risk getting these complaints > in elog.c, but if we don't do that then we can't really describe their > semantics correctly. We could possibly mark the replacement sn

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

2018-08-12 Thread Arseny Sher
Nikhil Sontakke writes: >> - Decoding transactions at PREPARE record changes rules of the "we ship >> all commits after lsn 'x'" game. Namely, it will break initial >> tablesync: what if consistent snapshot was formed *after* PREPARE, but >> before COMMIT PREPARED, and the plugin decides

Re: Allowing printf("%m") only where it actually works

2018-08-12 Thread Tom Lane
Fabien COELHO writes: > Indeed, there are hundreds of warnings around "pg_printf_attribute_m" > added with gcc 7.3.0 on by ubuntu 18.04 laptop, thanks to 3a60c8ff. Oh? What warnings exactly? I would not expect any new warnings except on platforms where gcc believes the local printf is non POSI

Re: NetBSD vs libxml2

2018-08-12 Thread Mikael Kjellström
On 2018-08-12 01:32, Andrew Dunstan wrote: OpenBSD-6.3's "xml2-config --libs" doesn't contain any rpath settings, it's pretty much like the one on my (fairly old) FBSD machine, as you describ4ed above. Just FYI! My bf-animal curculio that runs OpenBSD 5.9 shows the following: $ xml2-config

Re: ATTACH/DETACH PARTITION CONCURRENTLY

2018-08-12 Thread David Rowley
On 8 August 2018 at 01:29, Andres Freund wrote: > One approach would be to make sure that everything relying on > rt_partdesc staying the same stores its value in a local variable, and > then *not* free the old version of rt_partdesc (etc) when the refcount > > 0, but delay that to the RelationClo

Re: Postgres 11 release notes

2018-08-12 Thread Adrien Nayrat
Hello, It seems this feature is missing in releases notes ? commit 1f6d515a67ec98194c23a5db25660856c9aab944 Author: Robert Haas Date: Mon Aug 21 14:43:01 2017 -0400 Push limit through subqueries to underlying sort, where possible. Douglas Doole, reviewed by Ashutosh Bapat and by me.

Re: [HACKERS] WIP Patch: Pgbench Serialization and deadlock errors

2018-08-12 Thread Fabien COELHO
About part 3: Patch applies cleanly, I forgot: compiles, global & local "make check" are ok. -- Fabien.

Re: [HACKERS] WIP Patch: Pgbench Serialization and deadlock errors

2018-08-12 Thread Fabien COELHO
HEllo Marina, v10-0003-Pgbench-errors-use-the-Variables-structure-for-c.patch - a patch for the Variables structure (this is used to reset client variables during the repeating of transactions after serialization/deadlock failures). This patch adds an explicit structure to manage Variables,

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

2018-08-12 Thread Andres Freund
On August 12, 2018 12:17:59 AM GMT+02:00, Daniel Gustafsson wrote: >> On 6 Aug 2018, at 09:47, Heikki Linnakangas wrote: >> >> Has there been any consideration to encodings? > >Thats a good point, no =/ > >> What happens if the message contains non-ASCII characters, and the >sending backend

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

2018-08-12 Thread Pavel Stehule
2018-08-12 10:29 GMT+02:00 Daniel Gustafsson : > > On 12 Aug 2018, at 07:42, Pavel Stehule wrote: > > 2018-08-12 0:17 GMT+02:00 Daniel Gustafsson dan...@yesql.se>>: > > > On 6 Aug 2018, at 09:47, Heikki Linnakangas hlinn...@iki.fi>> wrote: > > > > What happens if the message contains non-ASCII

Re: libpq should append auth failures, not overwrite

2018-08-12 Thread Fabien COELHO
Hello Tom, Some points for discussion and review: 1. The bulk of patch 0001 is indeed just s/printfPQExpBuffer/appendPQExpBuffer/g, though I also made an attempt to use appendPQExpBufferStr wherever possible. There are two categories of printfPQExpBuffer calls I didn't change: 1a. Calls

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

2018-08-12 Thread Daniel Gustafsson
> On 12 Aug 2018, at 07:42, Pavel Stehule wrote: > 2018-08-12 0:17 GMT+02:00 Daniel Gustafsson >: > > On 6 Aug 2018, at 09:47, Heikki Linnakangas > > wrote: > > What happens if the message contains non-ASCII characters, and the sending > > backen

Re: Tid scan improvements

2018-08-12 Thread David Rowley
On 12 August 2018 at 14:29, Edmund Horner wrote: > To scratch an itch, I have been working on teaching TidScan how to do > range queries, i.e. those using >=, <, BETWEEN, etc. This means we > can write, for instance, > > SELECT * FROM t WHERE ctid >= '(1000,0)' AND ctid < '(2000,0)'; I think

Re: Stored procedures and out parameters

2018-08-12 Thread Shay Rojansky
Peter, Tom, Would it be possible for you to review the following two questions? Some assertions have been made in this thread about the new stored procedures (support for dynamic and multiple resultsets) whose compatibility with the current PostgreSQL protocol are unclear to me as a client driver

Re: Allowing printf("%m") only where it actually works

2018-08-12 Thread Fabien COELHO
[...] At this point I'm inclined to give up and revert 3a60c8ff8. It's not clear that we can really make the warning situation better, as opposed to just moving the warnings from one platform to another. Indeed, there are hundreds of warnings around "pg_printf_attribute_m" added with gcc 7