Re: Logical decoding & exported base snapshot

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Joachim Wieland <joe(at)mcknight(dot)de>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Logical decoding & exported base snapshot
Date: 2012-12-13 22:49:58
Message-ID: CA+TgmoZi_12sDW7vLcaFzHcASaQfYJvvJCbL45ASX=_1BX-Dkw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Dec 13, 2012 at 5:25 PM, Andres Freund <andres(at)2ndquadrant(dot)com> wrote:
> That would solve the consistency problem, yes. Would we need a special
> kind of permission for this? I would say superuser/database owner only?

Yeah, I doubt we would need a whole new permission for it, but it
would certainly have to be disallowed for ordinary users.

> It should actually even work for standbys in contrast to my FOR SHARE
> hack idea as we could "just" make it conflict with the exclusive locks
> logged into the WAL.
>
> I don't think that it will against the too-many-locks problem itself
> though, unless we play some additional tricks. The locks will be
> acquired later when the tables are dumped anyway. Now, given the
> snapshot import/export feature we actually could dump them table by
> table in a single transaction, but thats a bit more complicated.

Well, I was thinking that if a transaction already had the
no-DDL-on-nontemp-objects lock then perhaps we could optimize away
AccessShareLocks on individual relations. Of course that would rely
on the global lock being an adequate substitute for all cases where an
AccessShareLock would otherwise be needed. Not sure how feasible that
is. But it would be really cool.

--
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 Tom Lane 2012-12-13 22:55:18 Re: Logical decoding & exported base snapshot
Previous Message Andres Freund 2012-12-13 22:37:11 Re: logical decoding - GetOldestXmin