On 03.10.2024 01:44, David Rowley wrote:
On Thu, 3 Oct 2024 at 08:41, Alena Rybakina <a.rybakina@postgrespro.ru> wrote:
I may have misunderstood your message, but disabled nodes number must propagate up the tree, otherwise it will be incorrect.
I think there are two misunderstandings on this thread:
1) You're misunderstanding what Laurenz is complaining about. He's
only concerned with the EXPLAIN output, not how disasbled_nodes works
internally.
Sorry, maybe you're right, I misunderstood his request [0]. But I tried to answer his question why disabled nodes aren't displayed by explaining how it works.
2) Laurenz is misunderstanding what "Disabled Nodes" means. It has
nothing to do with other Paths which were considered and rejected. It
might be better named as "Disabled Degree". It tracks how many plan
nodes below and including this node are disabled.
yes, I agree with you and that's exactly what I tried to explain with examples.
Unfortunately I was unable to generalize this conclusion correctly. Thanks)
Because of #2, I think I now understand why Laurenz was interested in
only showing this with VERBOSE. If it worked the way Laurenz thought,
I'd probably agree with him.
Overall, I think we need to do something here. There's no
documentation about what Disabled Nodes means so we either need to
make it easier to understand without documenting it or add something
to the documents about it. If Laurenz, who has a huge amount of
PostgreSQL experience didn't catch it, then what hope is there for the
average user?
I think you are right, most users will perceive this parameter as the number of rejected paths, and not in any other way.
[0] https://www.postgresql.org/message-id/0cdd3504502aac827acb3ae615eda09aeb883f74.camel%40cybertec.at
--
Regards,
Alena Rybakina
Postgres Professional