Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hDzo9-0001V4-Rq for pgsql-hackers@arkaria.postgresql.org; Tue, 09 Apr 2019 23:05:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hDzo7-0003EH-6R for pgsql-hackers@arkaria.postgresql.org; Tue, 09 Apr 2019 23:05:35 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1hDzo6-0003Dv-UB for pgsql-hackers@lists.postgresql.org; Tue, 09 Apr 2019 23:05:34 +0000 Received: from mail-qk1-x741.google.com ([2607:f8b0:4864:20::741]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hDzo3-0001Wz-Hk for pgsql-hackers@lists.postgresql.org; Tue, 09 Apr 2019 23:05:34 +0000 Received: by mail-qk1-x741.google.com with SMTP id c20so71337qkc.10 for ; Tue, 09 Apr 2019 16:05:31 -0700 (PDT) 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=PkWKpweTLVFAA6IhWtnHESjzkuoXBdduM9UYDrlYmUs=; b=X/ACEOxhT1jP/SKpBv9T2BYwKpAm6F+ucujKyvRL1+l4QIMcf4PecNfS0VFvWFHOoR xeQJ0AlxoRU0l1HeOehoMswUrGFl892GBuWC9rvBMIEtp96VpEZTKLVSWH2OhQpEjo8s 60Ng1ogNtVX/21diU/IlDiqcX49xwOPFld7Bc3zqtPL92T129eQju33hM3UtnPRBPcAY 1XX+aU9Lyy2VwWQdnSQjYSNDB3PpgNHmalVqnQl7pov4D5w96TsFy89tTsbTJsWX3DZL BVL2wAahn+e/d5FgxnruIWp8TVANWYa468XY/862Ida73S973kXpAQ1ozAzLaXqhicDq wlvg== 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=PkWKpweTLVFAA6IhWtnHESjzkuoXBdduM9UYDrlYmUs=; b=YHUHLIdFCwqTDAhKOn28zOMyW07WBqHDaCRkObU6hbmG8lueO+fnKdSlj0ds831ILy xe1zZMOHi733wWAupNCFcVMNNNerTp7tSm2jxfvuw2Dda5UtYUmy3xG+n9ariTrHlQmH laST5YV19zkKDQKB/GNcASv68IHerD4khZ9DkbCHaWd+Pp3YUeMiYmwraEDt0yauEBvh 71p5MNYOfxFyQi5ivBimmhWtD+mHCnrDKemjHw97HgeIWnk10r7Ks+SVkhELS+gvQV1d 44ogjXbAXvso5ZQdE4mXU5s9baSQGEPc9aKCb67prMuAXhbTJI1HzyjbckaIK13i4TSX WHZA== X-Gm-Message-State: APjAAAXllkrqDSiKMzNcdWpTe9NISQL+ryyBQh27XHRvumDNnb++JnO4 Ia8FaWpNBT/AWFHLd7N5D9K1sg== X-Google-Smtp-Source: APXvYqx5rd3JYnZgbwF/9alTIL9U+PnG2QYORadz2YNWhwv2kV/Lmi01WvSGzRUWgTwd8uba0LcX2g== X-Received: by 2002:ae9:f308:: with SMTP id p8mr29133754qkg.33.1554851129835; Tue, 09 Apr 2019 16:05:29 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([190.121.29.3]) by smtp.gmail.com with ESMTPSA id o52sm21837558qtk.67.2019.04.09.16.05.29 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 09 Apr 2019 16:05:29 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 89D611214F4; Tue, 9 Apr 2019 19:05:27 -0400 (-04) Date: Tue, 9 Apr 2019 19:05:27 -0400 From: Alvaro Herrera To: Andres Freund Cc: David Rowley , PostgreSQL Hackers Subject: Re: pg_dump is broken for partition tablespaces Message-ID: <20190409230527.GA15484@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190409225842.GA14993@alvherre.pgsql> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2019-Apr-09, Alvaro Herrera wrote: > There is one deficiency that needs to be solved in order for this to > work fully: currently there is no way to reset "reltablespace" to 0. Therefore I propose to add ALTER TABLE tb ... RESET TABLESPACE; which sets reltablespace to 0, and it would work only for partitioned tables and indexes. That, together with the initial proposal by David, seems to me to solve the issue at hand. If no objections, I'll try to come up with a patch tomorrow. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services