Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id CE2339FB628 for ; Wed, 7 Mar 2007 12:37:01 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 23703-02 for ; Wed, 7 Mar 2007 12:36:49 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.226]) by postgresql.org (Postfix) with ESMTP id EC2129FB687 for ; Wed, 7 Mar 2007 12:36:48 -0400 (AST) Received: by nz-out-0506.google.com with SMTP id r28so202764nza for ; Wed, 07 Mar 2007 08:36:48 -0800 (PST) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; b=iVPFFDR5Rs/3s/84fDdzUZQw3E/tKTBDI/hOz+oKelOKDRGyncqEoC+Bhgy8CUwGK+IKz8+9jwieLIfTcWphh1mf1QXK8aPjpYLZggYv9wrYspuCwPrpdQFb0gmiyKSmWHFvELJFYFyRSxec30VimuIDO6YCrFPnMvfSxToj4jE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; b=jcDZ26qKDaIavY4elmJXpXFMd9oRc5cEq1OHxrvRQGZuL74q95+BT1FVaohsgC2H1O7OzleOb6OnyxTEA3hZpRZHvqbltT9oOOpuwt1AzXm03WIAlQuNrG1grwSluCX9Z/0zjdGB/5oQ6h1PsK5NftM87v3wmuEfcDgJ4i7JXAk= Received: by 10.64.183.6 with SMTP id g6mr10342190qbf.1173285408312; Wed, 07 Mar 2007 08:36:48 -0800 (PST) Received: from ?192.168.1.34? ( [82.3.248.250]) by mx.google.com with ESMTP id z21sm365501qbc.2007.03.07.08.36.44; Wed, 07 Mar 2007 08:36:44 -0800 (PST) Message-ID: <45EEEA1C.5050105@enterprisedb.com> Date: Wed, 07 Mar 2007 16:36:44 +0000 From: Heikki Linnakangas User-Agent: Icedove 1.5.0.8 (X11/20061116) MIME-Version: 1.0 To: giuseppe@eppesuigoccas.homedns.org CC: Jeff Hubbach , pgsql-jdbc@postgresql.org Subject: Re: Transaction atomicity References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200703/79 X-Sequence-Number: 16793 Jeff Hubbach wrote: > Why not have a compound key on this table, with an ID generated by a > sequence (one sequence, named the same, for each instance of PostgreSQL for > each office), and an Office ID that is static for each instance? Then the > merge/sync would go through without a hitch. That's what I was thinking. If you don't want to have a two-field key, for example because you can't change the schema you already have, you could still divide a range of ids for each office when you create the sequence: CREATE SEQUENCE fooseq MINVALUE 10000000 MAXVALUE 19999999 NO CYCLE Just use a different range for each office. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com