pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: idc danny <idcdanny@yahoo.com>
To: Kevin Martyn <kevin.martyn@enterprisedb.com>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: copy vs. C function
Date: Wed, 14 Dec 2011 06:32:03 -0800 (PST)
Message-ID: <1323873123.27613.YahooMailNeo@web110414.mail.gq1.yahoo.com> (raw)
In-Reply-To: <CAPuHxPB8vpRX1rCuUQhyj14SJk7MGXm0qmigazfJPTkx=SWcrg@mail.gmail.com>
References: <CAKuK5J3hB1g+dUtwu68sDF-bED=Xv_TaBfoOoyNRQbUGu9Zs3Q@mail.gmail.com>
	<CAHyXU0yC8Q3JihEws=naH0p9Mh5MyLLu7yXAjp9gE0sQORN-fA@mail.gmail.com>
	<CAKuK5J0EzKnvAfNk=JKd2Mw3q25fguHKYwTQCkYvxPYA+TDKPw@mail.gmail.com>
	<29057.1323843491@sss.pgh.pa.us>
	<1323846130.44736.YahooMailNeo@web110413.mail.gq1.yahoo.com>
	<CAPuHxPB8vpRX1rCuUQhyj14SJk7MGXm0qmigazfJPTkx=SWcrg@mail.gmail.com>

Ah, that did the trick, thank you Kevin,
Danny



________________________________
 From: Kevin Martyn <kevin.martyn@enterprisedb.com>
To: idc danny <idcdanny@yahoo.com> 
Cc: "pgsql-performance@postgresql.org" <pgsql-performance@postgresql.org> 
Sent: Wednesday, December 14, 2011 3:14 PM
Subject: Re: [PERFORM] copy vs. C function
 

try
host all all 5.0.0.0/8  md5


On Wed, Dec 14, 2011 at 2:02 AM, idc danny <idcdanny@yahoo.com> wrote:

Hi guys,
>A nub question here since I could 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 access restricted to that particular range only.
>Currently I got :
>host all all 0.0.0.0/32 md5
>which allows all the IP's, and the try:
>host all all 5.0.0.0/32 md5 
>
>does not work.
>So what I am suppose to add in "pg_hba.conf" in order to achieve my restriction? Please help me,
>Thank you,
>Danny
>
>
>
>
>________________________________
> From: Tom Lane <tgl@sss.pgh.pa.us>
>To: Jon Nelson <jnelson+pgsql@jamponi.net> 
>Cc: pgsql-performance@postgresql.org 
>Sent: Wednesday, December 14, 2011 8:18 AM
>Subject: Re: [PERFORM] copy vs. C function 
> 
>Jon Nelson <jnelson+pgsql@jamponi.net> writes:
>> The only thing I have left are these statements:
>
>> get_call_result_type
>> TupleDescGetAttInMetadata
>> BuildTupleFromCStrings
>> HeapTupleGetDatum
>> and finally PG_RETURN_DATUM
>
>> It turns out that:
>> get_call_result_type adds 43 seconds [total: 54],
>> TupleDescGetAttInMetadata adds 19 seconds [total: 73],
>> BuildTypleFromCStrings accounts for 43 seconds [total: 116].
>
>> So those three functions account for 90% of the total time spent.
>> What alternatives exist? Do I have to call get_call_result_type /every
>> time/ through the function?
>
>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
 back again.
>You should be trying to keep the values in Datum format and then
>invoking heap_form_tuple.  And yeah, you probably could cache the
>type information across calls.
>
>            regards, tom lane
>
>-- 
>Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
>To make changes to your subscription:
>http://www.postgresql.org/mailpref/pgsql-performance
>
>
>


-- 
Kevin P Martyn, CISSP
Principal Sales Engineer
(914) 819 8795 mobile
Kevin.Martyn@EnterpriseDB.com
Skype:   kevin.martyn4

Website: www.enterprisedb.com
EnterpriseDB Blog: http://blogs.enterprisedb.com/
Follow us on Twitter: http://www.twitter.com/enterprisedb

This
 e-mail message (and any attachment) is intended for the use of the 
individual or entity to whom it is addressed. This message contains 
information from EnterpriseDB Corporation that may be privileged, 
confidential, or exempt from disclosure under applicable law. If you are
 not the intended recipient or authorized to receive this for the 
intended recipient, any use, dissemination, distribution, retention, 
archiving, or copying of this communication is strictly prohibited. If 
you have received this e-mail in error, please notify the sender 
immediately by reply e-mail and delete this message. 

view thread (16+ messages)  latest in thread

Message-ID: <1323873123.27613.YahooMailNeo@web110414.mail.gq1.yahoo.com>
Permalink:  ../1323873123.27613.YahooMailNeo@web110414.mail.gq1.yahoo.com/
Also on:    postgresql.org/message-id/1323873123.27613.YahooMailNeo@web110414.mail.gq1.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: idcdanny@yahoo.com, kevin.martyn@enterprisedb.com
  Subject: Re: copy vs. C function
  In-Reply-To: <1323873123.27613.YahooMailNeo@web110414.mail.gq1.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox