| From: | Daniel Gustafsson <daniel(at)yesql(dot)se> |
|---|---|
| To: | Karina Litskevich <litskevichkarina(at)gmail(dot)com> |
| Cc: | Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Implicit conversion from int64 to int32 when calling hash_get_num_entries |
| Date: | 2026-07-13 20:35:58 |
| Message-ID: | 902107CC-6296-4888-8228-C7D3C4167735@yesql.se |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
> On 13 Jul 2026, at 17:00, Karina Litskevich <litskevichkarina(at)gmail(dot)com> wrote:
> Simply changing num_entries to int64 leads to the change of the file
> header format. I suggest changing num_entries to int64 in PG19 and
> later, because it wasn't released yet, and pgss files generated by
> another major version are considered to be incompatible anyway. See
> the v1 patch attached.
Agreed, I think we should make sure to do this once beta2 has shipped for the
next beta release.
> Doing the same in already released versions would require increasing
> PGSS_FILE_HEADER version. I don't think it's worth it, so for older
> versions I suggest just adding a comment, a check, and an explicit
> conversion to int32. See the second patch attached.
Given the likelihood of an issue in backbranches, we could also only apply for
v19 and leave the backbranches.
> Another minor problem I noticed was the definition of pgver. It's
> defined as int32, but used as uint32. So I fixed it in both patches.
Makes sense.
--
Daniel Gustafsson
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tristan Partin | 2026-07-13 20:38:17 | Re: Grab bag of smaller OpenSSL fixups |
| Previous Message | Sami Imseih | 2026-07-13 20:30:43 | Re: [Proposal] Adding callback support for custom statistics kinds |