Re: Read-only access to temp tables for 2PC transactions

From: Stas Kelvich <s(dot)kelvich(at)postgrespro(dot)ru>
To: Stas Kelvich <s(dot)kelvich(at)postgrespro(dot)ru>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Read-only access to temp tables for 2PC transactions
Date: 2019-05-22 15:41:39
Message-ID: 9DCFB313-8DAD-41E6-944D-8F701A11AA5B@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 14 May 2019, at 12:53, Stas Kelvich <s(dot)kelvich(at)postgrespro(dot)ru> wrote:
>
> Hi,
>
> That is an attempt number N+1 to relax checks for a temporary table access
> in a transaction that is going to be prepared.
>

Konstantin Knizhnik made off-list review of this patch and spotted
few problems.

* Incorrect reasoning that ON COMMIT DELETE truncate mechanism
should be changed in order to allow preparing transactions with
read-only access to temp relations. It actually can be be leaved
as is. Things done in previous patch for ON COMMIT DELETE may be
a performance win, but not directly related to this topic so I've
deleted that part.

* Copy-paste error with check conditions in
relation_open/relation_try_open.

Fixed version attached.

--
Stas Kelvich
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

Attachment Content-Type Size
2PC-ro-temprels-v2.patch application/octet-stream 10.6 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2019-05-22 15:52:46 Re: "long" type is not appropriate for counting tuples
Previous Message Oleksii Kliukin 2019-05-22 15:27:15 upgrades in row-level locks can deadlock