Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oh0QA-00047h-1y for pgsql-general@arkaria.postgresql.org; Sat, 08 Oct 2022 03:22:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oh0Q8-0002OQ-UQ for pgsql-general@arkaria.postgresql.org; Sat, 08 Oct 2022 03:22:36 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oh0Q8-0002N4-KC for pgsql-general@lists.postgresql.org; Sat, 08 Oct 2022 03:22:36 +0000 Received: from mail-oa1-x2f.google.com ([2001:4860:4864:20::2f]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oh0Q3-00042F-DE for pgsql-general@lists.postgresql.org; Sat, 08 Oct 2022 03:22:35 +0000 Received: by mail-oa1-x2f.google.com with SMTP id 586e51a60fabf-131dda37dddso7550391fac.0 for ; Fri, 07 Oct 2022 20:22:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:from:references:to:content-language:subject:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=U0d81iZ0D2RuGzlVyMtMctm8dLuPkm8ojT1qLCKeqZk=; b=dm25h0NUa5tIh/Y8ucJ4LXKp/cJuYq41PAgD9bMsSJ0RKFJh8MipXsa6fApz/ntntG IAiGPGu1CCLsxvLSKKkDV6rRAxy25qRMyyCnZgd3+LnyfC6khA27IiZisZNdlZukrNQ7 +IkYaDk6fZkVIoN3wg5FZ7tWeF8x1qS7ICtjGfXEElSiRP8DRt18nzTXYhlwTYcK1lnE fdl/rhSvj7prZaZNoXPe3ku+m5o1ofgfP2ccKfcr2jAdo+DsoYATHgnSJGQ1U22GcIDs dR6NbzI2kN0tXIu1DF3y25yc0fLU27bVF+AK5ucUci3tVS4w9sHHORZKS1WQur9TGWvu evLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:from:references:to:content-language:subject:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=U0d81iZ0D2RuGzlVyMtMctm8dLuPkm8ojT1qLCKeqZk=; b=u6fsu1qTvyJY9hHnA7kOrUhOoQ+LzAM87ArstV2CXndP9Fak9bniOd5v/Xpyik/h7h yaFpNoWM1Ouwvl+JQfhSCaKmt+gk9UgzzzRgVIFnDRbNN6fNeV8JFihpwNmNlmLxvl/0 rjW+/yDa3UaqRiBdYoyRZGRUkt1Ax5DDW9LiuL2ov5HJ4yodM0C75iZST0pV3D+mnBQT yqHL6PwTxlBYt5A68NN1yu9n9zZiGmi4nMRXFAtaANbnP+H5xE4JALaCJBIeQcqtMYzu Khj3bYuuiq0rtlRXDAzqZAujDget6R0dUgc4Wq/Vf5IVrVff1J+qd6qtoRNhuKqKx4hp 7RkQ== X-Gm-Message-State: ACrzQf0EEL67Qv1NGBwkcUqNiq3n7h3hiTTVgultyHBijWcISA4Sz3e2 cTWeX5UGEe5S/8138KPvNP3lo1ZOYmk= X-Google-Smtp-Source: AMsMyM6xNL35FJLLpdcFXQC8VUkBqPZIb48sKzSgkPs4/LJLaGd0OXZQQI9rjeyjygA8sJBq8hnoKA== X-Received: by 2002:a05:6870:d686:b0:12a:f869:cb90 with SMTP id z6-20020a056870d68600b0012af869cb90mr9613338oap.242.1665199350491; Fri, 07 Oct 2022 20:22:30 -0700 (PDT) Received: from [192.168.88.10] (ip68-11-68-85.no.no.cox.net. [68.11.68.85]) by smtp.googlemail.com with ESMTPSA id cy40-20020a056870b6a800b0011e37fb5493sm2294157oab.30.2022.10.07.20.22.29 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 07 Oct 2022 20:22:29 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------p318c0HDGvEhmVkrSUFlCBqZ" Message-ID: <9d1e5b21-d2ac-7972-722a-32970c7678a9@gmail.com> Date: Fri, 7 Oct 2022 22:22:29 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: Cannot convert partitioned table to a view Content-Language: en-US To: pgsql-general@lists.postgresql.org References: <2662605.1665064930@sss.pgh.pa.us> From: Ron In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------p318c0HDGvEhmVkrSUFlCBqZ Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 10/7/22 15:27, Kouber Saparev wrote: > На чт, 6.10.2022 г. в 17:02 ч. Tom Lane написа: > > That is an ancient backwards-compatibility hack that you should not > rely on, and most certainly shouldn't try to make use of from user > code.  It exists because very ancient versions of pg_dump didn't > know how to dump views as views.  We're more likely to rip it out > as no-longer-needed than to expand what it does. > > > Does that mean that the ability to point remote partitions to views (on > the remote side) will be forbidden in the future? Currently this feature > is saving a lot of work (and disk-space) for us, as it allows us to > introduce significant changes to the partitioned tables model without the > need to populate these changes on all the hundreds of past partitions that > do exist (and that we barely read anyway, that's why they reside on a > remote server). I think maybe you and Tom are talking about different things. Why do you need rules and views, when a regular old partitioned table can have foreign tables in it? -- Angular momentum makes the world go 'round. --------------p318c0HDGvEhmVkrSUFlCBqZ Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit On 10/7/22 15:27, Kouber Saparev wrote:
На чт, 6.10.2022 г. в 17:02 ч. Tom Lane <tgl@sss.pgh.pa.us> написа:
That is an ancient backwards-compatibility hack that you should not
rely on, and most certainly shouldn't try to make use of from user
code.  It exists because very ancient versions of pg_dump didn't
know how to dump views as views.  We're more likely to rip it out
as no-longer-needed than to expand what it does.

Does that mean that the ability to point remote partitions to views (on the remote side) will be forbidden in the future? Currently this feature is saving a lot of work (and disk-space) for us, as it allows us to introduce significant changes to the partitioned tables model without the need to populate these changes on all the hundreds of past partitions that do exist (and that we barely read anyway, that's why they reside on a remote server).

I think maybe you and Tom are talking about different things.

Why do you need rules and views, when a regular old partitioned table can have foreign tables in it?


--
Angular momentum makes the world go 'round.
--------------p318c0HDGvEhmVkrSUFlCBqZ--