X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id C2F4A3A5118 for ; Mon, 22 Nov 2004 04:31:15 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 67656-02 for ; Mon, 22 Nov 2004 04:31:09 +0000 (GMT) Received: from candle.pha.pa.us (candle.pha.pa.us [207.106.42.251]) by svr1.postgresql.org (Postfix) with ESMTP id C9D773A513F for ; Mon, 22 Nov 2004 04:31:07 +0000 (GMT) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.11.6) id iAM4V2V10588; Sun, 21 Nov 2004 23:31:02 -0500 (EST) From: Bruce Momjian Message-Id: <200411220431.iAM4V2V10588@candle.pha.pa.us> Subject: Re: session_id In-Reply-To: <20041118123831.5789.qmail@web13925.mail.yahoo.com> To: abief_ag_-postgresql@yahoo.com Date: Sun, 21 Nov 2004 23:31:02 -0500 (EST) Cc: Michael Fuhr , pgsql-sql@postgresql.org X-Mailer: ELM [version 2.4ME+ PL108 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200411/225 X-Sequence-Number: 19544 Riccardo G. Facchini wrote: > No, I can't provide it because your'e right. currval() is NOT affected > by other sessions. > > Thanks anyway for the suggestion, using pg_backend_pid() solved the > uniqueness I needed. I'll keep the nextval/currval for another > opportunity. FYI, we needed a unique-through-time session id for the log_line_prefix so we used the seconds-since-1970-dot-pid. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073