Error log for psql (uploading backup) in PostgreSQL 9.3.17

From: Nick Dro <postgresql(at)walla(dot)co(dot)il>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Error log for psql (uploading backup) in PostgreSQL 9.3.17
Date: 2017-05-24 14:00:20
Message-ID: ~002592591F44E40D300B181@walla.co.il
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

<div dir='rtl'><div>
<div dir="ltr">Hi,</div>
<div dir="ltr">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<b> still appear</b>.</div>
<div dir="ltr">This is a very wierd issue.</div>
<div dir="ltr">&nbsp;</div>
<div dir="ltr">I upload backups using pg_restore and</div>
<div dir="ltr">psql -h SERVER&nbsp;-U USERNAME -f backup.sql -q -d databasename -pPORT 2&gt;errors.txt &gt;output.txt</div>
<div dir="ltr">&nbsp;</div>
<div dir="ltr">When I open the errors.txt file I see:</div>
<div dir="ltr">&nbsp;</div>
<div dir="ltr">psql:backup.sql:43112523: ERROR:&nbsp; relation "tablename" does not exist<br />LINE 3: from tablename<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ^<br />QUERY:&nbsp; <br />select tablenameid<br />from tablename<br />join tablename_visable v using(statusid)<br />where id=$1 <br />order by id,case statusidwhen 2 then 1 when 1 then 2 else 3 end, coalesce(rev,'-1') desc<br />limit 1</div>
<div dir="ltr">&nbsp;</div>
<div dir="ltr">&nbsp;</div>
<div dir="ltr">Now, the intresting thing is that&nbsp;tablename exists in the backup.</div>
<div dir="ltr">I can do:</div>
<div dir="ltr">select * from tablename</div>
<div dir="ltr">The table is OK, the data is OK. So I don't understand this error.</div>
<div dir="ltr">&nbsp;</div>
<div dir="ltr">It looks like a wrong order of commands, maybe the creation of the table is done after it creates this code?</div>
<div dir="ltr">&nbsp;</div>
<div dir="ltr">Why is this happens?</div>
</div></div>

Attachment Content-Type Size
unknown_filename text/html 1.5 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2017-05-24 14:24:19 Re: [HACKERS] Concurrent ALTER SEQUENCE RESTART Regression
Previous Message Andres Freund 2017-05-24 13:51:32 Re: Index created in BEFORE trigger not updated during INSERT