| From: | David Rowley <dgrowleyml(at)gmail(dot)com> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Does anyone ever use OPTIMIZER_DEBUG? |
| Date: | 2023-10-02 23:29:46 |
| Message-ID: | CAApHDvoMLP3ZpAE4_zivkT1GJU293BT7Yy-Kmo-kxU+Nc_-EWg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Fri, 29 Sept 2023 at 10:59, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> We could also discuss keeping the "tracing" aspect of it, but
> replacing debug_print_rel with pprint(rel), which'd still allow
> removal of all the "DEBUG SUPPORT" stuff at the bottom of allpaths.c.
> That's pretty much all of the maintenance-requiring stuff in it.
To assist discussion, I've attached a patch for that.
I likely can't contribute much to that discussion due to being more of
an "attach a debugger" person rather than an "add printf statements"
person.
To eliminate a hurdle for anyone who wants to chip in, I've attached
the old and new debug output from the following query:
select * from pg_class where oid = 1234;
One observation is that the output is quite a bit larger with the
patched version and does not seem as useful if you wanted
OPTIMIZER_DEBUG to help you figure out why a given Path was chosen.
David
| Attachment | Content-Type | Size |
|---|---|---|
| old_debug_print_rel.txt | text/plain | 1003 bytes |
| new_pprint.txt | text/plain | 73.5 KB |
| replace_debug_print_rel_with_pprint.patch | application/octet-stream | 8.5 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Michael Paquier | 2023-10-02 23:42:02 | Re: pg*.dll and *.pdb files in psqlODBC have no version numbers |
| Previous Message | Vik Fearing | 2023-10-02 22:56:20 | Re: CHECK Constraint Deferrable |