RE: [HACKERS] tables > 1 gig

From: "Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)jp>
To: "Bruce Momjian" <maillist(at)candle(dot)pha(dot)pa(dot)us>
Cc: "PostgreSQL-development" <pgsql-hackers(at)postgreSQL(dot)org>
Subject: RE: [HACKERS] tables > 1 gig
Date: 1999-06-18 03:57:14
Message-ID: 001001beb93e$a6c6a620$2801007e@cadzone.tpf.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> > >
> > > How about my idea of creating a truncated file, the renaming it to the
> > > table file. That keeps the table open for other open file
> descriptors,
> > > but put a zero-length file in place in an atomic manner.
> > >
> >
> > Sorry,I couldn't understand what you mean.
> > What is differenct from truncating existent files to zero length ?
>
> Glad to explain. Here is the pseudocode:
>
> create temp file, make it zero length, call it 'zz'
> rename(zz,tablename)
>
> What this does is to create a zero length file, and the rename unlinks
> the tablename file, and puts the zero-length file in it's place.
> rename() is atomic, so there is no time that the table file does not
> exist.
>

Let
i1 be the inode of zz
i2 be the inode of tablename
before rename().

Does this mean

New backends read/write i1 inode and
backends that have the table open read/write i2 inode ?

If so,it seems wrong.
All backends should see same data.

Regards.

Hiroshi Inoue
Inoue(at)tpf(dot)co(dot)jp

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 1999-06-18 04:01:18 Re: [HACKERS] tables > 1 gig
Previous Message Bruce Momjian 1999-06-18 03:15:32 Re: [HACKERS] tables > 1 gig