public inbox for [email protected]
help / color / mirror / Atom feedFrom: Ivan Kush <[email protected]>
To: [email protected]
Subject: Re: pg_stat_statements: improve loading and saving routines for the dump file
Date: Mon, 20 Jan 2025 19:14:07 +0300
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
Hello, Mikhail.
1) I'd add to comment a reason, why mutex should be last.
// Mutex should be last field, as this field isn't copied to dump file
+ /* protects the counters only. Should be the very last field, as this field isn't copied to dump file
+ slock_t mutex;
} pgssEntry;
2) You didn't take into account the upgrade. Saved in Postgres with this
byte and try to load in version without this byte.
On 1/20/25 16:49, [email protected] wrote:
> Hi!
>
> Currently in pg_stat_statements save/load routines the whole pgssEntry
> entity data are written/read with its last field
> slock_t mutex;
> which is actually not used then.
> This small patch fixes this issue. Hope, it will be useful.
>
> Respectfully,
>
> Mikhail Litsarev,
> Postgres Professional: https://postgrespro.com
--
Best wishes,
Ivan Kush
Tantor Labs LLC
view thread (7+ messages) latest in thread
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: [email protected]
Cc: [email protected], [email protected]
Subject: Re: pg_stat_statements: improve loading and saving routines for the dump file
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox