Pergunta

I am getting the error of:

pg_restore: [archiver (db)] Error while INITIALIZING:
pg_restore: [archiver (db)] could not execute query: ERROR: unrecognized configuration parameter "idle_in_transaction_session_timeout"
Command was: SET idle_in_transaction_session_timeout = 0;

when i am trying to restore the data using

pg_restore -h 172.16.0.70 -U postgres -d newdb05aug19 -1  dirfrmt;

The postgres version is PostgreSQL 9.3.23

The pg_dump version is pg_dump (PostgreSQL) 9.3.23

The pg_restore version is pg_restore (PostgreSQL) 9.3.23

Foi útil?

Solução

The pg_dump version is pg_dump (PostgreSQL) 9.3.23

Is that the program which was used to generate the "dirfmrt" directory? It doesn't matter what pg_dump you have install locally, if the backup file came from somewhere else.

The version of the running postgresql server which was dumped, and the version of pg_dump used to dump it, are included in the dump. You can see them (as comments) using something like this:

pg_restore dirfrmt | head -n6

The pg_restore version is pg_restore (PostgreSQL) 9.3.23

While you may have that version of pg_restore installed somewhere in your system, it does not seem to be the one you are actually using to do the restore. Whether SET idle_in_transaction_session_timeout = 0; is emitted depends on the version of pg_restore used, and 9.3 does not emit it.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a dba.stackexchange
scroll top