RE: [HACKERS] mdnblocks is an amazing time sink in huge relations

From: "Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)jp>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, <t-ishii(at)sra(dot)co(dot)jp>
Cc: <pgsql-hackers(at)postgreSQL(dot)org>
Subject: RE: [HACKERS] mdnblocks is an amazing time sink in huge relations
Date: 1999-10-23 00:40:21
Message-ID: 001201bf1cef$2fb648a0$2801007e@cadzone.tpf.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>
> After a thought,I propose the following solution.
>
> 1. mdcreate() couldn't create existent relation files.
> If the existent file is of length zero,we would overwrite
> the file.(seems the comment in md.c says so but the
> code doesn't do so).
> If the file is an Index relation file,we would overwrite
> the file.
>

This may allow to CREATE TABLE simultaneously for the
same table name. I would change to check the existence
of the same table name correctly in heap_create_with_ca
talog().

> 2. mdunlink() couldn't unlink non-existent relation files.
> mdunlink() doesn't call elog(ERROR) even if the file
> doesn't exist,though I couldn't find where to change
> now.

_mdfd_getrelnfd(),mdnblocks() doesn't call elog().
Return code will be checked.

> mdopen() doesn't call elog(ERROR) even if the file
> doesn't exist and leaves the relation as CLOSED.
>
> Comments ?
>

Recently I saw 2 postings about this in pgsql MLs.
So I want to change as above.

2. was changed by Tom(mdunlink/mdopen) and
Tatsuo(mdopen) recently.
Any Problems ?

Regards.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message D'Arcy J.M. Cain 1999-10-23 00:57:07 Re: [HACKERS] RFC: Industrial-strength logging (long message)
Previous Message The Hermit Hacker 1999-10-23 00:20:59 Re: [GENERAL] Re: What's WAL