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 1hIdUd-0004d6-6m for pgsql-hackers@arkaria.postgresql.org; Mon, 22 Apr 2019 18:16:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hIdUb-0005Zz-J9 for pgsql-hackers@arkaria.postgresql.org; Mon, 22 Apr 2019 18:16:37 +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 1hIdUb-0005Zs-5q for pgsql-hackers@lists.postgresql.org; Mon, 22 Apr 2019 18:16:37 +0000 Received: from mail-qt1-x844.google.com ([2607:f8b0:4864:20::844]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hIdUX-0002IT-Rh for pgsql-hackers@lists.postgresql.org; Mon, 22 Apr 2019 18:16:36 +0000 Received: by mail-qt1-x844.google.com with SMTP id d13so13128663qth.5 for ; Mon, 22 Apr 2019 11:16:33 -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=3jBZuVBZ9rjvaPEgI9djLNtI+L3TEY/Q/yHyoK/DIkk=; b=sZJ65xVXWxGH6uZceyXEUBbPfmcaSEo0ERNg3o9oSUtG7qObCvcUfehHjYuv3HEJIb AvwyECMYl5HTod7bZYJJtDQTAXxePBE8+91z+s6IxPU33NyoX8P9mxEqb47hjEkIxCLK tdVYJoEJ4jEmRvhXcBmPSv9+K/PdI28bsCvOMCJEaI6bAr1VAAoeC1COXWD2E3JW3GGi dLVwRZ34oz349zLCJzT2vhhy9MvjLZ8htwsmnKZzTwh+jsSET7swDe/j3Z1yk50qpO6d 0iV6h6V6E3bYE4dwg13uGicp2vb2+qdmkkoJWs+EyADbvzB1Z5BzeumQPQ/wBFkexoiO h3mA== 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=3jBZuVBZ9rjvaPEgI9djLNtI+L3TEY/Q/yHyoK/DIkk=; b=HW8KK9eC8CRqpoBI9JiQ4+kXPBGhb/ObjBI8HFy3P1V1/GffxuElcllemUwyy41Rbh snObGyR7vYn3ESjZ1TvscUsoyFGojKj652KEscgpBbTcQ8M/lKgwkNqZxkfREFvRc3/6 B0kfIrRdM5L0H7qA1g2W6bPKunIqB+ywrM7cOwfJfoNCmD7/mp1B/TrFaEpSlGpNiAg8 G3L8LANxpYtFEOBOatZmgI8YIegCZP6E69FJwAJLz+nPrfzzMvBvv/TDYK1CWAq2LAtx B9uah35TBSd7DqcI5YkHVJ71Whq3nqxeCREC1/M5CXt7Y0yEiQAByJuojZ2TtH6DnIUu P85Q== X-Gm-Message-State: APjAAAX+o1YfFVMGwwMdxlNd8lcpzzcMEP8xnB5eBdoj1cB/FpXWb/C7 NuRgQK1SCUP54MXfwuFh9Rl2bw== X-Google-Smtp-Source: APXvYqzqx1lpOYQeAVZqP6TwX/gW7+MPlRLdUirwYPpKbqr//g/KC6+bIpJgKCBNP1tENIIqV7Senw== X-Received: by 2002:a0c:a906:: with SMTP id y6mr3151958qva.185.1555956991513; Mon, 22 Apr 2019 11:16:31 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([179.56.48.227]) by smtp.gmail.com with ESMTPSA id y18sm2166276qtm.47.2019.04.22.11.16.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 22 Apr 2019 11:16:30 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 3ED3012069F; Mon, 22 Apr 2019 14:16:28 -0400 (-04) Date: Mon, 22 Apr 2019 14:16:28 -0400 From: Alvaro Herrera To: Robert Haas Cc: Tom Lane , David Rowley , Andres Freund , PostgreSQL Hackers Subject: Re: pg_dump is broken for partition tablespaces Message-ID: <20190422181628.GA29329@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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-22, Robert Haas wrote: > PostgreSQL has historically and very deliberately *not made a > distinction* between "this object is in the default tablespace" and > "this object is in tablespace X which happens to be the default." I > think that it's too late to invent such a distinction for reasons of > backward compatibility -- and if we were going to do it, surely it > would need to exist for both partitioned tables and the partitions > themselves. Otherwise it just produces more strange inconsistencies. Yeah, this is probably right. (I don't think it's the same thing that Tom was saying, though, or at least I didn't understand his argument this way.) I think we can get out of this whole class of problems by forbidding the TABLESPACE clause for partitioned rels from mentioning the database tablespace -- that is, users either mention some *other* tablespace, or partitions follow default_tablespace like everybody else. AFAICS with that restriction this whole problem does not arise, and the patch may become simpler. I'll give it a spin. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services