pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jeff Davis <pgsql@j-davis.com>
To: Corey Huinker <corey.huinker@gmail.com>
Cc: Shinoda, Noriyoshi (SXD Japan FSIP) <noriyoshi.shinoda@hpe.com>
Cc: 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 <alvherre@alvh.no-ip.org>
Subject: Re: Statistics Import and Export
Date: Thu, 17 Oct 2024 18:41:14 -0700
Message-ID: <d9352fd5aa761462ee3ade2b24d0a6602abf7a75.camel@j-davis.com> (raw)
In-Reply-To: <CADkLM=e_21rwvKYp_99x=knZXWvDEOSoT4ODcBBLSixFaNu8-Q@mail.gmail.com>
References: <CACJufxHeRNu9EJM-XsfhuSo87_3oRaPMuPcqdsH_D9-W4dLJOg@mail.gmail.com>
	<e0660898b696b0bb77030f8b850d662ad3c663d2.camel@j-davis.com>
	<DM4PR84MB17345E2DFF28A5557B7CBC3CEE7A2@DM4PR84MB1734.NAMPRD84.PROD.OUTLOOK.COM>
	<CADkLM=cmGmuocZzW1GRsQKSQ6hU4dnP=TYogkhU7ZPEUkTZU2A@mail.gmail.com>
	<CADkLM=cb1g7FupStPeo2rZn5EDARUrjQWdfBAXHSckZU8Ppnng@mail.gmail.com>
	<f4a0cf7975f1ad42a20fcc91be9e938a4f71259d.camel@j-davis.com>
	<CADkLM=dJBPefnUDq40UQhaYTNTMuYbK=h63tCnQysm1j5_0Log@mail.gmail.com>
	<CADkLM=fgMQDbXWX3JYuQNGw6ATda2goNp5gc1BUa=ebZMvbf6w@mail.gmail.com>
	<CADkLM=fajh1Lpcyr_XsMmq-9Z=SGk-u+_Zeac7Pt0RAN3uiVCg@mail.gmail.com>
	<CADkLM=e_21rwvKYp_99x=knZXWvDEOSoT4ODcBBLSixFaNu8-Q@mail.gmail.com>

On Thu, 2024-10-17 at 20:54 -0400, Corey Huinker wrote:
> There is some uncertainty on what, if anything, should be returned by
> pg_set_relation_stats() and pg_set_attribute_stats().

...

> This re-raises the question of whether the pg_set_*_stats functions
> should return anything at all.

What is the benefit of a return value from the pg_set_*_stats variants?
As far as I can tell, there is none because they throw an ERROR if
anything goes wrong, so they should just return VOID. What am I
missing?

The return value is more interesting for pg_restore_relation_stats()
and pg_restore_attribute_stats(), which will be used by pg_dump and
which are designed to keep going on non-fatal errors. Isn't that what
this discussion should be about?

Magnus, you previously commented that you'd like some visibility for
tooling:

https://www.postgresql.org/message-id/CABUevEz1gLOkWSh_Vd9LQh-JM4i%3DMu7PVT9ffc77TmH0Zh3TzA%40mail.g...

Is a return value what you had in mind? Or some other function that can
help find missing stats later, or something else entirely?

Regards,
	Jeff Davis






view thread (543+ messages)  latest in thread

Message-ID: <d9352fd5aa761462ee3ade2b24d0a6602abf7a75.camel@j-davis.com>
Permalink:  ../d9352fd5aa761462ee3ade2b24d0a6602abf7a75.camel@j-davis.com/
Also on:    postgresql.org/message-id/d9352fd5aa761462ee3ade2b24d0a6602abf7a75.camel@j-davis.com

 · 

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: pgsql@j-davis.com, corey.huinker@gmail.com, noriyoshi.shinoda@hpe.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: <d9352fd5aa761462ee3ade2b24d0a6602abf7a75.camel@j-davis.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