Re: [GSoC]The project summary

2018-08-06 Thread Charles Cui
clang static analysis looks good ~/Desktop/checker-279/bin/scan-build make && make install && make installcheck scan-build: Using '/Users/wyx/Desktop/checker-279/bin/clang' for static analysis /Users/wyx/Desktop/checker-279/bin/../libexec/ccc-analyzer -Wall -Wmissing-prototypes -Wpointer-arith

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

2018-08-06 Thread Andres Freund
On 2018-08-06 21:06:13 +0300, Arseny Sher wrote: > Hello, > > I have looked through the patches. I will first describe relativaly > serious issues I see and then proceed with small nitpicking. > > - On decoding of aborted xacts. The idea to throw an error once we > detect the abort is

Re: [GSoC]The project summary

2018-08-06 Thread Charles Cui
commit to change sprintf to snprintf https://github.com/charles-cui/pg_thrift/commit/1de265a661ab3c61aa593d7e99d3a313024170fc 2018-08-06 8:03 GMT-07:00 Charles Cui : > got it, will do that asap. Thanks for the comments! > > On Mon, Aug 6, 2018, 7:06 AM Aleksander Alekseev > wrote: > >> Hello

Re: [PATCH v18] GSSAPI encryption support

2018-08-06 Thread Robbie Harwood
Stephen Frost writes: > * Heikki Linnakangas (hlinn...@iki.fi) wrote: > >> What is the point of this patch? What's the advantage of GSSAPI >> encryption over SSL? I was hoping to find the answer by reading the >> documentation changes, but all I can see is "how" to set it up, and >> nothing

Re: [report] memory leaks in COPY FROM on partitioned table

2018-08-06 Thread Alvaro Herrera
On 2018-Aug-06, Kohei KaiGai wrote: > 2018-08-06 1:50 GMT+09:00 Alvaro Herrera : > >> Now, it consumed about 60MB rss at the beginning of COPY FROM, and it > >> grows up very slowly during the COPY FROM execution, then grew up to > >> 250MB before completion. > >> We may have another memory

Re: pg_dump: sortDumpableObjectsByTypeName() doesn't always do that

2018-08-06 Thread Jacob Champion
On Mon, Aug 6, 2018 at 12:45 PM Tom Lane wrote: > Ah, gotcha. But whether the behavior is sane or not, it'd be reproducible > for any specific input dataset on any specific platform (unless you've got > a quicksort that actually uses randomized pivots; but ours doesn't, and > I think that

Re: pg_dump: sortDumpableObjectsByTypeName() doesn't always do that

2018-08-06 Thread Tom Lane
Jacob Champion writes: > ... since the > root cause is that we're not defining a valid ordering, quicksort may > or may not behave consistently for test purposes. Ah, gotcha. But whether the behavior is sane or not, it'd be reproducible for any specific input dataset on any specific platform

Re: pg_dump: sortDumpableObjectsByTypeName() doesn't always do that

2018-08-06 Thread Jacob Champion
On Mon, Aug 6, 2018 at 12:23 PM Jacob Champion wrote: > since the > root cause is that we're not defining a valid ordering, quicksort may > or may not behave consistently for test purposes. To expand on this, consider three objects, of the same type, compared with the current comparator

Re: Standby trying "restore_command" before local WAL

2018-08-06 Thread Stephen Frost
Greetings, * Tomas Vondra (tomas.von...@2ndquadrant.com) wrote: > On 08/06/2018 06:11 PM, Stephen Frost wrote: > >* Tomas Vondra (tomas.von...@2ndquadrant.com) wrote: > >>On 08/06/2018 05:19 PM, Stephen Frost wrote: > >>>* David Steele (da...@pgmasters.net) wrote: > I think for the stated

Re: pg_dump: sortDumpableObjectsByTypeName() doesn't always do that

2018-08-06 Thread Jacob Champion
On Mon, Aug 6, 2018 at 12:13 PM Tom Lane wrote: > Do you mean "incorrect results", or just "unstable results"? > If the former, what's incorrect about it? Incorrect, as in "the results are not sorted by type name." Here's an example ordering that we saw -- but note that you won't be able to

Re: pg_dump: sortDumpableObjectsByTypeName() doesn't always do that

2018-08-06 Thread Andrew Dunstan
On 08/06/2018 03:13 PM, Tom Lane wrote: Jacob Champion writes: We recently ran into an issue in pg_dump that caused the initial sort-by-name pass to return incorrect results. It doesn't seem to affect overall correctness, since the later toposort pass takes care of dependencies, but it does

Re: pg_dump: sortDumpableObjectsByTypeName() doesn't always do that

2018-08-06 Thread Tom Lane
Jacob Champion writes: > We recently ran into an issue in pg_dump that caused the initial > sort-by-name pass to return incorrect results. It doesn't seem to > affect overall correctness, since the later toposort pass takes care > of dependencies, but it does occasionally cause a spurious diff in

pg_dump: sortDumpableObjectsByTypeName() doesn't always do that

2018-08-06 Thread Jacob Champion
Hi all, We recently ran into an issue in pg_dump that caused the initial sort-by-name pass to return incorrect results. It doesn't seem to affect overall correctness, since the later toposort pass takes care of dependencies, but it does occasionally cause a spurious diff in dump output before and

Fix hints on CREATE PROCEDURE errors

2018-08-06 Thread Jeremy Evans
When testing out CREATE PROCEDURE with 11 beta 2, I noticed, the hints in the errors reference DROP FUNCTION, which doesn't work for procedures. DROP ROUTINE works for both functions and procedures, so this patch should work for both. Please CC me when responding as I don't currently subscribe

Re: Standby trying "restore_command" before local WAL

2018-08-06 Thread Tomas Vondra
On 08/06/2018 06:11 PM, Stephen Frost wrote: Greetings, * Tomas Vondra (tomas.von...@2ndquadrant.com) wrote: On 08/06/2018 05:19 PM, Stephen Frost wrote: * David Steele (da...@pgmasters.net) wrote: I think for the stated scenario (known good standby that has been shutdown gracefully) it

Re: [PATCH v18] GSSAPI encryption support

2018-08-06 Thread Nico Williams
On Mon, Aug 06, 2018 at 10:36:34AM -0400, Stephen Frost wrote: > * Heikki Linnakangas (hlinn...@iki.fi) wrote: > > Sorry if this sounds facetious, but: > > > > What is the point of this patch? What's the advantage of GSSAPI encryption > > over SSL? I was hoping to find the answer by reading the

Re: GiST VACUUM

2018-08-06 Thread Andrey Borodin
Hi! PFA v16. > 5 авг. 2018 г., в 21:45, Andrey Borodin написал(а): >> 5 авг. 2018 г., в 16:18, Heikki Linnakangas написал(а): >> >> Hmm. A ListCell is 16 bytes, plus the AllocChunk header, 16 bytes. 32 >> bytes per internal page in total, while a bitmap consumes one bit per page, >> leaf or

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

2018-08-06 Thread Arseny Sher
Hello, I have looked through the patches. I will first describe relativaly serious issues I see and then proceed with small nitpicking. - On decoding of aborted xacts. The idea to throw an error once we detect the abort is appealing, however I think you will have problems with subxacts in

Re: Standby trying "restore_command" before local WAL

2018-08-06 Thread Jaime Casanova
On Mon, 6 Aug 2018 at 11:01, Stephen Frost wrote: > > > What about the following cases? > > 1. replica host crashed, and in pg_wal we have a few thousands WAL files. > > If this is the case then the replica was very far behind on replay, > presumably, and in some of those cases rebuilding the

Improve behavior of concurrent TRUNCATE

2018-08-06 Thread Michael Paquier
Hi all, This is a second thread I am spawning for the previous thread "Canceling authentication due to timeout aka Denial of Service Attack": https://www.postgresql.org/message-id/152512087100.19803.12733865831237526317%40wrigleys.postgresql.org And this time the discussion is about TRUNCATE, as

Re: Standby trying "restore_command" before local WAL

2018-08-06 Thread Stephen Frost
Greetings, * Tomas Vondra (tomas.von...@2ndquadrant.com) wrote: > On 08/06/2018 05:19 PM, Stephen Frost wrote: > >* David Steele (da...@pgmasters.net) wrote: > >>I think for the stated scenario (known good standby that has been > >>shutdown gracefully) it makes perfect sense to trust the contents

Re: Standby trying "restore_command" before local WAL

2018-08-06 Thread Stephen Frost
Greetings, * Alexander Kukushkin (cyberd...@gmail.com) wrote: > 2018-07-31 20:25 GMT+02:00 Stephen Frost : > > There's still a question here, at least from my perspective, as to which > > is actually going to be faster to perform recovery based off of. A good > > restore command, which

Re: Standby trying "restore_command" before local WAL

2018-08-06 Thread Tomas Vondra
On 08/06/2018 05:19 PM, Stephen Frost wrote: Greetings, * David Steele (da...@pgmasters.net) wrote: I think for the stated scenario (known good standby that has been shutdown gracefully) it makes perfect sense to trust the contents of pg_wal. Call this scenario #1. An alternate scenario (#2)

Re: [PATCH] Find additional connection service files in pg_service.conf.d directory

2018-08-06 Thread Curt Tilmes
On Thu, Jul 19, 2018 at 5:39 AM Heikki Linnakangas wrote: > Handy feature! > > On 01/03/18 20:40, Curt Tilmes wrote: > > On Thu, Mar 1, 2018 at 1:13 PM, Andres Freund > wrote: > >> And within the directory which service file wins will be decided by > >> filesystem internals. That makes me a bit

Re: Standby trying "restore_command" before local WAL

