X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id D37DD9DD787 for ; Fri, 2 Dec 2005 17:18:44 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 24007-10 for ; Fri, 2 Dec 2005 17:18:40 -0400 (AST) X-Greylist: delayed 01:00:36.598813 by SQLgrey- Received: from ns.snowman.net (ns.snowman.net [66.92.160.21]) by postgresql.org (Postfix) with ESMTP id 5EC079DD784 for ; Fri, 2 Dec 2005 17:18:41 -0400 (AST) Received: by ns.snowman.net (Postfix, from userid 1000) id 8978717AD3; Fri, 2 Dec 2005 16:19:25 -0500 (EST) Date: Fri, 2 Dec 2005 16:19:25 -0500 From: Stephen Frost To: Luke Lonergan Cc: David Lang , Steve Oualline , pgsql-performance@postgresql.org Subject: Re: Database restore speed Message-ID: <20051202211925.GF6026@ns.snowman.net> Mail-Followup-To: Luke Lonergan , David Lang , Steve Oualline , pgsql-performance@postgresql.org References: <20051202201847.GE6026@ns.snowman.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="/UZYnPkX7MOZI66P" Content-Disposition: inline In-Reply-To: X-Editor: Vim http://www.vim.org/ X-Info: http://www.snowman.net X-Operating-System: Linux/2.4.24ns.3.0 (i686) X-Uptime: 16:13:59 up 174 days, 13:26, 8 users, load average: 0.19, 0.15, 0.10 User-Agent: Mutt/1.5.9i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200512/80 X-Sequence-Number: 15901 --/UZYnPkX7MOZI66P Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Luke Lonergan (llonergan@greenplum.com) wrote: > On 12/2/05 12:18 PM, "Stephen Frost" wrote: > > Just a thought, but couldn't psql be made to use the binary mode of > > libpq and do at least some of the conversion on the client side? Or > > does binary mode not work with copy (that wouldn't suprise me, but > > perhaps copy could be made to support it)? >=20 > Yes - I think this idea is implicit in what David suggested, and my respo= nse > as well. The problem is that the way the client does conversions can > potentially differ from the way the backend does. Some of the types in > Postgres are machine intrinsic and the encoding conversions use on-machine > libraries, each of which preclude the use of client conversion methods > (without a lot of restructuring). We'd tackled this problem in the past = and > concluded that the parse / convert stage really belongs in the backend. I've used the binary mode stuff before, sure, Postgres may have to convert some things but I have a hard time believing it'd be more expensive to do a network_encoding -> host_encoding (or toasting, or whatever) than to do the ascii -> binary change. Thanks, Stephen --/UZYnPkX7MOZI66P Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) iD8DBQFDkLpdrzgMPqB3kigRAhQNAKCPzO2l/MJNlrzXtlsW+vYU6Y7ZGACePIuF 50XkDsbVloZ+JQgFHOrIbLI= =Hf7Z -----END PGP SIGNATURE----- --/UZYnPkX7MOZI66P--