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 06C3C9DD77F for ; Fri, 2 Dec 2005 17:30:17 -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 39570-02 for ; Fri, 2 Dec 2005 17:30:13 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.Mi8.com (d01gw03.mi8.com [63.240.6.42]) by postgresql.org (Postfix) with ESMTP id 393B09DD765 for ; Fri, 2 Dec 2005 17:30:14 -0400 (AST) Received: from 172.16.1.148 by mail.Mi8.com with ESMTP (- Welcome to Mi8 Corporation www.Mi8.com (D3)); Fri, 02 Dec 2005 16:30:08 -0500 X-Server-Uuid: E847189C-FC88-4913-9CD4-DE66914F83C0 Received: from MI8NYCMAIL06.Mi8.com ([172.16.1.160]) by D01HOST02.Mi8.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 2 Dec 2005 16:29:50 -0500 Received: from 67.103.45.218 ([67.103.45.218]) by MI8NYCMAIL06.Mi8.com ( [172.16.1.219]) via Exchange Front-End Server mi8owa.mi8.com ( [172.16.1.104]) with Microsoft Exchange Server HTTP-DAV ; Fri, 2 Dec 2005 21:29:49 +0000 User-Agent: Microsoft-Entourage/11.2.1.051004 Date: Fri, 02 Dec 2005 13:29:47 -0800 Subject: Re: Database restore speed From: "Luke Lonergan" To: "Stephen Frost" cc: "David Lang" , "Steve Oualline" , pgsql-performance@postgresql.org Message-ID: Thread-Topic: [PERFORM] Database restore speed Thread-Index: AcX3hgX4DADgfrd4RAWuo4H4HBe4FgAAMJyIAAAvFrE= In-Reply-To: MIME-Version: 1.0 X-OriginalArrivalTime: 02 Dec 2005 21:29:50.0042 (UTC) FILETIME=[869403A0:01C5F787] X-WSS-ID: 6F8E636A19O8760733-07-01 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=1.253 required=5 tests=[AWL=-0.000, RCVD_NUMERIC_HELO=1.253] X-Spam-Score: 1.253 X-Spam-Level: * X-Archive-Number: 200512/82 X-Sequence-Number: 15903 Stephen, On 12/2/05 1:19 PM, "Stephen Frost" wrote: > >> 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. > > From a performance standpoint no argument, although you're betting that you > can do parsing / conversion faster than the COPY core in the backend can (I > know *we* can :-). It's a matter of safety and generality - in general you > can't be sure that client machines / OS'es will render the same conversions > that the backend does in all cases IMO. One more thing - this is really about the lack of a cross-platform binary input standard for Postgres IMO. If there were such a thing, it *would* be safe to do this. The current Binary spec is not cross-platform AFAICS, it embeds native representations of the DATUMs, and does not specify a universal binary representation of same. For instance - when representing a float, is it an IEEE 32-bit floating point number in little endian byte ordering? Or is it IEEE 64-bit? With libpq, we could do something like an XDR implementation, but the machinery isn't there AFAICS. - Luke