Re: Add on_error and log_verbosity options to file_fdw

From: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
To: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
Cc: torikoshia <torikoshia(at)oss(dot)nttdata(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add on_error and log_verbosity options to file_fdw
Date: 2024-10-02 06:34:33
Message-ID: 9fb4e232-88dc-4554-8a4f-ba307a52f9da@oss.nttdata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2024/10/02 9:27, Masahiko Sawada wrote:
> Sorry for being late in joining the review of this patch. Both 0001
> and 0003 look good to me. I have two comments on the 0002 patch:

Thanks for the review!

> I think that while scanning a file_fdw foreign table with
> log_verbosity='silent' the query is not interruptible.

You're right. I added CHECK_FOR_INTERRUPTS() in the retry loop.

> Also, we don't switch to the per-tuple memory context when retrying
> due to a soft error. I'm not sure it's okay as in CopyFrom(), a
> similar function for COPY command, we switch to the per-tuple memory
> context every time before parsing an input line. Would it be
> problematic if we switch to another memory context while parsing an
> input line? In CopyFrom() we also call ResetPerTupleExprContext() and
> ExecClearTuple() for every input, so we might want to consider calling
> them for every input.

Yes, I've updated the patch based on your comment.
Could you please review the latest version?

Regards,

--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION

Attachment Content-Type Size
v7-0001-Add-log_verbosity-silent-support-to-COPY-command.patch text/plain 6.7 KB
v7-0002-file_fdw-Add-on_error-and-log_verbosity-options-t.patch text/plain 10.0 KB
v7-0003-Refactor-CopyFrom-in-copyfrom.c.patch text/plain 3.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Yugo NAGATA 2024-10-02 06:39:54 Re: Enhance create subscription reference manual
Previous Message Hayato Kuroda (Fujitsu) 2024-10-02 06:33:50 RE: Conflict detection for update_deleted in logical replication