Re: proposal: possibility to read dumped table's name from file - Mailing list pgsql-hackers

From Erik Rijkers
Subject Re: proposal: possibility to read dumped table's name from file
Date
Msg-id 32dbe249-8421-f54e-cacf-39c308c59dd9@xs4all.nl
Whole thread Raw
In response to Re: proposal: possibility to read dumped table's name from file  (Erik Rijkers <er@xs4all.nl>)
Responses Re: proposal: possibility to read dumped table's name from file  (Daniel Gustafsson <daniel@yesql.se>)
List pgsql-hackers
On 10/1/21 6:19 PM, Erik Rijkers wrote:
> On 10/1/21 3:19 PM, Daniel Gustafsson wrote:
>>
>> As has been discussed upthread, this format strikes a compromise wrt 
>> simplicity
>> and doesn't preclude adding a more structured config file in the 
>> future should

> 
> If you try to dump/restore a foreign file from a file_fdw server, the 
> restore step will complain and thus leave the returnvalue nonzero. The 
> foreign table will be there, with complete 'data'.
> 
> A complete runnable exampe is a lot of work; I hope the below bits of 
> input and output makes the problem clear.  Main thing: the pg_restore 
> contains 2 ERROR lines like:
> 
> pg_restore: error: COPY failed for table "ireise1": ERROR:  cannot 
> insert into foreign table "ireise1"

Further testing makes clear that the file_fdw-addressing line
   include foreign_data goethe
was the culprit: it causes a COPY which of course fails in a readonly 
wrapper like file_fdw. Without that line it works (because I run the 
restore on the same machine so the underlying file_fdw .txt files are 
there for testdb2 too)

So the issue is not as serious as it seemed.  The complaint remaining is 
only that this could somehow be documented better.

I attach a running example (careful, it deletes stuff)  of the original 
ERROR-producing bash (remove the 'include foreign_data' line from the 
input file to run it without error).

thanks,

Erik Rijkers




Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Deduplicate code updating ControleFile's DBState.
Next
From: Sergey Shinderuk
Date:
Subject: Re: pgcrypto support for bcrypt $2b$ hashes