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 1lhFnj-0007Ra-E9 for pgsql-bugs@arkaria.postgresql.org; Thu, 13 May 2021 18:11:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lhFni-0004Cp-8b for pgsql-bugs@arkaria.postgresql.org; Thu, 13 May 2021 18:11:10 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lhFni-0004Cg-22 for pgsql-bugs@lists.postgresql.org; Thu, 13 May 2021 18:11:10 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lhFnc-000797-Mm for pgsql-bugs@lists.postgresql.org; Thu, 13 May 2021 18:11:08 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 14DIB1YW1578748; Thu, 13 May 2021 14:11:01 -0400 From: Tom Lane To: Alvaro Herrera cc: jacevedo@we-techs.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17008: pg_dump doesn't dump a sequence with bigint type In-reply-to: <20210513165259.GA13629@alvherre.pgsql> References: <20210513165259.GA13629@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Thu, 13 May 2021 12:52:59 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1578746.1620929461.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Thu, 13 May 2021 14:11:01 -0400 Message-ID: <1578747.1620929461@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Alvaro Herrera writes: > On 2021-May-13, PG Bug reporting form wrote: >> I'm using pg_dump to dump my database version 12.5 (RDS), pg_dump versi= on >> 12.6 but I have a the following table = > How did you get this table definition? Indeed. It seems unlikely to me that this is pg_dump's fault; I think it's just reporting the way things are in the source database. If projects_historydata_id_seq is the wrong width, that's probably because it was manually created that way and then manually attached to projects_historydata.id. > I suggest to run this: > ALTER SEQUENCE projects_historydata_id_seq OWNED BY public.projects_hi= storydata.id = > and then things will work better. This won't in itself fix the sequence's width; you'd need to do some additional ALTERs if that's wrong. regards, tom lane