Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 4EE77EEA158 for ; Wed, 14 Dec 2011 10:32:22 -0400 (AST) Received: from nm1-vm3.bullet.mail.ne1.yahoo.com ([98.138.91.131]) by magus.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1RapsY-0007Z8-GI for pgsql-performance@postgresql.org; Wed, 14 Dec 2011 14:32:21 +0000 Received: from [98.138.90.57] by nm1.bullet.mail.ne1.yahoo.com with NNFMP; 14 Dec 2011 14:32:05 -0000 Received: from [98.138.89.252] by tm10.bullet.mail.ne1.yahoo.com with NNFMP; 14 Dec 2011 14:32:04 -0000 Received: from [127.0.0.1] by omp1044.mail.ne1.yahoo.com with NNFMP; 14 Dec 2011 14:32:04 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 914514.83316.bm@omp1044.mail.ne1.yahoo.com Received: (qmail 27786 invoked by uid 60001); 14 Dec 2011 14:32:04 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1323873123; bh=jj3mMAOduvN+UHVn8K0fn49ed20D+uIWhwSdwoEvTJA=; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=NypkQ2CBC915SypGSksAzWw6tfyrv62fTKK5/W1VbRjp8+Lo4uohe6QSAkwqWWjQGnx2WofZMRKK+4b722a2Vebysr7G/EaoTbhMRrkwyrJNrj7MCpnfRAV7nj4HMKOpOVnwNVxQKbNrWQigBgN+LyGzWFXnnk9OpdBi9h3EITA= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=UQ8TFctFlbNPwWHjf5rN0LKDA29nbhVOg4yMmkJcCn55vfSdjCsuDkYCDrE6xGcvwD07m3xkgPYk8Z4yg7eaSLPquMQFq1eK5ql6Eu5xgP+cfT6C/CATd3tBLnyu/E8oW0fcZDe7qMlq/ewC25fwSE6ifZ5Xx1h9BTXuL2fsuSc=; X-YMail-OSG: 3XA80u8VM1mNIEYbDGusw5P95eHTVrevmNrWnpgmGIN9IrZ nmLpGPZBUMDzTRGojLOK3Dx1cKd6LZEOQriyIUAJqdUs76bkoxfPaGgbKnES b0ifoQj_LyvfS_loFs_URmIxQNtyRIdbw6Skaqpz2164OGZyC06EyUTQS7QG EYM7AZwcq1PuZdrH4KzspTndCyCExFqzy.TrygF2ygenY1wmn5EfA79X2GrA YUwk0El_cmxXafS_NrSm7dd3uC49FveUgU_1mDGrCZg7s8_AXLUze2Mj_hy1 orZZqD.V_ano3DqYBxsbldj8d7wJiCsBYN8pfq_MfbdMgyOiuPNayBvZlCFk XpcXe0LqbPL9mt8.l5Ed2K8EHDYdRRkve4cHiw2cCeTMLZfJLDsQ4XEOytxU sZVx2dDBrY_DjveERZy4fkz5gy76wE5SwCBEcjs9vocmJRsOzIds.SYtDVjv FbIjaijVavnJxPKzrlVPbapJw1EVnHsYfX7L7tsGg2IljKPOqvHAwWi.L8KG O2J..8uEhkw05rcw77g3zCrqCOn48zWJDlx0mHot1y_VYyDgJWSZyT73uQ5f O9kw7ct2x9uBfJv0fFK3M.4CUmTgUdJVgqjiVplXFXL8sO9K0X7jN2hrqmGq pfXE.VEHAHmWjkPDDZykiab4oahhkfA-- Received: from [86.106.38.101] by web110414.mail.gq1.yahoo.com via HTTP; Wed, 14 Dec 2011 06:32:03 PST X-Mailer: YahooMailWebService/0.8.115.331698 References: <29057.1323843491@sss.pgh.pa.us> <1323846130.44736.YahooMailNeo@web110413.mail.gq1.yahoo.com> Message-ID: <1323873123.27613.YahooMailNeo@web110414.mail.gq1.yahoo.com> Date: Wed, 14 Dec 2011 06:32:03 -0800 (PST) From: idc danny Reply-To: idc danny Subject: Re: copy vs. C function To: Kevin Martyn Cc: "pgsql-performance@postgresql.org" In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="-789465230-2137670395-1323873123=:27613" X-Pg-Spam-Score: -4.5 (----) X-Archive-Number: 201112/113 X-Sequence-Number: 45912 ---789465230-2137670395-1323873123=:27613 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Ah, that did the trick, thank you Kevin,=0ADanny=0A=0A=0A=0A_______________= _________________=0A From: Kevin Martyn =0AT= o: idc danny =0ACc: "pgsql-performance@postgresql.org"= =0ASent: Wednesday, December 14, 2011 3= :14 PM=0ASubject: Re: [PERFORM] copy vs. C function=0A =0A=0Atry=0Ahost all= all 5.0.0.0/8=A0 md5=0A=0A=0AOn Wed, Dec 14, 2011 at 2:02 AM, idc danny wrote:=0A=0AHi guys,=0A>A nub question here since I coul= d not figure it out on my own:=0A>I'm using Hamachi to connect different si= tes into a VPN and their address always starts with 5.*.*.* - the problem I= 'm facing is that I cannot make the access restricted to that particular ra= nge only.=0A>Currently I got :=0A>host all all 0.0.0.0/32 md5=0A>which allo= ws all the IP's, and the try:=0A>host all all 5.0.0.0/32 md5 =0A>=0A>does n= ot work.=0A>So what I am suppose to add in "pg_hba.conf" in order to achiev= e my restriction? Please help me,=0A>Thank you,=0A>Danny=0A>=0A>=0A>=0A>=0A= >________________________________=0A> From: Tom Lane =0A= >To: Jon Nelson =0A>Cc: pgsql-performance@postg= resql.org =0A>Sent: Wednesday, December 14, 2011 8:18 AM=0A>Subject: Re: [P= ERFORM] copy vs. C function =0A> =0A>Jon Nelson = writes:=0A>> The only thing I have left are these statements:=0A>=0A>> get= _call_result_type=0A>> TupleDescGetAttInMetadata=0A>> BuildTupleFromCString= s=0A>> HeapTupleGetDatum=0A>> and finally PG_RETURN_DATUM=0A>=0A>> It turns= out that:=0A>> get_call_result_type adds 43 seconds [total: 54],=0A>> Tupl= eDescGetAttInMetadata adds 19 seconds [total: 73],=0A>> BuildTypleFromCStri= ngs accounts for 43 seconds [total: 116].=0A>=0A>> So those three functions= account for 90% of the total time spent.=0A>> What alternatives exist? Do = I have to call get_call_result_type /every=0A>> time/ through the function?= =0A>=0A>Well, if you're concerned about performance then I think you're goi= ng=0A>about this in entirely the wrong way, because as far as I can tell fr= om=0A>this you're converting all the field values to text and=0A back again= .=0A>You should be trying to keep the values in Datum format and then=0A>in= voking heap_form_tuple.=A0 And yeah, you probably could cache the=0A>type i= nformation across calls.=0A>=0A>=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 regards, tom = lane=0A>=0A>-- =0A>Sent via pgsql-performance mailing list (pgsql-performan= ce@postgresql.org)=0A>To make changes to your subscription:=0A>http://www.p= ostgresql.org/mailpref/pgsql-performance=0A>=0A>=0A>=0A=0A=0A-- =0AKevin P = Martyn, CISSP=0APrincipal Sales Engineer=0A(914) 819 8795 mobile=0AKevin.Ma= rtyn@EnterpriseDB.com=0ASkype:=A0=A0 kevin.martyn4=0A=0AWebsite: www.enterp= risedb.com=0AEnterpriseDB Blog: http://blogs.enterprisedb.com/=0AFollow us = on Twitter: http://www.twitter.com/enterprisedb=0A=0AThis=0A e-mail message= (and any attachment) is intended for the use of the =0Aindividual or entit= y to whom it is addressed. This message contains =0Ainformation from Enterp= riseDB Corporation that may be privileged, =0Aconfidential, or exempt from = disclosure under applicable law. If you are=0A not the intended recipient o= r authorized to receive this for the =0Aintended recipient, any use, dissem= ination, distribution, retention, =0Aarchiving, or copying of this communic= ation is strictly prohibited. If =0Ayou have received this e-mail in error,= please notify the sender =0Aimmediately by reply e-mail and delete this me= ssage. ---789465230-2137670395-1323873123=:27613 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
Ah, that d= id the trick, thank you Kevin,
Danny

