Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cRmpE-00016r-OY for pgsql-bugs@arkaria.postgresql.org; Thu, 12 Jan 2017 21:22:24 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cRmpE-0005Db-0G for pgsql-bugs@arkaria.postgresql.org; Thu, 12 Jan 2017 21:22:24 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cRmpD-0005DM-CP for pgsql-bugs@postgresql.org; Thu, 12 Jan 2017 21:22:23 +0000 Received: from mail-qt0-x230.google.com ([2607:f8b0:400d:c0d::230]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1cRmp4-0003j0-Hx for pgsql-bugs@postgresql.org; Thu, 12 Jan 2017 21:22:22 +0000 Received: by mail-qt0-x230.google.com with SMTP id l7so30717259qtd.1 for ; Thu, 12 Jan 2017 13:22:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=JrBEAS9OhOSzR6yecugx4tTL+ix7L8l0xKhDVtDudAE=; b=P8QIYj93Upz3rdlBBmtSErllIhY0uCVMD/EADcYsLZ9TIfQ6MQyCvacT+GF43eBxNX +amDyonYOGcfa1TX1aJM9kongxt/4Xh6tETf2W7rAgy3hFogn6gIBADf/SG9vlpndD/E XfV1wf55E8viYDeKp2/MRiYEIYZoPhMcdUECJn5zfAetY5QeyzqEx63XtCcE06im5hpU FRiy4VQe55R6DJ2aMr6FhkTDc311g0OENDyexck4w1XMdb9W0x4pwE8Q86RsadpGnSnv cGhUXsr3g8d2wcmwzUTC658H8IjNGeXl8FcBxzyYhTjbS/JnTtkWRGZHFGEeDUDMXf6T onUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=JrBEAS9OhOSzR6yecugx4tTL+ix7L8l0xKhDVtDudAE=; b=dcIumNV0OW4WSYepethJGChP485vE1pkswX91xsk8ukBNE65kPA4wVTikMzSoXG/vj SlSZ/YQsLqvlJlsmjY4j1DLD9xaMZOM8p6d2XJt64PKwo6iqTBVakGH2YPExhh/Z4Efj 3YeKwa+yRCNomVUYNiUqmfGxRBP99ymT7Po4e449t2cBJghfbZIM55onVSIuQOH17Tot YgCpejcU2d6+cGZkbehmCNj5Jg1/0n9zHpJjcOkT/I/szlRslvFGObrE1H8MJn0o5frQ ebST3fBNjsDR8pI/EPW2ERG4o+pwR8yP4S1fBnNLdnk/PLtAkVl6gEjYHuKy8te5fuYD /vYQ== X-Gm-Message-State: AIkVDXJvKg3pj9WkaTLzImlzs07XU0FZRgbVDgeRl1u13SRqzz+4ViaT9W0pDq/Ka/TUprVt X-Received: by 10.200.42.227 with SMTP id c32mr14648393qta.70.1484256132030; Thu, 12 Jan 2017 13:22:12 -0800 (PST) Received: from alvin.alvh.no-ip.org ([179.56.97.120]) by smtp.gmail.com with ESMTPSA id 14sm7569309qtp.19.2017.01.12.13.22.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Jan 2017 13:22:11 -0800 (PST) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id B14F11112; Thu, 12 Jan 2017 18:22:08 -0300 (CLST) Date: Thu, 12 Jan 2017 18:22:08 -0300 From: Alvaro Herrera To: Tom Lane Cc: Moshe Jacobson , Stephen Frost , daniele.varrazzo@gmail.com, pgsql-bugs@postgresql.org Subject: Re: BUG #14456: pg_dump doesn't restore permissions on tables belonging to an extension Message-ID: <20170112212208.2icg45ejn3hup5ts@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <18075.1484254811@sss.pgh.pa.us> User-Agent: NeoMutt/20161104 (1.7.1) X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Tom Lane wrote: > Moshe Jacobson writes: > > On Thu, Jan 12, 2017 at 2:01 PM Tom Lane wrote: > >> I think this scenario is simply pilot error, or at least gross abuse of > >> the extension system. If you dump and reload a DB containing an extension, > >> the extension definition that's fetched by CREATE EXTENSION is expected > >> to define (at least) all the objects that belonged to the extension in the > >> old DB. You can't just randomly ALTER EXTENSION and not update the > >> extension definition script to match. > > > The reason I add the dynamically-created tables to the extension is so that > > they are never included in the pg_dump output. If this is a gross abuse of > > the extension system, is there another way you can suggest to mark these > > tables as not-to-be-dumped? > > The extension mechanism definitely isn't meant to do that ;-). Maybe > you could put these not-to-dump tables in their own schema and exclude > that schema from pg_dump with -N? Is this related to this commit? https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=f2fcad27d59c8e5c48f8fa0a96c8355e40f24273 -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs