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

tomohiro hiramitsu <hiramit.tm@gmail.com>

From: tomohiro hiramitsu <hiramit.tm@gmail.com>
To: Kasahara Tatsuhito <kasahara.tatsuhito@gmail.com>
Cc: Magnus Hagander <magnus@hagander.net>, Andres Freund <andres@anarazel.de>, Fujii Masao <masao.fujii@oss.nttdata.com>, skoposov@ed.ac.uk, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Date: 2021-03-01T01:56:50Z
Lists: pgsql-bugs

Attachments

 Hi,

On Wed, Jan 6, 2021 at 11:13 AM Kasahara Tatsuhito
<kasahara(dot)tatsuhito(at)gmail(dot)com> wrote:

> Here are some comments about the code.
>
> +#define GETNEWOID_NOTIFICATION_INTERVAL_FACTOR 1000000
>
> It seems to be more of a minimum value for conflict detection rather
> than an interval factor.
> So, it would be better to use another name, such as
> GETNEWOID_NOTIFICATION_MINVAL or others.
>
> +        /* retry count and notification limit check */
> +        if (retry_count == next_notify && next_notify <=
> GETNEWOID_NOTIFICATION_LIMIT)
> +        {
> +            ereport(LOG,
> +                (errmsg("failed to assign new OID in relation \"%s\"
> after "UINT64_FORMAT" retries",
> +                    RelationGetRelationName(relation), retry_count)));
> +            next_notify *= 2; /* double it for the next notification */
> +        }
> +        retry_count++;
>
> I think that we should add more comments about why output this LOG
message.

Thank you for your comment.
I reflected your comment in the patch.

 * v2-0001-GetNewOidWithIndex_log_output.patch

Best regards,

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Log when GetNewOidWithIndex() fails to find unused OID many times.

  2. Add tests for bytea LIKE operator