Re: Add new error_action COPY ON_ERROR "log"

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Cc: torikoshia <torikoshia@oss.nttdata.com>, "David G. Johnston" <david.g.johnston@gmail.com>, jian.universality@gmail.com, Pgsql Hackers <pgsql-hackers@postgresql.org>, Alexander Korotkov <aekorotkov@gmail.com>
Date: 2024-03-07T07:24:26Z
Lists: pgsql-hackers
On Thu, Mar 07, 2024 at 12:48:12PM +0530, Bharath Rupireddy wrote:
> I'm okay with it. But, help me understand it better. We want the
> 'log_verbosity' clause to have options 'default' and 'verbose', right?
> And, later it can also be extended to contain all the LOG levels like
> 'notice', 'error', 'info' , 'debugX' etc. depending on the need,
> right?

You could, or names that have some status like row_details, etc.

> One more thing, how does it sound using both verbosity and verbose in
> log_verbosity verbose something like below? Is this okay?

There's some history with this pattern in psql at least with \set
VERBOSITY verbose.  For the patch, I would tend to choose these two,
but that's as far as my opinion goes and I am OK other ideas gather
more votes.
--
Michael

Commits

  1. Add new COPY option LOG_VERBOSITY.

  2. Add tests for more row patterns with COPY FROM .. (ON_ERROR ignore)

  3. Support writing "CREATE/ALTER TABLE ... SET STORAGE DEFAULT".