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.