<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">Hi Markus,</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">On 2022-12-09 10:41, Markus Demleitner
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:20221209094118.xrbsmqtpqbkwkh7g@victor"><br>
<blockquote type="cite">
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">But the background of the erratum is not that having obs_id non-NULL
is hard to do, it is that it is hard to validate. Which of course
would be perfectly ok if the requirement served a purpose, but since
we still have not identified such a purpose, it would make
implementors' lives substantially easier at no cost (well: that's
admittedly my claim) if we dropped it.
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
Technically as far as I understood the problem occurs only with ObscOre
tables implemented as "views", because otherwise you can always create an
index on this obs_id column.
Apparently "material views" can have indexes. So why not use them when
available in your dbms ?
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
Because creating such a materialised view takes several minutes when
you have ~1e8 rows -- and it's something that you do whenever you
import new images or spectra on any contributing data collections.
This is just not a sensible option.</pre>
</blockquote>
<p>Could "REFRESH MATERIALIZED VIEW <b>CONCURRENTLY</b>" help ?
This allows to refresh a view with new data without blocking read
access. A PK is needed in the materialized view to do that.<br>
</p>
<p>I heard about that feature last year in
<a class="moz-txt-link-freetext" href="https://archive.fosdem.org/2022/schedule/event/postgresql_automatically_refresh_materialized_views_in_postgresql/">https://archive.fosdem.org/2022/schedule/event/postgresql_automatically_refresh_materialized_views_in_postgresql/</a></p>
<p>My 2 cents (and sorry if I am off-topic) !<br>
</p>
<p>Renaud.<br>
</p>
<br>
</body>
</html>