From: | Gavin Sherry <swm(at)linuxworld(dot)com(dot)au> |
---|---|
To: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: CLUSTER TODO item |
Date: | 2002-02-23 01:26:12 |
Message-ID: | Pine.LNX.4.21.0202231220580.5425-100000@linuxworld.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi Bruce,
I put this on hold since I sent that email. This is basically because the
API doesn't lend itself well to attaching new relfilenodes to existing
heaps. I definately want to put this patch in but just need to find time
to modify the API to support this correctly.
Gavin
On Fri, 22 Feb 2002, Bruce Momjian wrote:
>
> Is there an updated version of this patch for 7.3?
>
> ---------------------------------------------------------------------------
>
> Gavin Sherry wrote:
> > On Thu, 11 Oct 2001, Tom Lane wrote:
> >
> > > Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > > > Can I get a status on this?
> > >
> > > It's not gonna happen for 7.2, I think ...
> > >
> > > regards, tom lane
> >
> > I'd love it to go out with 7.2 but I've had no time to work on this patch
> > lately. The reason I need time is that, after having fiddled a fair bit,
> > I've decided that there really needs to be support for the creation of a
> > new relfilenode in the storage manager.
> >
> > The current patch works like this:
> >
> > Create new heap (heap_create())
> > Copy tuples from old heap to new heap via index scan
> > Form a new pg_class tuple
> > simple_heap_update()
> > update catalogue indices
> > rebuild existing indices
> >
> > This causes an overflow in the localbuf.c so I guess this is wrong
> > (included in patch on 24/sep) =). I've looked at various combinations of
> > this:
> >
> > memcpy() the old Relation into a new Relation, update smgrunlink() the old
> > Relation and heap_storage_create() the new relation. This dies because
> > smgrunlink only schedules the drop, where as heap_storage_create() actually
> > creates a file on the file system (open() returns with EEXIST).
> >
> > I've also tried just copying the structure but heap_open() relies on OID
> > not relfilenode.
> >
> > I'm probably going about it the wrong way, but it strikes me that there
> > needs to be a way to abstract the relfilenode from OID in the heap access
> > code so that one can easily manipulate the heap on disk without having to
> > play with OIDs.
> >
> > I would have included code examples/clearer description but the box I
> > don't have access to the box I created the patches on atm =(.
> >
> > Gavin
> >
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 4: Don't 'kill -9' the postmaster
> >
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2002-02-23 01:48:36 | Re: patch: INSERT INTO t VALUES (a, b, ..., DEFAULT, ...) |
Previous Message | Bruce Momjian | 2002-02-23 01:17:09 | Re: Going through email |