2018-08-06 Thread Stephen Frost
Greetings, * David Steele (da...@pgmasters.net) wrote: > I think for the stated scenario (known good standby that has been > shutdown gracefully) it makes perfect sense to trust the contents of > pg_wal. Call this scenario #1. > > An alternate scenario (#2) is that the data directory was copied

Re: [GSoC]The project summary

2018-08-06 Thread Charles Cui
got it, will do that asap. Thanks for the comments! On Mon, Aug 6, 2018, 7:06 AM Aleksander Alekseev wrote: > Hello Charles, > > Personally I believe the project is in a pretty good shape, well done! > However I would recommend to replace all sprintf calls with it's safer > version, snprintf.

Re: [PATCH v18] GSSAPI encryption support

2018-08-06 Thread Stephen Frost
Heikki, * Heikki Linnakangas (hlinn...@iki.fi) wrote: > Sorry if this sounds facetious, but: > > What is the point of this patch? What's the advantage of GSSAPI encryption > over SSL? I was hoping to find the answer by reading the documentation > changes, but all I can see is "how" to set it up,

Re: Allow COPY's 'text' format to output a header

2018-08-06 Thread Stephen Frost
Greetings, * Cynthia Shang (cynthia.sh...@crunchydata.com) wrote: > > On Aug 2, 2018, at 3:30 PM, Simon Muller wrote: > > > > Sure, thanks both for the feedback. Attached is a patch with the error kept > > as ERRCODE_FEATURE_NOT_SUPPORTED. > > I was able to apply the patch (after resolving a

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

2018-08-06 Thread Tomas Vondra
On 08/03/2018 04:24 PM, Dean Rasheed wrote: On 17 July 2018 at 14:03, Tomas Vondra wrote: For equalities it's going to be hard. The only thing I can think of at the moment is checking if there are any matching buckets at all, and using that to decide whether to extrapolate the MCV

Re: Loaded footgun open_datasync on Windows

2018-08-06 Thread Laurenz Albe
Thomas Munro wrote: > It looks like initdb is failing with this patch: > > https://ci.appveyor.com/project/postgresql-cfbot/postgresql/build/1.0.6732 > > Unfortunately cfbot is not clever enough to print out the contents of > the initdb log so I don't have any more information... Sorry for the

Re: [GSoC]The project summary

2018-08-06 Thread Aleksander Alekseev
Hello Charles, Personally I believe the project is in a pretty good shape, well done! However I would recommend to replace all sprintf calls with it's safer version, snprintf. Also please consider to run the code through Clang Static Analyzer and Valgrind one more time just to make sure there are

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

2018-08-06 Thread Etsuro Fujita
(2018/08/03 22:28), Etsuro Fujita wrote: (2018/08/03 22:18), Etsuro Fujita wrote: Here is a patch for refusing to generate PWJ paths when WRVs are involved: * We no longer need to handle WRVs, so I've simplified build_joinrel_tlist() and setrefs.c to what they were before partition-wise join

Re: TupleTableSlot abstraction

2018-08-06 Thread Ashutosh Bapat
On Mon, Aug 6, 2018 at 10:15 AM, Andres Freund wrote: > Hi, > > On 2018-08-06 10:08:24 +0530, Ashutosh Bapat wrote: >> I think, I explained why getattr() needs to be a separate callback. >> There's a reason why slot_getattr() more code than just calling >> slot_getsomeattrs() and return the

Re: [HACKERS][PATCH] Applying PMDK to WAL operations for persistent memory

2018-08-06 Thread Yoshimi Ichiyanagi
I'm sorry for the delay in replying your mail. <91411837-8c65-bf7d-7ca3-d69bdcb49...@iki.fi> Thu, 1 Mar 2018 18:40:05 +0800Heikki Linnakangas wrote : >Interesting. How does this compare with using good old mmap()? The libpmem's pmem_map_file() supported 2M/1G(the size of huge page) alignment,

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

2018-08-06 Thread Heikki Linnakangas
Has there been any consideration to encodings? What happens if the message contains non-ASCII characters, and the sending backend is connected to database that uses a different encoding than the backend being signaled? - Heikki

Re: Allow postgres_fdw passwordless non-superuser conns with prior superuser permission

2018-08-06 Thread Laurenz Albe
Craig Ringer wrote: > Currently postgres_fdw cannot be used with 'cert' authentication, i.e. > client-certificate validation > and cert cn => postgres username mapping. You also can't use things like > Kerberos, SSPI, etc with > a superuser-created FDW and username map. > > To permit this, I'd

Re: Handling better supported channel binding types for SSL implementations

2018-08-06 Thread Heikki Linnakangas
On 28/05/18 06:46, Michael Paquier wrote: On Thu, Mar 08, 2018 at 02:19:55PM -0500, Peter Eisentraut wrote: Moved to next CF along with those other two patches. Attached is a refreshed patch for this thread, which failed to apply after recent changes. This is tied with patches for other SSL