Re: delete then insert

From: Ron <ronljohnsonjr(at)gmail(dot)com>
To: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: delete then insert
Date: 2020-01-17 20:12:10
Message-ID: 4e1f53ad-6793-c714-46bc-bc7d16b836b1@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On 1/17/20 2:03 PM, Ken Benson wrote:
>
> So – I THINK I know – that when a row is deleted from a table – the row is
> not actually removed from the table – but, merely marked as deleted, thus
> becoming a dead tuple.
> AUTOVACUUM – takes care of the process of removing these dead tuples.
>
> My question. If – an insert occurs to that same table before autovacuum
> comes along, does that inserted record use a dead tuple? Or – does the
> insert result in an actual added row?
>

If there's an open transaction which is still looking at the now-deleted
record, then over-writing that area of the file would be a Bad Thing.

--
Angular momentum makes the world go 'round.

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Ken Benson 2020-01-17 20:59:46 RE: delete then insert
Previous Message Ken Benson 2020-01-17 20:03:21 delete then insert