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 1lhEaD-0004I0-Vt for pgsql-bugs@arkaria.postgresql.org; Thu, 13 May 2021 16:53:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lhEaC-0007P0-T4 for pgsql-bugs@arkaria.postgresql.org; Thu, 13 May 2021 16:53:08 +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 1lhEaC-0007Or-MR for pgsql-bugs@lists.postgresql.org; Thu, 13 May 2021 16:53:08 +0000 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lhEaA-0006Rl-9S for pgsql-bugs@lists.postgresql.org; Thu, 13 May 2021 16:53:08 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 6E73929BA; Thu, 13 May 2021 12:53:03 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 13 May 2021 12:53:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=GeshObW8r9iwYLGqlrF+53Nqho3EvUkUYkro19TZRzQ=; b=LOKoHf3Z usxbib5c5DYLagKfFJgIB108PwvJAxkO81cLQtuxdWpMGoROF7B139+NSilMvyx+ vQZyH838sFA8coEtLdig2djCBOn4p5b9Wmbd/p8Ax1n5GY8QZhTTWhl7thrETbyD Syb5IT579z05t4y9oOl01vMthUr+ccmEY7aQkDDgRYTamPeAU7I7g3Yfq9RdziBt 9IIX4cdgnsOn0XeSZaHaXVr6qmJr0GoN1W6u6PtNXbZ/8Zl+BwzPmycECoUbGZe9 8NJ26fKM2LuDD94zMfTpLcf6SL09DETGezLMr/RsZ+bk7k+suvcSAKeb5R0wa7lh AqgUilHz55j2rw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdehgedguddthecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepfffhvffukfggtggugfgjfgesth ekredttderudenucfhrhhomheptehlvhgrrhhoucfjvghrrhgvrhgruceorghlvhhhvghr rhgvsegrlhhvhhdrnhhoqdhiphdrohhrgheqnecuggftrfgrthhtvghrnhepueffhfejie euueffgedvudekgeeltdeviedvieeufeeiieevgfetheeufeethedvnecukfhppeduledt rdelhedrudelrdelheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Received: from perhan.alvh.no-ip.org (unknown [190.95.19.95]) by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 13 May 2021 12:53:02 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id AC7EF2A0ADC; Thu, 13 May 2021 12:52:59 -0400 (-04) Date: Thu, 13 May 2021 12:52:59 -0400 From: Alvaro Herrera To: jacevedo@we-techs.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17008: pg_dump doesn't dump a sequence with bigint type Message-ID: <20210513165259.GA13629@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <17008-85b49d6fe6276a92@postgresql.org> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2021-May-13, PG Bug reporting form wrote: > I'm using pg_dump to dump my database version 12.5 (RDS), pg_dump version > 12.6 but I have a the following table > > CREATE TABLE public.projects_historydata > ( > id bigint NOT NULL DEFAULT > nextval('projects_historydata_id_seq'::regclass), > value double precision NOT NULL, > value_at timestamp with time zone NOT NULL, > var_id integer NOT NULL, > created timestamp with time zone NOT NULL, > CONSTRAINT projects_historydata_pkey PRIMARY KEY (id), > CONSTRAINT projects_historydata_var_id_21f99477_fk_projects_var_id > FOREIGN KEY (var_id) > REFERENCES public.projects_var (id) MATCH SIMPLE > ON UPDATE NO ACTION > ON DELETE NO ACTION > DEFERRABLE INITIALLY DEFERRED > ) > > WITH ( > autovacuum_enabled = TRUE > ) > TABLESPACE pg_default; Hello Jaime How did you get this table definition? I suggest to run this: ALTER SEQUENCE projects_historydata_id_seq OWNED BY public.projects_historydata.id and then things will work better. Cheers -- Álvaro Herrera Valdivia, Chile