X-Original-To: pgsql-docs-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 8B1EDD72F9 for ; Sun, 16 Oct 2005 14:16:03 -0300 (ADT) 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 30704-08 for ; Sun, 16 Oct 2005 17:16:00 +0000 (GMT) Received: from candle.pha.pa.us (candle.pha.pa.us [64.139.89.126]) by svr1.postgresql.org (Postfix) with ESMTP id 3230ADA59E for ; Sun, 16 Oct 2005 14:16:00 -0300 (ADT) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.11.6) id j9GHFjq22193; Sun, 16 Oct 2005 13:15:45 -0400 (EDT) From: Bruce Momjian Message-Id: <200510161715.j9GHFjq22193@candle.pha.pa.us> Subject: Re: Will PQregisterThreadLock() be documented? In-Reply-To: <8522.1129481264@sss.pgh.pa.us> To: Tom Lane Date: Sun, 16 Oct 2005 13:15:45 -0400 (EDT) Cc: Volkan YAZICI , pgsql-docs@postgresql.org X-Mailer: ELM [version 2.4ME+ PL121 (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.012 required=5 tests=[AWL=0.012] X-Spam-Level: X-Archive-Number: 200510/46 X-Sequence-Number: 3291 Tom Lane wrote: > Bruce Momjian writes: > > Volkan YAZICI wrote: > >> Will PQregisterThreadLock() - which is defined globally in > >> src/interfaces/libpq/fe-connect.c - be documented? > > > Yes, it should be documented. > > Really? Do we intend applications to call it? Uh, well, we never call it ourselves, so if we don't expect other applications to call it, why is it there? Our code has: /* * Used to set callback that prevents concurrent access to * non-thread safe functions that libpq needs. * The default implementation uses a libpq internal mutex. * Only required for multithreaded apps that use kerberos * both within their app and for postgresql connections. */ typedef void (*pgthreadlock_t) (int acquire); extern pgthreadlock_t PQregisterThreadLock(pgthreadlock_t newhandler); We need to research why it was added. -- 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