Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 573334762C1 for ; Thu, 17 Oct 2002 21:55:12 -0400 (EDT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id B3982475CE7 for ; Thu, 17 Oct 2002 21:55:11 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.5/8.12.5) with ESMTP id g9I1tEhR013547; Thu, 17 Oct 2002 21:55:14 -0400 (EDT) To: Will LaShell Cc: "pgsql-admin@postgresql.org" Subject: Re: Using oid with RServ w/ Postgresql 7.2 In-reply-to: <1034888522.3498.3.camel@lyric.ofsloans.com> References: <1034888522.3498.3.camel@lyric.ofsloans.com> Comments: In-reply-to Will LaShell message dated "17 Oct 2002 14:02:01 -0700" Date: Thu, 17 Oct 2002 21:55:14 -0400 Message-ID: <13546.1034906114@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200210/132 X-Sequence-Number: 5990 Will LaShell writes: > My question would then be, are there any problems/reasons or hints with > using the oid field as the field that the rserv trigger is set on? > We will be using rserv in a production environment so I'm looking at > this as not just an academic solution but a real world one. This is risky for a long-lived database. Things will work fine until the OID counter wraps around (ie, more than 4 billion rows inserted into your database). After that you have a risk of OID collisions. You can prevent the worst problems by installing a unique index on OID on each replicated table; but then you may occasionally get unexpected "duplicate key" errors. My advice would be to add a serial8 column to each table and use that as the replication primary key. regards, tom lane