Re: Prevent COPY FREEZE on Foreign tables

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: Sami Imseih <samimseih(at)gmail(dot)com>
Cc: Zhang Mingli <zmlpostgres(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Prevent COPY FREEZE on Foreign tables
Date: 2025-02-05 19:24:39
Message-ID: Z6O69xg5qNT7y4DW@nathan
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 COPY for 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Álvaro Herrera 2025-02-05 19:26:20 Re: Make COPY format extendable: Extract COPY TO format implementations
Previous Message Tom Lane 2025-02-05 19:20:59 Re: Windows CFBot is broken because ecpg dec_test.c error