Received: from wallace.ece.rice.edu (root@wallace.ece.rice.edu [128.42.12.154]) by hub.org (8.9.3/8.9.3) with ESMTP id TAA77659 for ; Sat, 31 Jul 1999 19:05:17 -0400 (EDT) (envelope-from reedstrm@wallace.ece.rice.edu) Received: by wallace.ece.rice.edu via sendmail from stdin id (Debian Smail3.2.0.102) for pgsql-sql@postgreSQL.org; Sat, 31 Jul 1999 18:05:16 -0500 (CDT) Date: Sat, 31 Jul 1999 18:05:16 -0500 From: "Ross J. Reedstrom" To: pgsql-sql@postgreSQL.org Subject: Re: [SQL] MVCC and concurrent clients Message-ID: <19990731180516.A16854@wallace.ece.rice.edu> References: <12132.933365440@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.3i In-Reply-To: <12132.933365440@sss.pgh.pa.us>; from Tom Lane on Fri, Jul 30, 1999 at 04:10:40PM -0400 On Fri, Jul 30, 1999 at 04:10:40PM -0400, Tom Lane wrote: Tom - How about timestamps? > something like this: > BEGIN TRANSACTION; > INSERT and/or UPDATE, setting each new or modified row's updatedTime to 'now'; > NOTIFY shared_table; > END TRANSACTION; > > All clients are listeners for the NOTIFY messages, and whenever > a notify is received, a client will do > SELECT * FROM shared_table WHERE updateTime >= last_time_looked; > > Alternatively, is there a better way to design the table structure for > this application? I would think "give me all recently modified tuples" > is a pretty standard problem. > Ross -- Ross J. Reedstrom, Ph.D., NSBRI Research Scientist/Programmer Computer and Information Technology Institute Rice University, 6100 S. Main St., Houston, TX 77005