Re: Read Uncommitted

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Read Uncommitted
Date: 2019-12-18 18:26:31
Message-ID: CA+Tgmoaf6Xxf+0JxKiUP+rzGTABQ7-2S8R061+J7tBVyLnBBig@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Dec 18, 2019 at 1:06 PM Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
> So this is the same discussion as elsewhere about potentially aborted transactions...

Yep.

> AFAIK, the worst that happens in that case is that the reading transaction will end with an ERROR, similar to a serializable error.

I'm not convinced of that. There's a big difference between a
serializable error, which is an error that is expected to be
user-facing and was designed with that in mind, and just failing a
bunch of random sanity checks all over the backend. If those sanity
checks happen to be less than comprehensive, which I suspect is
likely, there will probably be scenarios where you can crash a backend
and cause a system-wide restart. And you can probably also return just
plain wrong answers to queries in some scenarios.

> Just consider this part of the recovery toolkit.

I agree that it would be useful to have a recovery toolkit for reading
uncommitted data, but I think a lot more thought needs to be given to
how such a thing should be designed. If you just add something called
READ UNCOMMITTED, people are going to expect it to have *way* saner
semantics than this will. They'll use it routinely, not just as a
last-ditch mechanism to recover otherwise-lost data. And I'm
reasonably confident that will not work out well.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2019-12-18 18:34:57 Re: Restore backup file "with oids"
Previous Message Ranier Vf 2019-12-18 18:20:40 [PATCH] Windows port: add support to setenv function