Re: [HACKERS] dblink performance regression

2014-01-16 Thread Joe Conway
yes Joe Sent with AquaMail for Android http://www.aqua-mail.com On January 16, 2014 2:32:55 PM Josh Berkus wrote: On 12/07/2013 05:50 PM, Joe Conway wrote: > On 12/07/2013 05:41 PM, Fabrízio de Royes Mello wrote: > >> On Sat, Dec 7, 2013 at 11:20 PM, Michael Paquier >> mailto:michael.paqu.

Re: [HACKERS] dblink performance regression

2014-01-16 Thread Josh Berkus
On 12/07/2013 05:50 PM, Joe Conway wrote: > On 12/07/2013 05:41 PM, Fabrízio de Royes Mello wrote: > >> On Sat, Dec 7, 2013 at 11:20 PM, Michael Paquier >> mailto:michael.paqu...@gmail.com>> >> wrote: IMHO is more elegant create a procedure to encapsulate the code to avoid redundan

Re: [HACKERS] dblink performance regression

2013-12-09 Thread Jim Nasby
On 12/7/13 7:50 PM, Joe Conway wrote: On 12/07/2013 05:41 PM, Fabrízio de Royes Mello wrote: > >On Sat, Dec 7, 2013 at 11:20 PM, Michael Paquier >mailto:michael.paqu...@gmail.com>> >wrote: >>> >>>IMHO is more elegant create a procedure to encapsulate the code >>>to avoid redundancy. >>Yep, per

Re: [HACKERS] dblink performance regression

2013-12-08 Thread Tom Lane
Joe Conway writes: > I don't think it makes sense to create a new function in dblink either > -- we're only talking about two lines of added redundancy which is > less lines of code than a new function would add. Indeed, and I think the claim that such a function "encapsulates" anything useful is

Re: [HACKERS] dblink performance regression

2013-12-07 Thread Michael Paquier
> On 2013/12/08, at 10:50, Joe Conway wrote: > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > >> On 12/07/2013 05:41 PM, Fabrízio de Royes Mello wrote: >> >> On Sat, Dec 7, 2013 at 11:20 PM, Michael Paquier >> mailto:michael.paqu...@gmail.com>> >> wrote: IMHO is more elegant c

Re: [HACKERS] dblink performance regression

2013-12-07 Thread Fabrízio de Royes Mello
On Sat, Dec 7, 2013 at 11:41 PM, Fabrízio de Royes Mello < fabriziome...@gmail.com> wrote: > > > On Sat, Dec 7, 2013 at 11:20 PM, Michael Paquier < michael.paqu...@gmail.com> wrote: > > > > > > IMHO is more elegant create a procedure to encapsulate the code to avoid > > > redundancy. > > Yep, perha

Re: [HACKERS] dblink performance regression

2013-12-07 Thread Joe Conway
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/07/2013 05:41 PM, Fabrízio de Royes Mello wrote: > > On Sat, Dec 7, 2013 at 11:20 PM, Michael Paquier > mailto:michael.paqu...@gmail.com>> > wrote: >>> >>> IMHO is more elegant create a procedure to encapsulate the code >>> to avoid redundancy

Re: [HACKERS] dblink performance regression

2013-12-07 Thread Fabrízio de Royes Mello
On Sat, Dec 7, 2013 at 11:20 PM, Michael Paquier wrote: > > > > IMHO is more elegant create a procedure to encapsulate the code to avoid > > redundancy. > Yep, perhaps something like PQsetClientEncodingIfDifferent or similar > would make sense. > Well I think at this first moment we can just crea

Re: [HACKERS] dblink performance regression

2013-12-07 Thread Josh Berkus
All, I tested out Joe's original patch, and it does eliminate the 8% performance regression. Will try the new one. -- Josh Berkus PostgreSQL Experts Inc. http://pgexperts.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://ww

Re: [HACKERS] dblink performance regression

2013-12-07 Thread Michael Paquier
On Sun, Dec 8, 2013 at 10:16 AM, Fabrízio de Royes Mello wrote: > > > > On Sat, Dec 7, 2013 at 11:07 PM, Joe Conway wrote: >> >> -BEGIN PGP SIGNED MESSAGE- >> Hash: SHA1 >> >> On 12/05/2013 07:05 PM, Joe Conway wrote: >> > On 12/05/2013 06:53 PM, Tom Lane wrote: >> >> I seem to remember t

Re: [HACKERS] dblink performance regression

2013-12-07 Thread Fabrízio de Royes Mello
On Sat, Dec 7, 2013 at 11:07 PM, Joe Conway wrote: > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 12/05/2013 07:05 PM, Joe Conway wrote: > > On 12/05/2013 06:53 PM, Tom Lane wrote: > >> I seem to remember that at some point we realized that the > >> encoding ID assignments are part of

Re: [HACKERS] dblink performance regression

2013-12-07 Thread Joe Conway
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/05/2013 07:05 PM, Joe Conway wrote: > On 12/05/2013 06:53 PM, Tom Lane wrote: >> I seem to remember that at some point we realized that the >> encoding ID assignments are part of libpq's ABI and so can't >> practically be changed ever, so the abo

Re: [HACKERS] dblink performance regression

2013-12-06 Thread Fabrízio de Royes Mello
On Fri, Dec 6, 2013 at 2:50 AM, Joe Conway wrote: > > On 12/05/2013 07:16 PM, Fabrízio de Royes Mello wrote: > > Hi Joe, how are you? > > Hi Fabrizio -- great to hear from you! I'm well. > :-) > > Well, when Tom sent this email I was reviewing your patch and the > > main suggestion is about use

Re: [HACKERS] dblink performance regression

2013-12-05 Thread Joe Conway
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/05/2013 07:16 PM, Fabrízio de Royes Mello wrote: > Hi Joe, how are you? Hi Fabrizio -- great to hear from you! I'm well. > Well, when Tom sent this email I was reviewing your patch and the > main suggestion is about use of 'pg_encoding_to_char'

Re: [HACKERS] dblink performance regression

2013-12-05 Thread Fabrízio de Royes Mello
On Fri, Dec 6, 2013 at 1:05 AM, Joe Conway wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 12/05/2013 06:53 PM, Tom Lane wrote: > > I seem to remember that at some point we realized that the encoding > > ID assignments are part of libpq's ABI and so can't practically be > > change

Re: [HACKERS] dblink performance regression

2013-12-05 Thread Joe Conway
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/05/2013 06:53 PM, Tom Lane wrote: > I seem to remember that at some point we realized that the encoding > ID assignments are part of libpq's ABI and so can't practically be > changed ever, so the above may be moot. Even so, I think it's a > bad

Re: [HACKERS] dblink performance regression

2013-12-05 Thread Tom Lane
Joe Conway writes: > Apparently setting client encoding is an expensive operation. Yeah, it requires sending a command to the remote end. I'm not sure if it'd be a good idea for PQsetClientEncoding to try to skip the operation when the client encoding is already the right thing. The given name

[HACKERS] dblink performance regression

2013-12-05 Thread Joe Conway
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I was recently approached by someone with a dblink performance regression, going back to somewhere between 8.3 (good) and 8.4 (bad). They were measuring ~8% degradation in dblink connection speed. I was able to replicate on my own hardware with the fol