Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aB46Z-0000DI-Ar for pgsql-hackers@arkaria.postgresql.org; Mon, 21 Dec 2015 17:18:39 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aB46Y-0006QQ-Hz for pgsql-hackers@arkaria.postgresql.org; Mon, 21 Dec 2015 17:18:38 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aB45E-0004wu-SC for pgsql-hackers@postgresql.org; Mon, 21 Dec 2015 17:17:17 +0000 Received: from bay.acenet.us ([173.230.252.50]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aB458-0003xY-DI for pgsql-hackers@postgresql.org; Mon, 21 Dec 2015 17:17:15 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=anastigmatix.net; s=default; h=Content-Transfer-Encoding:Content-Type: Subject:To:MIME-Version:From:Date:Message-ID; bh=hv8FoYgVTgAxOnIOhCF643m9TKVuCvNyKW0BLMsSPAc=; b=BJbD4vjrbSrcOYeTCsD0b6ocVq jJ74AajMZZffnmnyBf3EjwxdLDjaQoaS62ehIRHmtreZjzW3TjGwRBFJdEkrOamc2gay8pNX2RjsH Pz0RfZVC4T0NSqNGtsJ1zici0FqSF5Qobut5l5IxfCMfZ+8cSxSy4znu4Zu23aA/wPiqWBWbrzQPC 1UjHn0s4cbLhzdxkzt97FTZrGeJ0r7kLGfwkBYKDti3NNP9jB407DHH8kiYEii6ZsHTUkAcSdi/UM rsZPp9wS55mgc+Mj1OKrd0UZ+eNjZOLLKd3HNzIedntB4wu+FFqYnePPKl02NhQz7zojP/6FVUfJg O23sYOdA==; Received: from [172.79.84.52] (port=54897) by bay.acenet.us with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.86) (envelope-from ) id 1aB456-003DgB-6e for pgsql-hackers@postgresql.org; Mon, 21 Dec 2015 12:17:09 -0500 Message-ID: <56783412.6090005@anastigmatix.net> Date: Mon, 21 Dec 2015 12:17:06 -0500 From: Chapman Flack User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: PostgreSQL Hackers Subject: tracking owner of extension-managed objects Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-OutGoing-Spam-Status: No, score=-0.2 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bay.acenet.us X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - anastigmatix.net X-Get-Message-Sender-Via: bay.acenet.us: authenticated_id: chap+anastigmatix.net/only user confirmed/virtual account not confirmed X-Authenticated-Sender: bay.acenet.us: chap@anastigmatix.net X-Source: X-Source-Args: X-Source-Dir: X-Pg-Spam-Score: -1.7 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org I'm looking for best-practice advice. PL/Java is an extension that manages some objects (jar files, which users can tell PL/Java to load, drop, or replace). The objects have owners (have had since PL/Java 1.1.0 anyway). When the owner tracking was added for 1.1.0 it recorded the owner oid. In 2006, before 1.3.0, it was changed to keep the owner name instead of the oid, in response to a bug report 1506 that involved the wrong owner name being shown after dump/restore into another db where the user oids were different. Neither approach seems perfect to me (in fact, they both strike me as having complementary sides of the same weakness, which dump/restore just happens to expose). I am also wondering whether PL/Java ought to create references, or a trigger, on pg_authid to clean up if the user goes away; it currently doesn't. Before I spend too many cycles on this, is there a most favored design pattern that has already emerged for this kind of thing? -Chap -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers