pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Alexander Lakhin <exclusion@gmail.com>
To: Jeff Davis <pgsql@j-davis.com>
To: Corey Huinker <corey.huinker@gmail.com>
To: jian he <jian.universality@gmail.com>
Cc: Matthias van de Meent <boekewurm+postgres@gmail.com>
Cc: Bruce Momjian <bruce@momjian.us>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Nathan Bossart <nathandbossart@gmail.com>
Cc: Magnus Hagander <magnus@hagander.net>
Cc: Stephen Frost <sfrost@snowman.net>
Cc: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Cc: Peter Smith <smithpb2250@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: alvherre@alvh.no-ip.org
Subject: Re: Statistics Import and Export
Date: Sun, 27 Oct 2024 14:00:00 +0300
Message-ID: <98b2fcf0-f701-369e-d63d-6be9739ce17c@gmail.com> (raw )
In-Reply-To: <be7de51af6e969d501f69426c7137af6bde17fdc.camel@j-davis.com >
References: <e8135244d99e6bc388853598cb0ec4bf59085494.camel@j-davis.com >
<CADkLM=cJMEYrP8o4dbAqm_mW=ks63sXi1VXy94ybev0BNLm7_g@mail.gmail.com >
<e0c1284347ab88860bdaf75a8188df075f592d98.camel@j-davis.com >
<CADkLM=chb8YT+OD40aDDj1MGz52FMw6-SW3atgEpsw6Rp-3mhg@mail.gmail.com >
<c2e39c70c229cf59eb430431b08e9abfffe43b08.camel@j-davis.com >
<CADkLM=e0jM7m0GFV44nNtvL22CtnFUu+pekppCVE=DOBe58RTQ@mail.gmail.com >
<e1c15b4eb1472f5bba9d61315b3fc2fb7484d8a4.camel@j-davis.com >
<9e068620350f0158e791fc0b9a68df896d4402c6.camel@j-davis.com >
<CADkLM=eu72o_=s2ARNe8yB-16AUm+_iU0tq_ALeeUUxCCqJkOQ@mail.gmail.com >
<11bb2c7403d4a7421fe8b09df6737aa83976266e.camel@j-davis.com >
<CACJufxHrJb3L66kzYWeFvN_7RNROaHKUo_JuXK6B64c+TkWOhA@mail.gmail.com >
<CADkLM=edhVxHr5OGZHnUeoMkjFYNpE==puOKbB1E_7j1=QsbBw@mail.gmail.com >
<CACJufxGmdV-9c7M_fs-2mGBMj1XiVqdOkW0NvibmpBJqedo1uQ@mail.gmail.com >
<CADkLM=eErgzn7ECDpwFcptJKOk9SxZEk5Pot4d94eVTZsvj3gw@mail.gmail.com >
<be7de51af6e969d501f69426c7137af6bde17fdc.camel@j-davis.com >
Hello Jeff and Corey,
26.10.2024 01:18, Jeff Davis wrote:
> On Tue, 2024-09-17 at 05:02 -0400, Corey Huinker wrote:
>> I've taken most of Jeff's work, reincorporated it into roughly the
>> same patch structure as before, and am posting it now.
> I have committed the import side of this patch series; that is, the
> function calls that can load stats into an existing cluster without the
> need to ANALYZE.
>
> The pg_restore_*_stats() functions are designed such that pg_dump can
> emit the calls. Some design choices of the functions worth noting:
Please look at the following seemingly atypical behavior of the new
functions:
CREATE TABLE test(id int);
SELECT pg_restore_attribute_stats(
'relation', 'test'::regclass,
'attname', 'id'::name,
'inherited', false);
SELECT pg_restore_attribute_stats(
'relation', 'test'::regclass,
'attname', 'id'::name,
'inherited', false
) FROM generate_series(1, 2);
ERROR: XX000: tuple already updated by self
LOCATION: simple_heap_update, heapam.c:4353
Or:
SELECT pg_clear_attribute_stats('test'::regclass, 'id'::name, false)
FROM generate_series(1, 2);
ERROR: XX000: tuple already updated by self
LOCATION: simple_heap_delete, heapam.c:3108
Best regards,
Alexander
view thread (543+ messages) latest in thread
Message-ID: <98b2fcf0-f701-369e-d63d-6be9739ce17c@gmail.com>
Permalink: ../98b2fcf0-f701-369e-d63d-6be9739ce17c@gmail.com/
Also on: postgresql.org/message-id/98b2fcf0-f701-369e-d63d-6be9739ce17c@gmail.com
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: exclusion@gmail.com, pgsql@j-davis.com, corey.huinker@gmail.com, jian.universality@gmail.com, boekewurm+postgres@gmail.com, bruce@momjian.us, tgl@sss.pgh.pa.us, nathandbossart@gmail.com, magnus@hagander.net, sfrost@snowman.net, ashutosh.bapat.oss@gmail.com, smithpb2250@gmail.com, pgsql-hackers@lists.postgresql.org, alvherre@alvh.no-ip.org
Subject: Re: Statistics Import and Export
In-Reply-To: <98b2fcf0-f701-369e-d63d-6be9739ce17c@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox