Re: pg_stat_statements: improve loading and saving routines for the dump file

From: m(dot)litsarev(at)postgrespro(dot)ru
To: Ivan Kush <ivan(dot)kush(at)tantorlabs(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: pg_stat_statements: improve loading and saving routines for the dump file
Date: 2025-01-21 10:51:22
Message-ID: 181d7759a2ed7d819add4e0086e7a7f9@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> // Mutex should be last field, as this field isn't copied to dump file
Updated.

> 2) You didn't take into account the upgrade. Saved in Postgres with
> this byte and try to load in version without this byte.
The PGSS_DUMP_FILE format is defined by PGSS_FILE_HEADER magic number
(the first four bytes in the dump file). Once they does not coinside
(when the file is being read) the statistics are not loaded from the
dump file and set to zero and the irrelevant dump file is skipped. This
is the actual behaviour implemented in the code.

Respectfully,

Mikhail Litsarev,
Postgres Professional: https://postgrespro.com

Attachment Content-Type Size
v2-0001-Exclude-pgssEntry-mutex-for-rw-dump-file.patch text/x-diff 2.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Jones 2025-01-21 10:58:28 Re: XMLDocument (SQL/XML X030)
Previous Message Ashutosh Sharma 2025-01-21 10:50:20 Re: Orphaned users in PG16 and above can only be managed by Superusers