From: | Darafei "Komяpa" Praliaskouski <me(at)komzpa(dot)net> |
---|---|
To: | Oleksandr Shulgin <oleksandr(dot)shulgin(at)zalando(dot)de> |
Cc: | Sergei Kornilov <sk(at)zsrv(dot)org>, John Bachir <j(at)jjb(dot)cc>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: feature idea: use index when checking for NULLs before SET NOT NULL |
Date: | 2020-05-29 12:56:41 |
Message-ID: | CAC8Q8tLqfDWACiGhi3WQac1h4SyHGSOYy6t88F=6aMB4cuwaSA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
>
>
>
> John, I think it's worth pointing out that Postgres most likely does a
> full table scan to validate a constraint by design and not in optimization
> oversight. Think of what's gonna happen if the index used for checking is
> corrupted?
>
>
This can't be true: a corrupted index is a failure mode, and failure modes
are not expected in normal flow. Think of it this way: we must never use
index scan, because if index is corrupted the results are going to be
disastrous, so we will always do Seq Scans.
It's ok to assume index is not corrupted.
--
Darafei Praliaskouski
Support me: http://patreon.com/komzpa
From | Date | Subject | |
---|---|---|---|
Next Message | Tomas Vondra | 2020-05-29 13:04:54 | Re: Trouble with hashagg spill I/O pattern and costing |
Previous Message | Daniel Gustafsson | 2020-05-29 12:45:44 | Re: OpenSSL 3.0.0 compatibility |