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

2017-05-26 Thread Robert Haas
On Wed, May 24, 2017 at 10:00 AM, Nick Dro  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


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


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

2017-05-24 Thread 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 existLINE 3: from tablename ^QUERY:  select tablenameidfrom tablenamejoin 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') desclimit 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?