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