Re: [HACKERS] Proposal: generic WAL compression

2017-11-19 Thread Antonin Houska
Antonin Houska wrote: > Oleg Ivanov wrote: > > > In order to overcome that issue, I would like to propose the patch, which > > provides possibility to use another approach of the WAL record > > construction. > > After having spent several hours reviewing this patch I dare to send the > followi

Re: [HACKERS] [WIP] Zipfian distribution in pgbench

2017-11-19 Thread Fabien COELHO
Hello Alik, Patch applies with "patch", but not with "git apply", probably because it is in CR-NL eol format. No big deal. Documentation has been switched from SGML to XML, so now tags must be explicitely closed, i.e. use x instead of x. Patch compiles with a warning: pgbench.c: In funct

Re: [HACKERS] Assertion failure when the non-exclusive pg_stop_backup aborted.

2017-11-19 Thread Masahiko Sawada
On Fri, Nov 17, 2017 at 11:00 AM, Michael Paquier wrote: > On Thu, Nov 16, 2017 at 8:17 PM, Masahiko Sawada > wrote: >> On Thu, Nov 16, 2017 at 1:11 PM, Michael Paquier >> wrote: >>> + /* >>> +* Quick exit if session is not keeping around a non-exclusive backup >>> +* already started.

Re: Allowing SSL connection of v11 client to v10 server with SCRAM channel binding

2017-11-19 Thread Michael Paquier
(Adding Heikki here because that concerns him as well) On Mon, Nov 20, 2017 at 2:04 PM, Tom Lane wrote: > Michael Paquier writes: >> The attached patch, >> for REL_10_STABLE, allows a server to accept as well as input "eSws", >> which is a combination that can now happen. This way, a v10 server

Re: Allowing SSL connection of v11 client to v10 server with SCRAM channel binding

2017-11-19 Thread Tom Lane
Michael Paquier writes: > When trying to connect to a v11 client based on current HEAD to a v10 > server using SSL, then the connection would fail. That's bad ... > The attached patch, > for REL_10_STABLE, allows a server to accept as well as input "eSws", > which is a combination that can now h

Re: no library dependency in Makefile?

2017-11-19 Thread 高增琦
2017-11-20 2:25 GMT+08:00 Tom Lane : > =?UTF-8?B?6auY5aKe55Cm?= writes: > > I very much look forward to hearing everyone's views on this issue. > > If the solution mentioned before is ok, I will start to complete it. > > Please don't top-post, it makes the flow of the conversation very hard > to

Allowing SSL connection of v11 client to v10 server with SCRAM channel binding

2017-11-19 Thread Michael Paquier
HI all, When a client connects during a SCRAM exchange, it has multiple ways to let the server know what the client supports or not when using channel binding: - "n" -> client doesn't support channel binding. - "y" -> client does support channel binding but thinks the server does not. - "p" -> cli

Re: [HACKERS] [PATCH] A hook for session start

2017-11-19 Thread Tom Lane
Michael Paquier writes: > On Mon, Nov 20, 2017 at 12:11 PM, Tom Lane wrote: >> The stuff related to AuxProcType is in miscadmin.h, so one possibility >> is to put the new enum there. But I could see inventing a whole new >> header for this, "utils/proctype.h" or so. > I am on board for a new, d

Re: [HACKERS] [PATCH] A hook for session start

2017-11-19 Thread Michael Paquier
On Mon, Nov 20, 2017 at 12:11 PM, Tom Lane wrote: > This is really about consolidating a whole bunch of ad-hoc stuff. > I don't think pgstat has any particular pride of place here. It > should be one consumer of a common API. > > The stuff related to AuxProcType is in miscadmin.h, so one possibil

Re: [HACKERS] [PATCH] A hook for session start

2017-11-19 Thread Tom Lane
Michael Paquier writes: > I was the one suggesting to Fabrizio to look at how backend types are > evaluated in pgstat.c after an off-list discussion. Agreed that this > result is fragile as this makes two places dependent on the process > types. Why not simply moving all the business of pgstat_bes

Re: [HACKERS] Support for Secure Transport SSL library on macOS as OpenSSL alternative

2017-11-19 Thread Michael Paquier
On Mon, Aug 21, 2017 at 9:46 AM, Michael Paquier wrote: > On Mon, Aug 21, 2017 at 6:21 AM, Daniel Gustafsson wrote: >> I think the intended use case of the GUC should drive the decision on >> fallback. >> If the GUC isn’t supposed to be a way to figure out if the server was built >> with SSL sup

Re: [HACKERS] [PATCH] A hook for session start

2017-11-19 Thread Michael Paquier
On Mon, Nov 20, 2017 at 7:56 AM, Andrew Dunstan wrote: > On 11/19/2017 04:49 PM, Tom Lane wrote: >> Andrew Dunstan writes: >>> I think this: >>> #define IsClientBackend() \ >>> (MyBackendId != InvalidBackendId &&\ >>> !IsAutoVacuumLauncherProcess() &&\ >>> !I

Re: [HACKERS] GnuTLS support

2017-11-19 Thread Michael Paquier
On Mon, Nov 20, 2017 at 9:42 AM, Tomas Vondra wrote: > I don't want to be the annoying guy, but this patch no longer applies > due to 642bafa0c5f9f08d106a14f31429e0e0c718b603 touching the tests :-( Sorry about that. Something more specific needs to happen here as well for channel binding support

Re: [HACKERS] CUBE seems a bit confused about ORDER BY

2017-11-19 Thread Tomas Vondra
On 10/30/2017 03:04 PM, Alexander Korotkov wrote: > On Sun, Oct 29, 2017 at 1:30 AM, Alexander Korotkov > mailto:a.korot...@postgrespro.ru>> wrote: ... > > Thus, I heard no objection to my approach.  Attached patch changes ~> > operator in the proposed way and fixes KNN-GiST search for that.  I'

RE: [HACKERS] Re: protocol version negotiation (Re: Libpq PGRES_COPY_BOTH - version compatibility)

2017-11-19 Thread Badrul Chowdhury
>> I spent a little more time looking at this patch today. I think that the >> patch >> should actually send NegotiateProtocolVersion when *either* the requested >> version is differs from the latest one we support *or* an unsupported >> protocol >> option is present. Otherwise, you only find o

Re: [HACKERS] GnuTLS support

2017-11-19 Thread Tomas Vondra
Hi, On 11/02/2017 11:33 PM, Andreas Karlsson wrote: > On 09/18/2017 07:04 PM, Jeff Janes wrote:> You fixed the first issue, > but I still get the second one: >> >> be-secure-gnutls.c: In function 'get_peer_certificate': >> be-secure-gnutls.c:667: error: 'GNUTLS_X509_CRT_LIST_SORT' undeclared >> (f

RE: Speed up the removal of WAL files

2017-11-19 Thread Tsunakawa, Takayuki
Thanks, it seems to require a bit more consideration about RemoveOldXLogFiles(). Let me continue this next month. Regards Takayuki Tsunakawa > -Original Message- > From: Michael Paquier [mailto:michael.paqu...@gmail.com] > Sent: Saturday, November 18, 2017 10:37 PM > To: Fujii Masao >

Re: [HACKERS] Custom compression methods

2017-11-19 Thread Tomas Vondra
On 11/15/2017 02:13 PM, Robert Haas wrote: > On Wed, Nov 15, 2017 at 4:09 AM, Ildus Kurbangaliev > wrote: >> So in the next version of the patch I can just unlink the options from >> compression methods and dropping compression method will not affect >> already compressed tuples. They still coul

Re: [HACKERS] Custom compression methods

2017-11-19 Thread Tomas Vondra
Hi, On 11/14/2017 02:23 PM, Ildus Kurbangaliev wrote: > > ... > > Attached version 4 of the patch. Fixed pg_upgrade and few other bugs. > I did a review of this today, and I think there are some things that need improvement / fixing. Firstly, some basic comments from just eye-balling the diff,

Re: [HACKERS] [PATCH] A hook for session start

2017-11-19 Thread Andrew Dunstan
On 11/19/2017 04:49 PM, Tom Lane wrote: > Andrew Dunstan writes: >> I think this: >> #define IsClientBackend() \ >>     (MyBackendId != InvalidBackendId &&    \ >> !IsAutoVacuumLauncherProcess() &&    \ >> !IsAutoVacuumWorkerProcess() && \ >> !am_walsender && \

Re: [HACKERS] INSERT ON CONFLICT and partitioned tables

2017-11-19 Thread Simon Riggs
On 2 August 2017 at 00:56, Amit Langote wrote: > The patch's job is simple: Patch no longer applies and has some strange behaviours. > - Remove the check in the parser that causes an error the moment the > ON CONFLICT clause is found. Where is the check and test that blocks ON CONFLICT UPDAT

Re: [HACKERS] [PATCH] A hook for session start

2017-11-19 Thread Tom Lane
Andrew Dunstan writes: > I think this: > #define IsClientBackend() \ >     (MyBackendId != InvalidBackendId &&    \ > !IsAutoVacuumLauncherProcess() &&    \ > !IsAutoVacuumWorkerProcess() && \ > !am_walsender && \ > !IsBackgroundWorker) > probably belo

Re: [HACKERS] [PATCH] A hook for session start

2017-11-19 Thread Andrew Dunstan
On 11/16/2017 10:38 PM, Fabrízio de Royes Mello wrote: > Hi all, > > Attached new version of the patch fixing issues about installcheck and > some assertions reported before (based on Michael Paquier code): > > https://www.postgresql.org/message-id/flat/30479.1510800078%40sss.pgh.pa.us#30479.1510

Re: [HACKERS] [PATCH] Incremental sort

2017-11-19 Thread Thomas Munro
On Wed, Nov 15, 2017 at 7:42 AM, Alexander Korotkov wrote: > Sure, please find rebased patch attached. + /* + * Check if first "skipCols" sort values are equal. + */ + static bool + cmpSortSkipCols(IncrementalSortState *node, TupleTableSlot *a, +

Re: percentile value check can be slow

2017-11-19 Thread jotpe
On 19.11.2017 18:49, David Fetter wrote: On Sun, Nov 19, 2017 at 01:23:42PM +0100, Tomas Vondra wrote: Hi, On 11/19/2017 03:10 AM, David Fetter wrote: On Sat, Nov 18, 2017 at 11:05:47PM +0100, Tomas Vondra wrote: Hi, ... Is 'recognizer' an established definition I should know? Is it the s

Re: [HACKERS] [PATCH] Improve geometric types

2017-11-19 Thread Emre Hasegeli
> dist_pl is changed to take the smaller distance of both ends of > the segment. It seems absorbing error, so it might be better > taking the mean of the two distances. If you have a firm reason > for the change, it is better to be written there, or it might be > better left alone. I am sorry for

Re: [HACKERS] [WIP] Zipfian distribution in pgbench

2017-11-19 Thread Alik Khilazhev
Hello Fabien, Sorry for not respondingfor long time. > Two typos: > - "usinng" -> "using" > - "a rejection method used" -> "a rejection method is used" > > I'm not sure of "least_recently_used_i", this naming style is not used in > pgbench. "least_recently_used" would be ok. > > "..nb

Re: Patch to add dependency between client executes and static libraries

2017-11-19 Thread Tom Lane
=?UTF-8?B?6auY5aKe55Cm?= writes: > The attached patch trying to add dependency between client executes > and static libraries. If this is intended to solve the problem described in then it should be added to that thread rather than starting a new one. But please see the comment I just posted in

Re: no library dependency in Makefile?

2017-11-19 Thread Tom Lane
=?UTF-8?B?6auY5aKe55Cm?= writes: > I very much look forward to hearing everyone's views on this issue. > If the solution mentioned before is ok, I will start to complete it. Please don't top-post, it makes the flow of the conversation very hard to follow. > Recently, I found 'psql' is not rebuil

Re: percentile value check can be slow

2017-11-19 Thread David Fetter
On Sun, Nov 19, 2017 at 01:23:42PM +0100, Tomas Vondra wrote: > Hi, > > On 11/19/2017 03:10 AM, David Fetter wrote: > > On Sat, Nov 18, 2017 at 11:05:47PM +0100, Tomas Vondra wrote: > >> Hi, > >> > >> ... > >> > >> Is 'recognizer' an established definition I should know? Is it the same > >> as 'va

Re: [HACKERS] Bug in to_timestamp().

2017-11-19 Thread Tom Lane
Arthur Zakirov writes: > On Sat, Nov 18, 2017 at 05:48:26PM -0500, Tom Lane wrote: >> ... I see from your regression test additions that >> you want to make some of these throw an error, and I think that any such >> proposal is dead in the water. Nobody is going to consider it an >> improvement i

Re: [HACKERS] [PATCH] Generic type subscripting

2017-11-19 Thread Arthur Zakirov
On Thu, Nov 16, 2017 at 10:37:40PM +0100, Dmitry Dolgov wrote: > I had hard time parsing this, but from your examples I assume you're talking > about passing little bit different arguments to `fetch` function (am I > right?). Yes, I meant to pass the following arguments: Datum source, Subscriptin

Re: [HACKERS] Bug in to_timestamp().

2017-11-19 Thread Arthur Zakirov
On Sat, Nov 18, 2017 at 05:48:26PM -0500, Tom Lane wrote: > This patch needs a rebase over the formatting.c fixes that have gone > in over the last couple of days. > > Looking at the rejects, I notice that in your changes to parse_format(), > you seem to be making it rely even more heavily on reme

Re: percentile value check can be slow

2017-11-19 Thread jotpe
On 19.11.2017 13:23, Tomas Vondra wrote: Hi, On 11/19/2017 03:10 AM, David Fetter wrote: On Sat, Nov 18, 2017 at 11:05:47PM +0100, Tomas Vondra wrote: Hi, ... Is 'recognizer' an established definition I should know? Is it the same as 'validator' or is it something new/different? I borrow

Re: percentile value check can be slow

2017-11-19 Thread Tomas Vondra
Hi, On 11/19/2017 03:10 AM, David Fetter wrote: > On Sat, Nov 18, 2017 at 11:05:47PM +0100, Tomas Vondra wrote: >> Hi, >> >> ... >> >> Is 'recognizer' an established definition I should know? Is it the same >> as 'validator' or is it something new/different? > > I borrowed it from http://langsec.

Patch to add dependency between client executes and static libraries

2017-11-19 Thread 高增琦
Hi, all The attached patch trying to add dependency between client executes and static libraries. As described in message: https://www.postgresql.org/message-id/flat/CAFmBtr1GDF%2BCpw%2B7SZF8jWGeazOd%3D%3DivRAg3rWhLaRXYCv83Vg%40mail.gmail.com#CAFmBtr1GDF+Cpw+7SZF8jWGeazOd==ivrag3rwhlarxycv8...@ma