| From: | Noah Misch <noah(at)leadboat(dot)com> |
|---|---|
| To: | robertmhaas(at)gmail(dot)com |
| Cc: | pgsql-hackers(at)postgresql(dot)org |
| Subject: | pg_*_advice: tsv load failure, etc. |
| Date: | 2026-08-27 17:18:30 |
| Message-ID: | 20260827171830.68.noahmisch@microsoft.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
An Opus 4.8 review of pg_*_advice commits wrote test cases, attached, for
several malfunctions. The test patch also contains its markdown report. A
lot of its findings are more like long-term bugfix opportunities than open
items, but I recommend treating at least these as an open item batch:
### 1. An empty (non-NULL) stashed advice string persists a TSV line the loader rejects
### 3. pg_start_stash_advice_worker() destroys an existing pg_stash_advice.tsv when persistence was off at boot, silently losing all persisted advice
I wasn't 100% convinced this is unintentional, but Opus is more convinced.
Worth a look from you.
### 14. Stash-supplied advice silently overrides an explicitly-set pg_plan_advice.advice for the same query; the precedence is documented nowhere
I do feel the GUC should preempt the stash. Best to solidify this behavior
before release.
Here's the second tier, as I see it:
### 5. pg_plan_advice.advice / stash advice changes are silently ignored by an already-cached generic plan
### 8. pg_set_stashed_advice stores advice with no syntax validation, so malformed advice is accepted then emits a plan-time WARNING on every execution and applies nothing
Bounded harm, but changing this would be a relatively-large boost to the user
experience.
| Attachment | Content-Type | Size |
|---|---|---|
| test-pg-advice-v0.patch | text/plain | 87.5 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Masahiko Sawada | 2026-08-27 17:25:31 | Re: pg_upgrade silently truncates nextMultiOffset to 32 bits |
| Previous Message | Daniel Gustafsson | 2026-08-27 17:14:54 | Re: Online enable/disable data checksums functions return success even when the launcher fails to start |