pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Detect version mismatch in brin_page_items 2+ messages / 1 participants [nested] [flat]
* pgsql: Detect version mismatch in brin_page_items @ 2024-12-17 16:53 Tomas Vondra <tomas.vondra@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Tomas Vondra @ 2024-12-17 16:53 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Detect version mismatch in brin_page_items Commit dae761a87ed modified brin_page_items() to return the new "empty" flag for each BRIN range. But the new output parameter was added in the middle, which may cause crashes when using the new binary with old function definition. The ideal solution would be to introduce API versioning similar to what pg_stat_statements does, but it's too late for that as PG17 was already released (so we can't introduce a new extension version). We could do something similar in brin_page_items() by checking the number of output columns (and ignoring the new flag), but it doesn't seem very nice. Instead, simply error out and suggest updating the extension to the latest version. pageinspect is a superuser-only extension, and there's not much reason to run an older version. Moreover, there's a precedent for this approach in 691e8b2e18. Reported by Ľuboslav Špilák, investigation and patch by me. Backpatch to 17, same as dae761a87ed. Reported-by: Ľuboslav Špilák Reviewed-by: Michael Paquier, Hayato Kuroda, Peter Geoghegan Backpatch-through: 17 Discussion: https://postgr.es/m/VI1PR02MB63331C3D90E2104FD12399D38A5D2@VI1PR02MB6333.eurprd02.prod.outlook.com Discussion: https://postgr.es/m/flat/3385a58f-5484-49d0-b790-9a198a0bf236@vondra.me Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/957ba9ff14066782a42ebb974913b2fc616c99e1 Modified Files -------------- contrib/pageinspect/brinfuncs.c | 17 +++++++++++++++++ contrib/pageinspect/expected/oldextversions.out | 14 ++++++++++++++ contrib/pageinspect/sql/oldextversions.sql | 9 +++++++++ 3 files changed, 40 insertions(+) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Detect version mismatch in brin_page_items @ 2024-12-17 16:53 Tomas Vondra <tomas.vondra@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Tomas Vondra @ 2024-12-17 16:53 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Detect version mismatch in brin_page_items Commit dae761a87ed modified brin_page_items() to return the new "empty" flag for each BRIN range. But the new output parameter was added in the middle, which may cause crashes when using the new binary with old function definition. The ideal solution would be to introduce API versioning similar to what pg_stat_statements does, but it's too late for that as PG17 was already released (so we can't introduce a new extension version). We could do something similar in brin_page_items() by checking the number of output columns (and ignoring the new flag), but it doesn't seem very nice. Instead, simply error out and suggest updating the extension to the latest version. pageinspect is a superuser-only extension, and there's not much reason to run an older version. Moreover, there's a precedent for this approach in 691e8b2e18. Reported by Ľuboslav Špilák, investigation and patch by me. Backpatch to 17, same as dae761a87ed. Reported-by: Ľuboslav Špilák Reviewed-by: Michael Paquier, Hayato Kuroda, Peter Geoghegan Backpatch-through: 17 Discussion: https://postgr.es/m/VI1PR02MB63331C3D90E2104FD12399D38A5D2@VI1PR02MB6333.eurprd02.prod.outlook.com Discussion: https://postgr.es/m/flat/3385a58f-5484-49d0-b790-9a198a0bf236@vondra.me Branch ------ REL_17_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/3668c1d506bfd061ee6c474502cdbbe3f794a91e Modified Files -------------- contrib/pageinspect/brinfuncs.c | 17 +++++++++++++++++ contrib/pageinspect/expected/oldextversions.out | 14 ++++++++++++++ contrib/pageinspect/sql/oldextversions.sql | 9 +++++++++ 3 files changed, 40 insertions(+) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2024-12-17 16:53 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2024-12-17 16:53 pgsql: Detect version mismatch in brin_page_items Tomas Vondra <tomas.vondra@postgresql.org> 2024-12-17 16:53 pgsql: Detect version mismatch in brin_page_items Tomas Vondra <tomas.vondra@postgresql.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox