| From: | Nathan Bossart <nathandbossart(at)gmail(dot)com> |
|---|---|
| To: | Nikita Malakhov <hukutoc(at)gmail(dot)com> |
| Cc: | solai v <solai(dot)cdac(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: problems with toast.* reloptions |
| Date: | 2026-06-09 18:31:26 |
| Message-ID: | aihb_hMloqVDpbtw@nathan |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Okay, here is a new patch set that aims to actually fix the issues, not
just remove the TOAST reloptions. I followed roughly the approach I
originally suggested in my first post: autovacuum merges the relopts, and
VACUUM passes them to the TOAST table when recursing. As previously
mentioned, vacuuming a TOAST table directly isn't fixed, but I think that's
okay. Our main supported way to VACUUM a TOAST table is to use "VACUUM
(PROCESS_MAIN false) main_table".
Something else this patch makes worse is that we remain oblivious to
concurrent storage parameter changes on the main table. That is, if
someone changes a relopt during a long-running vacuum on the main table,
we might use a stale relopt value when we process the TOAST table. To fix
that, I suspect we'd need to do more lookups, which I was hoping to avoid.
But this doesn't seem like a pressing issue, and AFAICT this stuff has been
broken for a very long time, so IMHO it's not worth the additional effort.
--
nathan
| Attachment | Content-Type | Size |
|---|---|---|
| v5-0001-Remove-extract_autovac_opts.patch | text/plain | 11.5 KB |
| v5-0002-Make-autovacuum_enabled-a-ternary-reloption.patch | text/plain | 3.6 KB |
| v5-0003-Add-an-unset-value-for-vacuum_index_cleanup.patch | text/plain | 3.5 KB |
| v5-0004-Fix-VACUUM-and-autovacuum-handling-of-TOAST-stora.patch | text/plain | 17.1 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Zsolt Parragi | 2026-06-09 19:17:11 | Re: [PATCH] Add pg_get_table_ddl() to reconstruct CREATE TABLE statements |
| Previous Message | Jonathan Gonzalez V. | 2026-06-09 18:17:37 | Re: Add pg_get_publication_ddl function |