Re: Cannot turn track_counts on

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Anton Shepelev <anton(dot)txt(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Cannot turn track_counts on
Date: 2025-04-21 16:52:34
Message-ID: 91d7fc8f-58c5-4932-9f23-32f2341776b4@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 4/21/25 09:46, Anton Shepelev wrote:
> I wrote:
>
>> I will test if clearing shared_preload_libraries and
>> restarting Postgres has any effect on track_counts, just
>> in case.
>
> Nope, it didn't unstick track_counts:
>
> db=# show shared_preload_libraries ;
> -[ RECORD 1 ]------------+-
> shared_preload_libraries |
>
> db=# select * from pg_settings where name like '%k_cou%';
> -[ RECORD 1 ]---+--------------------------------------------------
> name | track_counts
> setting | off
> unit |
> category | Statistics / Query and Index Statistics Collector
> short_desc | Collects statistics on database activity.
> extra_desc |
> context | superuser
> vartype | bool
> source | override
> min_val |
> max_val |
> enumvals |
> boot_val | on
> reset_val | off
> sourcefile |
> sourceline |
> pending_restart |
>
> Have you any further ideas how to turn track_counts on?

It is matter of finding out what is setting?:

source | override

There is something different about your setup, as here on Ubuntu(which
uses the Debian packaging) I see:

select * from pg_settings where name like '%k_cou%';

-[ RECORD 1 ]---+---------------------------------------------------
name | track_counts
setting | on
unit | NULL
category | Statistics / Cumulative Query and Index Statistics
short_desc | Collects statistics on database activity.
extra_desc | NULL
context | superuser
vartype | bool
source | default
min_val | NULL
max_val | NULL
enumvals | NULL
boot_val | on
reset_val | on
sourcefile | NULL
sourceline | NULL
pending_restart | f

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Thiemo Kellner 2025-04-21 17:58:56 Re: Order of update
Previous Message Adrian Klaver 2025-04-21 16:47:46 Re: Cannot turn track_counts on