Re: BUG #17008: pg_dump doesn't dump a sequence with bigint type

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: BUG #17008: pg_dump doesn't dump a sequence with bigint type
Дата
Msg-id 20210513165259.GA13629@alvherre.pgsql
обсуждение исходный текст
Ответ на BUG #17008: pg_dump doesn't dump a sequence with bigint type  (PG Bug reporting form <noreply@postgresql.org>)
Ответы Re: BUG #17008: pg_dump doesn't dump a sequence with bigint type  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
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



В списке pgsql-bugs по дате отправления:

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: BUG #17008: pg_dump doesn't dump a sequence with bigint type
Следующее
От: varun kamal
Дата:
Сообщение: Re: BUG #17007: server process (PID XXXX) was terminated by signal 11: Segmentation fault