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 1h9sDk-0006A8-Jz for pgsql-bugs@arkaria.postgresql.org; Fri, 29 Mar 2019 14:11:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h9sDj-0001sh-7r for pgsql-bugs@arkaria.postgresql.org; Fri, 29 Mar 2019 14:10:59 +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 1h9sDi-0001sa-S6 for pgsql-bugs@lists.postgresql.org; Fri, 29 Mar 2019 14:10:59 +0000 Received: from mail-qk1-x744.google.com ([2607:f8b0:4864:20::744]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h9sDf-0000MD-UP for pgsql-bugs@lists.postgresql.org; Fri, 29 Mar 2019 14:10:58 +0000 Received: by mail-qk1-x744.google.com with SMTP id c1so1427191qkk.4 for ; Fri, 29 Mar 2019 07:10:55 -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=hCHQchpuFigtvv2bzg7t/QVjhM7yRCJQeGubo4IIQy0=; b=yenhd0DOBnEyPVxwX3U3kheOfsjQE/p0WR6kXXPWK9pL4RjrAD1foEOPx1OWxhfZM5 W1ZOtlRBslDIn0Kyb5GilwvYUf+pcfKlU7A6C45GTCuxEESTz5Sy1Q6/GIAKMX9KqtH1 X3NGWXR3DrjmfQdEbQSKMhaV9rlkUNUyKulJf2bj7gPFSd1YRZ+ilRX3In1ZNU4pcz2d VxRi9nJIMmz2vWgLDmTlY7IaePJlzCrE7gGtsrczJuI8DRvW2JRxHHFwYLYJLHc4srSq AIFi4efcCrpKpKaT2qB2qvYiIetdOtt2VNnXknw3QiWPCSGCb5DgORlAMSeqpksS3aTm LbIQ== 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=hCHQchpuFigtvv2bzg7t/QVjhM7yRCJQeGubo4IIQy0=; b=Ja6rUI+MSZJWQ4aX1J8XQMVrpvxtyXce2QIJS+JHmYLXEgl+QQw9lsHzIkS3puKSOO 7sUwfr8cFKI6QUOgYCCD5SsltkxnsHkvvsM9aOQ9z9g5d5qzQ65GAH5H3e9DvzbUwgVp rb5vBH1WDA1DJyhS/AI9tmsvYPHwV+9q/uHnXcVZc5mtYsDzrCymeU7EQV1zKkYXLl6Z sWg70oqRqKaCGY3ZYTyTDNgj/r8J9gUX277kqJSM0/1qobCcgnTGvjLv8WMw6XlHr4/O /lakQ3pvBw9xkzkT9HstHGONh/NJVxCBkpDj0A+FVHfKEeu/DCkt71lSffdNLUJZLtAc 7lYw== X-Gm-Message-State: APjAAAWTguE3PpIlAtjFtpAqsmEmSRZsbioXGngSCHFt+/VmchJYtxHv svGDpEYmH8ItgYM+idawz30MkEL5INFknhwpavMVcymCmrVgRJVY6f/fodiKEWMKNQRxuZK+Q+F DlsbP/uS0CG2EsbeWB7o7EAhY+eQ/CRJbKeNVtHHd5kiNZBX1oNsmExEFrqcfGzCnLRXA6K9Gn8 OsD27HCFSmoA== X-Google-Smtp-Source: APXvYqzRvt4znJvpt6ienSH4JdPrGXXOUKODSAInIcw0g8CFXxqdl7OCfDt+zCQq8w0UaW0mS4+nlw== X-Received: by 2002:ae9:ef07:: with SMTP id d7mr22498507qkg.100.1553868654058; Fri, 29 Mar 2019 07:10:54 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([190.121.29.3]) by smtp.gmail.com with ESMTPSA id f29sm1362169qte.1.2019.03.29.07.10.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Mar 2019 07:10:53 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 13219120A6D; Fri, 29 Mar 2019 11:10:50 -0300 (-03) Date: Fri, 29 Mar 2019 11:10:50 -0300 From: Alvaro Herrera To: Tom Lane Cc: stepya@ukr.net, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15724: Can't create foreign table as partition Message-ID: <20190329141050.GA22336@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <21389.1553868091@sss.pgh.pa.us> 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-Mar-29, Tom Lane wrote: > Alvaro Herrera writes: > > On 2019-Mar-29, PG Bug reporting form wrote: > >> SQL Error [42809]: ERROR: cannot create index on foreign table "msg_json" > > > Ah, this is because we try to propagate the index to the partition, > > which appears to be less than desirable. Maybe this patch fixes it? I > > have not tested it, only verified that it compiles. > > Really, what *ought* to happen in such a case is that the FDW gets > told about the command and has the opportunity to try to do something > corresponding to making an index. But that smells like a new feature > rather than a bug fix. ENOTIME to get it done for pg12 I suppose (I don't know a thing about postgres_fdw or the FDW API layer). > I'm not sure that just forcing the case to be a no-op is wise. > What if the index is supposed to be UNIQUE? Hmm, good point, that should be disallowed too. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services