Re: POC: Lock updated tuples in tuple_update() and tuple_delete()

From: Chris Travers <chris(dot)travers(at)gmail(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Cc: Alexander Korotkov <aekorotkov(at)gmail(dot)com>
Subject: Re: POC: Lock updated tuples in tuple_update() and tuple_delete()
Date: 2023-03-10 17:16:40
Message-ID: 167846860062.628976.2440696515718158538.pgcf@coridan.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Right, the improvement this patch gives to the heap is not the full motivation. Another motivation is the improvement it gives to TableAM API. Our current API implies that the effort on locating the tuple by tid is small. This is more or less true for the heap, where we just need to pin and lock the buffer. But imagine other TableAM implementations, where locating a tuple is more expensive."

Yeah. Our TableAM API is a very nice start to getting pluggable storage, but we still have a long ways to go to have an ability to really provide a wide variety of pluggable storage engines.

In particular, the following approaches are likely to have much more expensive tid lookups:
- columnar storage (may require a lot of random IO to reconstruct a tuple)
- index oriented storage (tid no longer physically locatable in the file via seek)
- compressed cold storage like pg_ctyogen (again seek may be problematic).

To my mind I think the performance benefits are a nice side benefit, but the main interest I have on this is regarding improvements in the TableAM capabilities. I cannot see how to do this without a lot more infrastructure.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2023-03-10 17:28:28 Re: pg_usleep for multisecond delays
Previous Message Tom Lane 2023-03-10 16:34:02 Re: RLS makes COPY TO process child tables