Re: BUG #16722: PG hanging on COPY when table has close to 2^32 toasts in the table.
Fujii Masao <masao.fujii@oss.nttdata.com>
From: Fujii Masao <masao.fujii@oss.nttdata.com>
To: tomohiro hiramitsu <hiramit.tm@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Kyotaro Horiguchi
<horikyota.ntt@gmail.com>, Kasahara Tatsuhito
<kasahara.tatsuhito@gmail.com>, Magnus Hagander <magnus@hagander.net>,
Andres Freund <andres@anarazel.de>, skoposov@ed.ac.uk,
PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Date: 2021-03-18T16:32:29Z
Lists: pgsql-bugs
Attachments
- v5-0001-GetNewOidWithIndex_log_output.patch (text/plain) patch v5-0001
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
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Log when GetNewOidWithIndex() fails to find unused OID many times.
- 7fbcee1b2d5f 14.0 landed
-
Add tests for bytea LIKE operator
- eb42110d952f 14.0 cited