Re: [HACKERS] [PATCH] Lockable views

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
Cc: Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp>, Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] [PATCH] Lockable views
Date: 2018-02-01 20:16:13
Message-ID: CA+Tgmob7z0e9rgCzP1D365YkjCxXb-1Zo0og4V5psc3nvfh9sQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jan 30, 2018 at 1:21 AM, Thomas Munro
<thomas(dot)munro(at)enterprisedb(dot)com> wrote:
> About the idea: it makes some kind of sense to me that we should lock
> the underlying table, in all the same cases that you could do DML on
> the view automatically. I wonder if this is a problem for the
> soundness: "Tables appearing in a subquery are ignored and not
> locked."

Yeah, that seems like a pretty bad idea. It's exposing what is
basically an implementation detail to users. I think that if we
change the rules for which subqueries get flattened in a future
release, then the behavior will also change. That seems bad.

I also think that this is a bad idea for another reason, which is that
it leaves us with no syntax to say that you want to lock the view
itself, and pg_dump wants do that if only we had syntax for it.

--
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 Vladimir Sitnikov 2018-02-01 20:28:33 Re: Built-in connection pooling
Previous Message Robert Haas 2018-02-01 20:11:35 Re: [HACKERS] Partition-wise aggregation/grouping