Re: Trying to understand page structures in PG - Mailing list pgsql-general

From Joshua D. Drake
Subject Re: Trying to understand page structures in PG
Date
Msg-id 57051674.4000002@commandprompt.com
Whole thread Raw
In response to Trying to understand page structures in PG  (Rakesh Kumar <rakeshkumar464a3@gmail.com>)
List pgsql-general
On 04/06/2016 02:39 AM, Rakesh Kumar wrote:
> Hello
>
> I understand that when an update of say 100,000 rows are made, PG
> writes the updated rows as a new row. These new rows are not visible
> to any sessions except the one creating it. At commit time PG flips
> something internally to make these rows visible to all.
>
> My Q: what happens to those rows which use to contain the values
> before the update. Shouldn't something change in those rows to
> indicate that those rows are no longer valid. Who does it chain those
> rows to the new rows.

They are marked dead and at a threshold vacuum will come along
automatically and mark them reusable.

The vacuum and maintenance docs explain this pretty well.

Sincerely,

JD

>
> thanks.
>
>


--
Command Prompt, Inc.                  http://the.postgres.company/
                         +1-503-667-4564
PostgreSQL Centered full stack support, consulting and development.
Everyone appreciates your honesty, until you are honest with them.


pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: what database schema version management system to use?
Next
From: Thomas Kellerer
Date:
Subject: Re: what database schema version management system to use?