Re: Statistics Import and Export

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: jian he <jian(dot)universality(at)gmail(dot)com>
Cc: Corey Huinker <corey(dot)huinker(at)gmail(dot)com>, Jeff Davis <pgsql(at)j-davis(dot)com>, Nathan Bossart <nathandbossart(at)gmail(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Magnus Hagander <magnus(at)hagander(dot)net>, Stephen Frost <sfrost(at)snowman(dot)net>, Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, alvherre(at)alvh(dot)no-ip(dot)org, Noah Misch <noah(at)leadboat(dot)com>
Subject: Re: Statistics Import and Export
Date: 2025-01-19 00:44:49
Message-ID: Z4xLAdoRjLL3Na43@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Jan 19, 2025 at 01:00:04AM +0800, jian he wrote:
> On Fri, Jan 17, 2025 at 10:20 PM jian he <jian(dot)universality(at)gmail(dot)com> wrote:
>> dump and execute the above query generated a warning
>> WARNING: missing lock for relation "tenk1_hundred" (OID 18431,
>> relkind i) @ TID (15,34)
>
> This seems to be an existing issue.
> For pg_restore_relation_stats, we don't have regress tests for index relation.
> I am not sure the WARNING is ok.

This is not OK based on the rules introduced by Noah at aac2c9b4fde8.
check_lock_if_inplace_updateable_rel() expects a lock to be taken.
Note that elog() are used when reports should never be user-facing,
for states that should not be reachable.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2025-01-19 00:52:14 Re: improve DEBUG1 logging of parallel workers for CREATE INDEX?
Previous Message Michael Paquier 2025-01-19 00:37:54 Re: Old BufferDesc refcount in PrintBufferDescs and PrintPinnedBufs