=
From: Kevi= n Martyn <kevin.martyn@enterprisedb.com>
To: idc danny <idcdanny@yahoo.com>
Cc: "pgsql-performance@postgres= ql.org" <pgsql-performance@postgresql.org>
Sent: Wednesday, December 14, 2011 3:14 PM
= Subject: Re: [PERFORM] cop= y vs. C function

=0A
try
host all all = 5.0.0.0/8<= /a>  md5

On Wed, Dec 14= , 2011 at 2:02 AM, idc danny <idcdanny@yahoo.com> wrote:
=0A
=
=0AHi guys,
A nub question here since I c= ould not figure it out on my own:
I'm using Hamachi = to connect different sites into a VPN and their address always= starts with 5.*.*.* - the problem I'm facing is that I cannot make the acc= ess restricted to that particular range only.
=0A
Cur= rently I got :
host all all 0.0.0.0/32 md5
which allows all the IP's, and the try:
hos= t all all 5.0.0.0/32 md5
=0A
does not work.
So what I am suppose to add in "pg_hba.conf" in order to achi= eve my restriction? Please help me,
Thank you,
Danny
=0A


From: Tom Lane <tgl@sss= .pgh.pa.us>
=0A To: Jon Nelson <jne= lson+pgsql@jamponi.net>
Cc:= pgsql-performance@postgresql.org
=0A Sent: Wednesday, December 14, 2011 8:18 AM
Subject: Re: [PERFORM] copy vs. C fu= nction

