Re: Statistics Import and Export

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Corey Huinker <corey(dot)huinker(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>
Cc: jian he <jian(dot)universality(at)gmail(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-20 23:02:49
Message-ID: 1b81a72ff1ac71476f1e87cceeff6aae73d47155.camel@j-davis.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 2025-01-20 at 16:26 -0500, Corey Huinker wrote:
> Attached is the patch, along with the regression test output prior to
> the change to stat_utils.c.

Comments:

* For indexes, it looks like do_analyze_rel is opening the parent table
with ShareUpdateExclusive and the indexes with just AccessShare. Let's
follow that pattern.

* The import code allows setting stats for partitioned indexes while
ANALYZE does not, so it's hard to say for sure what we should do for
partitioned indexes. I suggest we treat them the same as ordinary
indexes. Alternatively, we could refuse to set stats on a partitioned
index, but the rest of the import feature is generally permissive about
what can be set, so I'm inclined to just treat them like ordinary
indexes with respect to locking semantics.

Regards,
Jeff Davis

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Euler Taveira 2025-01-20 23:15:54 Re: pg_createsubscriber TAP test wrapping makes command options hard to read.
Previous Message Tom Lane 2025-01-20 22:49:56 Re: pg_createsubscriber TAP test wrapping makes command options hard to read.