Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tVQ7x-008D75-If for pgsql-hackers@arkaria.postgresql.org; Wed, 08 Jan 2025 07:05:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tVQ7w-00E7qV-Lk for pgsql-hackers@arkaria.postgresql.org; Wed, 08 Jan 2025 07:05:16 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tVQ7w-00E7qN-By for pgsql-hackers@lists.postgresql.org; Wed, 08 Jan 2025 07:05:16 +0000 Received: from mail-lj1-x232.google.com ([2a00:1450:4864:20::232]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tVQ7t-000UEP-0E for pgsql-hackers@lists.postgresql.org; Wed, 08 Jan 2025 07:05:15 +0000 Received: by mail-lj1-x232.google.com with SMTP id 38308e7fff4ca-305d843d925so28813321fa.2 for ; Tue, 07 Jan 2025 23:05:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736319913; x=1736924713; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Tiwlty229HGy9J0sH9fdV6tZMGz5SM/4nyh3s14QvoQ=; b=ZHsp3YwsWplWJKEm36dJSua2ZhcXqKMEZ2Kq/u3EPC7kGUPRYp5W1FHVdan1ng9/E2 b1LLxdmXNHUf1YQ9r8i7CvxvNW0T2ANj34FrXtCNBA0EimfhZ3nwYKHw8fTYtqOEQAfw Y6yjTe3dYUR0mhZMYpFHIC+7IDAQ6MHgG4GYoC1pt4w86uhFANoDfiqGzKKOnzBQl2ri oJteC0orCjEyQK/WT0undkCO0+Qc38J2J6uqf23BIKsiAfgD75nPu9x1XCiRnsHgZB/D 36t3XUT8YO55xZLj7xXkXcjsbG/0O0w6CV+xa0VQ9NBahPBUg67xme4fBGaN1TQJd/mz vAvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736319913; x=1736924713; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Tiwlty229HGy9J0sH9fdV6tZMGz5SM/4nyh3s14QvoQ=; b=YsgI1/m8zh1b/9qX4E+qZYsY5ZKw7dHq56rxv0x2hXTgQp0rzLQJGU14CoPHwUUzPg QDV+PCu9T4Zy8RC/lodavirLzRcnRaum0P2siCeVWx6NDovUG5KpkpnvatICHRoL7bzd NToISgxTs+k6UK1jdI/sJma50KzPAPuO6h0NCy+viaaZECAY9q0e2YVetprd5LNVPm+O 8zlAuqQkYCHy2g6SnX7jvWKBhye8tGfo7nID71FXWLSuFj42NVSXMbq9Sk6cpETlaOkz 84bCuGbBJaITkGFFoO2yoVv5dsECxwpjN7tHVWHGxnNlb48Un++ehzTN6KDC2Lrj5QBl msTA== X-Forwarded-Encrypted: i=1; AJvYcCWiUP3eXPn8X4AJr7gdZItZ919jjAHXCpHhJ0BPmFPtxVJ+qWZPY6AWhBq4idknVRXrMyiHhb+Zr5oDOnt/@lists.postgresql.org X-Gm-Message-State: AOJu0YyjiMi5HNkU8uOv2BJzwuPmB/Uu8qrsn+F4lgu3K+otSXCd3ffn LtC8TuQiL8DRt0iddak/dD/xxqc1gvURtebcjNCDDiszwR2b3RsFI5j80SN0/943S5IwdQh+lN9 ABkCmE9v5sYxZECbRJPdyDXHrmwi4gaSY X-Gm-Gg: ASbGncv9ywiOpOs/ZXR3mH02YFSKSYMOMWsy0SovEzcC7p0vpthdFRiQi8Zugb8nTfX oNIgIutvMB4rXBU2wVc0iHGlbE5qhxPB8U/I= X-Google-Smtp-Source: AGHT+IFDIeIaTQ0rCk+P7QJCbY42u0Tr5SBobetrxQAmLRP5JeH2AzwyPsMe8mDespC4NR4JrB5ilLr5Bw7dr3AJj3U= X-Received: by 2002:a05:651c:b0c:b0:302:3ee5:aa9b with SMTP id 38308e7fff4ca-305f45f0ab5mr3894161fa.39.1736319912534; Tue, 07 Jan 2025 23:05:12 -0800 (PST) MIME-Version: 1.0 References: <04bf425ad1b15a4daefe96c478a5253b@oss.nttdata.com> <20240206191937.72eaf0ccc20cfea37944b422@sraoss.co.jp> <76da9fcc-93c5-4053-872e-12932a95356d@uni-muenster.de> <6eac5b45-7f45-4c7a-aae1-e90db8be2e08@uni-muenster.de> <3d6b5885-16a1-475d-b56f-41701c48d9d4@uni-muenster.de> <63595e8f-a245-4335-aa22-7e449a70e210@oss.nttdata.com> <07587c36-18b3-4ccb-b5fb-579bcb04ed37@oss.nttdata.com> In-Reply-To: From: Kirill Reshke Date: Wed, 8 Jan 2025 12:05:01 +0500 X-Gm-Features: AbW1kvZK5L635mt9cctq-1WwLIhWFq_MHEafc6SpN7vItsGRptQ29DBgeXn-P6o Message-ID: Subject: Re: Change COPY ... ON_ERROR ignore to ON_ERROR ignore_row To: jian he Cc: Fujii Masao , Jim Jones , "David G. Johnston" , Yugo NAGATA , torikoshia , PostgreSQL Hackers Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Thank you for your update. On Fri, 13 Dec 2024 at 08:15, jian he wrote: > > + /* > + * Here we end processing of current COPY row. > + * Update copy state counter for number of erroneous rows. > + */ > + cstate->num_errors++; > + cstate->escontext->error_occurred = true; > + > + /* Only print this NOTICE message, if it will not be followed by ERROR */ > + if (cstate->opts.log_verbosity == COPY_LOG_VERBOSITY_VERBOSE && > + ( > + (cstate->opts.on_error == COPY_ON_ERROR_NULL && > cstate->opts.reject_limit > 0 && cstate->num_errors <= > cstate->opts.reject_limit) || > + (cstate->opts.on_error == COPY_ON_ERROR_IGNORE && > (cstate->opts.reject_limit == 0 || cstate->num_errors <= > cstate->opts.reject_limit)) > + )) > { > this is kind of hard to comprehend. > so attached is a simple version of it based on v8. +1 So, in this version you essentially removed support for REJECT_LIMIT + SET_TO_NULL feature? Looks like a promising change. It is more likely to see this committed. So, +1 on that too. However, v9 lacks tests for REJECT_LIMIT vs erroneous rows tests. In short, we need this message somewhere in a regression test. ``` ERROR: skipped more than REJECT_LIMIT (xxx) rows due to data type incompatibility ``` Also, please update commit msg with all authors and reviewers. This will make committer job a little bit easier -- Best regards, Kirill Reshke