Re: What happens to a primary key b-tree index when a table tuple is deleted by a transaction?

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Luby Liao <lubyliao(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: What happens to a primary key b-tree index when a table tuple is deleted by a transaction?
Date: 2012-11-25 18:34:48
Message-ID: CAFj8pRALeqbg5EOhTv8M1qG8kdGLxpZ8pVbw34O2_QMeNLukbg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello

2012/11/25 Luby Liao <lubyliao(at)gmail(dot)com>:
> Bruce Momjian's book says that (p109)
>
>> When POSTGRESQL updates a row, it keeps the old copy of the row in the
>> table file and writes a new one. The old row is marked as expired, and used
>> by other transactions still viewing the database in its prior state.
>> Deletions are similarly marked as expired, but not removed from the table
>> file.
>
>
> If the b-tree changes for the transaction, would it not become broken for
> other transactions?
> Can anyone tell me how Postgres handles this? Thank you, Luby

What I know - PostgreSQL doesn't modify btree when tuples are deleted.

Regards

Pavel Stehule

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Peter Geoghegan 2012-11-25 19:05:41 Re: What happens to a primary key b-tree index when a table tuple is deleted by a transaction?
Previous Message Luby Liao 2012-11-25 18:03:11 What happens to a primary key b-tree index when a table tuple is deleted by a transaction?