=0AJon Nelson <jnelson+pgsql@jamponi.net> writes:
> The only thing I have le= ft are these statements:

> get_call_result_type
> TupleDesc= GetAttInMetadata
=0A> BuildTupleFromCStrings
> HeapTupleGetDatu= m
> and finally PG_RETURN_DATUM

> It turns out that:
>= ; get_call_result_type adds 43 seconds [total: 54],
> TupleDescGetAtt= InMetadata adds 19 seconds [total: 73],
=0A> BuildTypleFromCStrings a= ccounts for 43 seconds [total: 116].

> So those three functions a= ccount for 90% of the total time spent.
> What alternatives exist? Do= I have to call get_call_result_type /every
=0A> time/ through the fu= nction?

Well, if you're concerned about performance then I think you= 're going
about this in entirely the wrong way, because as far as I can = tell from
this you're converting all the field values to text and=0A bac= k again.
You should be trying to keep the values in Datum format and the= n
invoking heap_form_tuple.  And yeah, you probably could cache the=
type information across calls.

      &n= bsp;     regards, tom lane
=0A
--
Sent via pgsql-performance mail= ing list (p= gsql-performance@postgresql.org)
To make changes to your subscriptio= n:
http://www.postgresql.org/mailpref/pgsql-performance
=0A

<= /font>



--
Kevin P Martyn, CISSP
Principal Sales Engineer
(914)= 819 8795 mobile
Kevin.Martyn@EnterpriseDB.com
Skype:   kev= in.martyn4
=0A
Website: www.enterprisedb.com
EnterpriseDB Blo= g: http://blogs.enterprisedb.com/
=0A=0AFollow us on Twitter: http://www= .twitter.com/enterprisedb

This=0A e-mail message (and any attachment= ) is intended for the use of the =0Aindividual or entity to whom it is addr= essed. This message contains =0Ainformation from EnterpriseDB Corporation t= hat may be privileged, =0Aconfidential, or exempt from disclosure under app= licable law. If you are=0A not the intended recipient or authorized to rece= ive this for the =0Aintended recipient, any use, dissemination, distributio= n, retention, =0Aarchiving, or copying of this communication is strictly pr= ohibited. If =0Ayou have received this e-mail in error, please notify the s= ender =0Aimmediately by reply e-mail and delete this message.

=0A

---789465230-2137670395-1323873123=:27613--