Re: BUG #16722: PG hanging on COPY when table has close to 2^32 toasts in the table. - Mailing list pgsql-bugs

From Fujii Masao
Subject Re: BUG #16722: PG hanging on COPY when table has close to 2^32 toasts in the table.
Date
Msg-id fb3f67af-f23c-63aa-0c21-fb1c67dfaeef@oss.nttdata.com
Whole thread Raw
In response to Re: BUG #16722: PG hanging on COPY when table has close to 2^32 toasts in the table.  (Kasahara Tatsuhito <kasahara.tatsuhito@gmail.com>)
Responses Re: BUG #16722: PG hanging on COPY when table has close to 2^32 toasts in the table.  (tomohiro hiramitsu <hiramit.tm@gmail.com>)
List pgsql-bugs

On 2021/03/17 14:30, tomohiro hiramitsu wrote:
> v4-0001-GetNewOidWithIndex_log_output.patch

Thanks for updating the patch! I applied the following and cosmetic changes
to the patch. Attached is the updated version of the patch.

+            ereport(LOG,
+                (errmsg("still finding an unused OID within relation \"%s\"",
+        ereport(LOG,
+            (errmsg("the new OID has been assigned in relation \"%s\" after \"%llu\" retries",

WARNING is more suitable for these kinds of messages?
I changed the log level here to WARNING.

+#define GETNEWOID_NOTIFY_MINVAL 1000000
+#define GETNEWOID_NOTIFY_MAXVAL 100000000

If we use WARNING, GETNEWOID_WARN_THRESHOLD and GETNEWOID_WARN_MAX_INTERVAL
sound better to me for the meanings of them. I renamed them.

+    if (retry_count >= GETNEWOID_NOTIFY_MINVAL)

">=" should be ">"? Otherwise, the message for completion of OID assignment
can be logged even when no message "still finding ..." is output. I fixed this.

Regards,

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

Attachment

pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #16933: [build-system] libpq doesn't check for every names of zlib
Next
From: Michael Paquier
Date:
Subject: Re: BUG #16927: Postgres can`t access WAL files