Обсуждение: [HACKERS] Error log for psql (uploading backup) in PostgreSQL 9.3.17

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

[HACKERS] Error log for psql (uploading backup) in PostgreSQL 9.3.17

От
Nick Dro
Дата:
Hi,
I should say that I'm haviing this issue since 9.3.2 I though it would be resolved when I upgrade to 9.3.17 but this still appear.
This is a very wierd issue.
 
I upload backups using pg_restore and
psql -h SERVER -U USERNAME -f backup.sql -q -d databasename -pPORT 2>errors.txt >output.txt
 
When I open the errors.txt file I see:
 
psql:backup.sql:43112523: ERROR:  relation "tablename" does not exist
LINE 3: from tablename
             ^
QUERY: 
select tablenameid
from tablename
join tablename_visable v using(statusid)
where id=$1
order by id,case statusidwhen 2 then 1 when 1 then 2 else 3 end, coalesce(rev,'-1') desc
limit 1
 
 
Now, the intresting thing is that tablename exists in the backup.
I can do:
select * from tablename
The table is OK, the data is OK. So I don't understand this error.
 
It looks like a wrong order of commands, maybe the creation of the table is done after it creates this code?
 
Why is this happens?

Re: [HACKERS] Error log for psql (uploading backup) in PostgreSQL 9.3.17

От
Robert Haas
Дата:
On Wed, May 24, 2017 at 10:00 AM, Nick Dro <postgresql@walla.co.il> wrote:
> Why is this happens?

From this amount of information, I can't tell you, and I suspect
nobody else can either.

https://wiki.postgresql.org/wiki/Guide_to_reporting_problems

Also, this isn't really the correct mailing list for this kind of
problem.  pgsql-general might be a better choice.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company