Re: Prevent COPY FREEZE on Foreign tables - Mailing list pgsql-hackers

From Nathan Bossart
Subject Re: Prevent COPY FREEZE on Foreign tables
Date
Msg-id Z6O69xg5qNT7y4DW@nathan
Whole thread Raw
Responses Re: Prevent COPY FREEZE on Foreign tables
List pgsql-hackers
On Wed, Feb 05, 2025 at 01:05:32PM -0600, Sami Imseih wrote:
>> Instead of throwing an error, how about we turn that into a warning?
>> This way, if someone is batch-importing data for multiple tables, it won´t interrupt their script that generates a
COPYfor each table.
 
>> Is it better to give them a heads-up without making them modify their commands right away?
> 
> Hmm, I prefer we error out the transaction as it can be difficult
> to detect a warning and the user will assume that the
> transaction completed. Also, we currently error out when
> copy freeze is on a parent partition, so I rather we keep
> this behavior consistent.

Yeah, I'd rather error out than expect users to respond to warnings to the
effect of "hey, you told us to do something, but we did something else that
isn't what you asked us to do."  That both retains the broken feature and
adds more noise, neither of which seems desirable.

-- 
nathan



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Windows CFBot is broken because ecpg dec_test.c error
Next
From: Álvaro Herrera
Date:
Subject: Re: Make COPY format extendable: Extract COPY TO format implementations