| From: | Tender Wang <tndrwang(at)gmail(dot)com> |
|---|---|
| To: | Joao Rito <joaovictor(dot)rito(at)gmail(dot)com> |
| Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Backend crash in expanded_record_info functions |
| Date: | 2026-11-21 03:33:00 |
| Message-ID: | CAHewXN=PpCLNDLZ7g1HDx8_OwEFjO3FxQNnuxLp2VfnG-JsyZQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi,
Joao Rito <joaovictor(dot)rito(at)gmail(dot)com> 于2026年11月19日周四 07:58写道:
>
> Hi Tender,
>
> Thank you for the patch and for the clear report. I may be wrong on some points, so please correct me.
>
> I tested this on current master (commit 8303f2e, cassert and debug enabled, in a container). The patch applied cleanly.
>
> Without the patch, `SELECT expanded_record_info(2);` terminated the backend ("server closed the connection unexpectedly"). With the patch, the same statement returns:
>
> ERROR: argument must be of a composite type
>
> and the session stays alive. `make check` passes with the patch (243 tests).
>
> I also tried a few other calls with the patch. `expanded_record_identity(2)`, `expanded_record_field_text(2,1)`, a text argument, and an integer array return the same error. A table row type and a domain over a composite type give the same output with and without the patch. `ROW(1,'a')` also works with the patch (I did not run it without the patch). NULL input of a non-composite type returns NULL, because the function is STRICT in my setup.
>
> One small question. The error message could mention the function name, or use ereport with ERRCODE_DATATYPE_MISMATCH. This is only a test helper, so elog may be fine. I do not have a strong opinion.
>
Thanks for the review.
I suspect this case is rare enough in practice that it may not be
worth spending more time on the patch.
--
Tender Wang
| From | Date | Subject | |
|---|---|---|---|
| Previous Message | Michael Paquier | 2026-11-21 03:06:06 | Re: Checkpoints stuck after a failed bulk write inside a savepoint |