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 1oYWhO-0004Kl-31 for pgsql-admin@arkaria.postgresql.org; Wed, 14 Sep 2022 18:01:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oYWhL-0007rR-O8 for pgsql-admin@arkaria.postgresql.org; Wed, 14 Sep 2022 18:01:19 +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 1oYWhL-0007rI-BA for pgsql-admin@lists.postgresql.org; Wed, 14 Sep 2022 18:01:19 +0000 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oYWhI-0000q7-GM for pgsql-admin@lists.postgresql.org; Wed, 14 Sep 2022 18:01:18 +0000 Received: by mail-ej1-x632.google.com with SMTP id a26so7918063ejc.4 for ; Wed, 14 Sep 2022 11:01:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date; bh=9uC3tBMhbgSzFq9f0KOpdULFTX13aLulrstziFunNC0=; b=Yk3EjTnF6Ef/qaqsWZhqXPv5RslBie5Y1DG/oDwNXAW79874GspyVswsdCUFBHL/+6 i4ueLU0apMlqEEeK3MdU8mOsEJplkXwIhFlTXGZ3h3BFTFMWxBWvJ5O5RdByw6Hgh6Nl oyX+p2yMmfd7iR1GxWMvEtsgD0OKD03PV7WEPohaZM25klZpXAuel78kNkUriPEvoEFt 9WKHEpb+ClAmu8KHG9jPehPA8qvbeyoj5tMq1/K+OwCF5tx25smJsO0y85B4Oph/y/H/ rptL/LguUc7FgKxZEXtaqv8FTyn6x2iM+AmFoO9XUlhWGjo732xMqNLGQh+mpEzFBSj4 qSXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:date:to:from:subject:message-id:x-gm-message-state:from :to:cc:subject:date; bh=9uC3tBMhbgSzFq9f0KOpdULFTX13aLulrstziFunNC0=; b=vyLRmwNXxqYf2EyDcKlWvkj/cALklnQDb30DJL/1sY+47Cs8FE5/sWcBio21cZYyck e2daK/w4glHN9zbXV3aksONjhCWtcnrrpScxJpMEUhFNuviWCfJJxd0T6LkxJyC0/242 LpBA08NREWL0zY73I8KXj32AQth7aOcHQz88vsgpA/fRBz5zMJabDx9G261O/AMn/SVy PTpty137bNsnmXmMuAQLgoLuP5RwP7jQynFFWnqkr7OT2CNVMt9BzMHr+YbdpelF1HEN lNtdu7wNZVx3WyJ6zomlv0kQv/WD0p90wsKU3JODqoXlaQYdRSElCTxFMpXMteC6NKAr xfZg== X-Gm-Message-State: ACgBeo1bWPnTNO9hZIGjusOB1Kpn31L+3HEwggtzjc5S34swZDnFTGDT 1LGta5Z4crXgzKTM43cxO0InAE7rlV26GA== X-Google-Smtp-Source: AA6agR7JGXgmB3qdzOwS86JgL3zdc0MSUQtCPmSGetsprZlEJe3V6y4SSyv/f3p7JJ7OFQJVPkUIcA== X-Received: by 2002:a17:907:3da9:b0:77b:9672:3f7f with SMTP id he41-20020a1709073da900b0077b96723f7fmr14714222ejc.636.1663178473487; Wed, 14 Sep 2022 11:01:13 -0700 (PDT) Received: from localhost.localdomain (178-190-170-195.adsl.highway.telekom.at. [178.190.170.195]) by smtp.gmail.com with ESMTPSA id s10-20020a508dca000000b0044bfdbd8a33sm10009562edh.88.2022.09.14.11.01.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Sep 2022 11:01:13 -0700 (PDT) Message-ID: Subject: Re: Local parent table and Foreign table(s) as partition(s), is it possible? From: Laurenz Albe To: Sbob , Pgsql-admin Date: Wed, 14 Sep 2022 20:01:11 +0200 In-Reply-To: <25206e71-b388-3c51-ce17-5fd0912398eb@quadratum-braccas.com> References: <25206e71-b388-3c51-ce17-5fd0912398eb@quadratum-braccas.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.4 (3.42.4-2.fc35) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, 2022-09-14 at 11:41 -0600, Sbob wrote: > I see the below options in the CREATE FOREIGN TABLE, however I assume these would both connect > to a master/parent table on the foreign server. Is it possible to have a Foreign Table that > acts as a partition of a local parent table, via either method (INHERITS or PARTITION OF)? Yes, exactly: a foreign table can be a partition of a local partitioned table. This can be used to implement sharding, if the foreign data wrapper supports the "parallel append" node introduced in PostgreSQL v14. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com