Обсуждение: pg_restore error Command was: CREATE OPERATOR ~> ( PROCEDURE =plv8x.json_eval_ls,

Поиск
Список
Период
Сортировка

pg_restore error Command was: CREATE OPERATOR ~> ( PROCEDURE =plv8x.json_eval_ls,

От
pavna
Дата:
When I pg_restore I get  errors. 
Postgres version :  PostgreSQL 9.4.0 on x86_64-unknown-linux-gnu, compiled
by gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2, 64-bit
plv8.version : 1.5.0-dev1

pg_restore: processing item 2532 OPERATOR |
pg_restore: creating OPERATOR |
pg_restore: processing item 2533 OPERATOR |
pg_restore: creating OPERATOR |
pg_restore: processing item 2536 OPERATOR |>
pg_restore: creating OPERATOR |>
pg_restore: processing item 2537 OPERATOR |>
pg_restore: creating OPERATOR |>
pg_restore: [archiver (db)] Error from TOC entry 2537; 2617 27562 OPERATOR
|> employeeDB
pg_restore: [archiver (db)] could not execute query: ERROR:  argument of
commutator must be a name
    Command was: CREATE OPERATOR |> (
    PROCEDURE = plv8x.json_eval,
    LEFTARG = plv8x.json,
    RIGHTARG = text,
    COMMUTATOR = 27561
...
pg_restore: processing item 2534 OPERATOR ~
pg_restore: creating OPERATOR ~
pg_restore: processing item 2540 OPERATOR ~>
pg_restore: creating OPERATOR ~>
pg_restore: [archiver (db)] Error from TOC entry 2540; 2617 27566 OPERATOR
~> employeeDB
pg_restore: [archiver (db)] could not execute query: ERROR:  argument of
commutator must be a name
    Command was: CREATE OPERATOR ~> (
    PROCEDURE = plv8x.json_eval_ls,
    LEFTARG = plv8x.json,
    RIGHTARG = text,
    COMMUTATOR = 275...
pg_restore: processing item 2535 OPERATOR ~~
pg_restore: creating OPERATOR ~~
pg_restore: processing item 2670 OPERATOR CLASS gist__int_ops
pg_restore: creating OPERATOR CLASS gist__int_ops
pg_restore: processing item 347 TABLE account_setting
pg_restore: creating TABLE account_setting
pg_restore: processing item 348 SEQUENCE account_setting_id_seq
pg_restore: creating SEQUENCE account_setting_id_seq
pg_restore: processing item 4780 SEQUENCE OWNED BY account_setting_id_seq
pg_restore: creating SEQUENCE OWNED BY account_setting_id_seq






--
Sent from: http://www.postgresql-archive.org/PostgreSQL-admin-f2076596.html


Re: pg_restore error Command was: CREATE OPERATOR ~> ( PROCEDURE = plv8x.json_eval_ls,

От
Tom Lane
Дата:
pavna <daryani.bhawna@gmail.com> writes:
> When I pg_restore I get  errors. 

> pg_restore: [archiver (db)] could not execute query: ERROR:  argument of
> commutator must be a name
>     Command was: CREATE OPERATOR |> (
>     PROCEDURE = plv8x.json_eval,
>     LEFTARG = plv8x.json,
>     RIGHTARG = text,
>     COMMUTATOR = 27561
> ...

Seems like there's something broken in your source database, ie that
operator has a commutator link that didn't point to an existing operator.
Hard to say any more than that with no more information.

            regards, tom lane


Thanks Tom for your response! Is there a way to examine the backup to find
what was missing?  



--
Sent from: http://www.postgresql-archive.org/PostgreSQL-admin-f2076596.html


Re: pg_restore error Command was: CREATE OPERATOR ~> ( PROCEDURE = plv8x.json_eval_ls,

От
Tom Lane
Дата:
pavna <daryani.bhawna@gmail.com> writes:
> Thanks Tom for your response! Is there a way to examine the backup to find
> what was missing?  

Well, it's whatever was the commutator for that operator.  Evidently it
got dropped somewhere along the way.

It's a bit curious that you have this situation, though.  AFAICS,
dropping an operator should result in clearing the oprcom link from
its commutator sibling.  Perhaps there's some sequence of operations
that that logic fails to handle?  It'd be interesting if you can show
a way to reproduce this case.

            regards, tom lane