From: | David Rowley <dgrowleyml(at)gmail(dot)com> |
---|---|
To: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Peter Geoghegan <pg(at)bowt(dot)ie>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: On disable_cost |
Date: | 2024-09-27 12:04:20 |
Message-ID: | CAApHDvpGHwQWj87fiU6X9SHcrqN1vmWy7r8yxj_sLSC_jN_b3A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, 27 Sept 2024 at 20:42, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> wrote:
> 2. The "disabled nodes" are not only shown at the nodes where nodes
> were actually disabled, but also at every nodes above these nodes.
I'm also not a fan either and I'd like to see this output improved.
It seems like it's easy enough to implement some logic to detect when
a given node is disabled just by checking if the disable_nodes count
is higher than the sum of the disabled_node field of the node's
children. If there are no children (a scan node) and disabed_nodes >
0 then it must be disabled. There's even a nice fast path where we
don't need to check the children if disabled_nodes == 0.
Here's a POC grade patch of how I'd rather see it looking.
I opted to have a boolean field as I didn't see any need for an
integer count. I also changed things around so we always display the
boolean property in non-text EXPLAIN. Normally, we don't mind being
more verbose there.
I also fixed a bug in make_sort() where disabled_nodes isn't being set
properly. I'll do an independent patch for that if this goes nowhere.
David
Attachment | Content-Type | Size |
---|---|---|
poc_improve_disabled_nodes_explain_output.patch | application/octet-stream | 34.6 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2024-09-27 12:08:31 | Re: Opinion poll: Sending an automated email to a thread when it gets added to the commitfest |
Previous Message | Robert Haas | 2024-09-27 12:03:44 | Re: pg_verifybackup: TAR format backup verification |