ALTER COLLATION ... REFRESH VERSION - sample script outdated

2021-05-21 Thread PG Doc comments form
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/13/sql-altercollation.html
Description:

The sample script that is given in section "Notes" finds only libc
collations. If you omit joining "pg_depend" you also find outdated ICU
collations. Like this:

DO  $BODY$
DECLARE
r   RECORD;
BEGIN
FOR r IN (
SELECT n.nspname, c.collname
  FROM pg_collation c JOIN pg_namespace n ON c.collnamespace =
n.oid
 WHERE c.collversion <> pg_collation_actual_version(c.oid)
) LOOP
EXECUTE format('ALTER COLLATION %I.%I REFRESH VERSION;', r.nspname,
r.collname);
RAISE NOTICE 'ALTER COLLATION %.% REFRESH VERSION;', r.nspname,
r.collname;
END LOOP;
END;
$BODY$;


Re: more detailed description of tup_returned and tup_fetched

2021-05-21 Thread Fujii Masao




On 2021/05/20 17:38, Masahiro Ikeda wrote:



On 2021/05/20 17:00, Fujii Masao wrote:

On 2021/05/20 9:46, Masahiro Ikeda wrote:

On 2021/05/18 20:10, Fujii Masao wrote:

pg_stat_database.tup_fetched:
Number of index entries returned by scans on indexes in this database

Is this the sum of pg_stat_all_indexes.idx_tup_read? This is accounted to
pg_stat_database.tup_returned.


I was thinking that pg_stat_database.tup_fetched is the same as
the sum of pg_stat_all_tables.idx_tup_fetch. Because they both
are incremented by bitmap index scans, but pg_stat_all_indexes.idx_tup_read
is not.


Yes. So, "Number of index entries returned by scans on indexes in this
database" is incorrect, and "Number of live rows fetched by index scans in
this database" is correct?


Yes, I think so!


Thanks!
I updated the patch for summarizing this thread.


Thanks for updating the patch! LGTM.

This is an improvement of documentation, so this should be applied in
v15 dev cycle? If so, could you add the patch to the next CF? Or you think
this is a bug fix and needs to be back-patched?

Regards,

--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION




Re: Additional Chapter for Tutorial

2021-05-21 Thread Laurenz Albe
On Fri, 2021-05-21 at 08:47 +0200, Jürgen Purtz wrote:
> Peter changed the status to 'Returned with feedback' at the end of the 
> last commit fest. I'm not absolutely sure, but my understanding is that 
> the patch is rejected.

There is a different status for that.

"Returned with feedback" means: there was review, and further work by
the author is needed, or we need more discussion if we want that or not
or how it should be, but there hasn't been a lot of feedback from the author
lately, so it seems that just moving it on to the next commitfest is not
the right thing to do.

You are welcome to re-submit the patch if you address the feedback.

Yours,
Laurenz Albe





Re: Additional Chapter for Tutorial

2021-05-21 Thread Jürgen Purtz

Hi Jürgen,

What's going to happen with this work?

If you intend to have it eventually committed, I think it will be 
necessary to make the patches smaller, and bring them into the 
commitfest app, so that others can follow progress.


I for one, cannot see/remember/understand what has been done, or even 
whether you intend to continue with it.


Thanks,

Erik


Peter changed the status to 'Returned with feedback' at the end of the 
last commit fest. I'm not absolutely sure, but my understanding is that 
the patch is rejected.


--

Jürgen Purtz