Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fzNJ2-0006Q7-Dk for pgsql-hackers@arkaria.postgresql.org; Mon, 10 Sep 2018 14:36:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fzNIz-0002YH-Sy for pgsql-hackers@arkaria.postgresql.org; Mon, 10 Sep 2018 14:36:45 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fzNIz-0002YA-98 for pgsql-hackers@lists.postgresql.org; Mon, 10 Sep 2018 14:36:45 +0000 Received: from mail-qk1-x743.google.com ([2607:f8b0:4864:20::743]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fzNIv-0007G5-Nq for pgsql-hackers@postgresql.org; Mon, 10 Sep 2018 14:36:43 +0000 Received: by mail-qk1-x743.google.com with SMTP id g13-v6so14483265qki.9 for ; Mon, 10 Sep 2018 07:36:41 -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=il8jdjngvhX5Id2CxGr/HI9YhszKgp/Y6Qm+iPjIdm4=; b=wZNR6wCAfmC7d8A1dPwq3j9FsYKtYrC6steNcysEKcHUjomG9SH+Daurr3XzSxWq+C EqN0Wp2Yko6I5k1MkxXGPdf7CsdaHMewSk3cC0xc6Da2yRCGxEEI6YhwJD0sgI8Llflh MbwH2UWW2XHTXBmN+wQeNcFTKLaG6n3G6PgOdh5obBS9neJgbY2WOJCMV81mUu7lA+tp DafVhB4b09UIirt3x0DhjoWYwTfY9XagueQLjp/LVVM39KBNwHkrJXhe1bUqC8Kv9WbB hE9oVO8OqJrkbVUtWaOhXku9lpgxhEOenOonKGxyFj4XNF6lhsWvlAqh9xn4wxowVMeS iV8w== 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=il8jdjngvhX5Id2CxGr/HI9YhszKgp/Y6Qm+iPjIdm4=; b=pcxyraSAf29cOIxssYBPybm2knfqg6UtOhEExOYOYfYwrHDob3k9xSVtTFC910S9Z2 NsOe/xdqmYuYNjszXVKPZRKF/MNlQ03QPHbN/LOw9YjzJP2oEm82jSNMfgdsAAesQMci d+JxoQLqRtGW1nU2Z+QiOM+tUAZupdo0cNb3E/YOAgt7coAntYvuCREGg57jGvepXFAX KXFGhN34d7asJQxWLIQjQlG24NM6OhpJlkgXB7tKLiO4iIkme/JlnzX7aWzDbjtAC1yD Hj80tNxgg6a+zCdDvxmaKlKDqkohu7Bs+qC6BXklo6dBMGDicoK/1/7ylNScYEzTLdI4 Cw2w== X-Gm-Message-State: APzg51COURPqEBjGJrqsr+6QM7YvZXfEPXFQMiVAxo5P4BUnlPAOENyo 5ACBAlPtlP4nK2h/FGZpjeMClg== X-Google-Smtp-Source: ANB0VdYb+Cx0EaoqEtjWL8vEvDTWN1/7BbCClFcwRy0dDAVp8H4Z2JRYIWpi2I2UP9Rtr8Z8oEmBbg== X-Received: by 2002:a37:58a:: with SMTP id 132-v6mr14924276qkf.271.1536590200772; Mon, 10 Sep 2018 07:36:40 -0700 (PDT) Received: from alvin.alvh.no-ip.org ([190.121.29.3]) by smtp.gmail.com with ESMTPSA id m190-v6sm8540446qkd.48.2018.09.10.07.36.40 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 10 Sep 2018 07:36:40 -0700 (PDT) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id 9FB7747C; Mon, 10 Sep 2018 11:36:37 -0300 (-03) Date: Mon, 10 Sep 2018 11:36:37 -0300 From: Alvaro Herrera To: Justin Pryzby Cc: Rajkumar Raghuwanshi , pgsql-hackers Subject: Re: cache lookup failed for constraint when alter table referred by partition table Message-ID: <20180910143637.3xscglivuau6mpz5@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180910124747.iqfyeccjnllijl4v@alvherre.pgsql> User-Agent: NeoMutt/20170306-137-4415bd-dirty (1.8.0) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2018-Sep-10, Alvaro Herrera wrote: > On 2018-Sep-10, Justin Pryzby wrote: > > > Adding Alvaro > > > > On Fri, Sep 07, 2018 at 04:02:13PM +0530, Rajkumar Raghuwanshi wrote: > > > postgres=# CREATE TABLE non_part (a INT,PRIMARY KEY(a)); > > > postgres=# CREATE TABLE part (a INT REFERENCES non_part(a)) PARTITION BY RANGE(a); > > > postgres=# CREATE TABLE part_p1 PARTITION OF part FOR VALUES FROM (MINVALUE) TO (MAXVALUE); > > > postgres=# ALTER TABLE non_part ALTER COLUMN a TYPE bigint; > > > *ERROR: cache lookup failed for constraint 16398* ATPostAlterTypeCleanup is trying to search the original constraint by OID in order to drop it, but it's not there -- I suppose it has already been dropped by recursion in a previous step. Not sure what the fix is yet, but I'll look into it later today. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services