Skip site navigation (1) Skip section navigation (2)

Re: CREATE TABLE, load and freezing

From: "Florian G(dot) Pflug" <fgp(at)phlo(dot)org>
To: Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>
Cc: PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: CREATE TABLE, load and freezing
Date: 2008-02-28 09:35:38
Message-ID: 47C6806A.3010505@phlo.org (view raw or flat)
Thread:
Lists: pgsql-hackers
Pavan Deolasee wrote:
> In a typical scenario, user might create a table and load data in the
> table as part of a single transaction (e.g pg_restore). In this case,
> it would help if we create the tuples in the *frozen* state to avoid
> any wrap-around related issues with the table.  Without this, very
> large read-only tables would require one round of complete freezing
> if there are lot of transactional activities in the other parts of
> the database. And when that happens, it would generate lots of
> unnecessary IOs on these large tables.
If that works, then we might also want to set the visibility hint bits.
Not because lookup of that information is expensive - the tuples all 
came from the same transaction, virtually guaranteeing that the relevent
pg_clog page stays in memory after the first few pages.
But by setting them immediatly we'd save some IO, since we won't dirty
all pages during the first scan.

> I don't know if this is a real problem for anybody, but I could think
>  of its use case, at least in theory.
A cannot speak for freeze-on-restore, but in a project I'm currently 
working on, the IO caused (I guess) by hint-bit updates during the
first scan of the table is at least noticeably...

regards, Florian Pflug

In response to

Responses

pgsql-hackers by date

Next:From: Dimitri FontaineDate: 2008-02-28 09:45:21
Subject: Re: Varlena Type Creation
Previous:From: Pavan DeolaseeDate: 2008-02-28 09:08:51
Subject: CREATE TABLE, load and freezing

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group