RE: [HACKERS] mdnblocks is an amazing time sink in huge relations - Mailing list pgsql-hackers

From Hiroshi Inoue
Subject RE: [HACKERS] mdnblocks is an amazing time sink in huge relations
Date
Msg-id 001201bf1cef$2fb648a0$2801007e@cadzone.tpf.co.jp
Whole thread Raw
In response to RE: [HACKERS] mdnblocks is an amazing time sink in huge relations  ("Hiroshi Inoue" <Inoue@tpf.co.jp>)
Responses System indexes are never unique indexes( was RE: [HACKERS] mdnblocks is an amazing time sink in huge relations)
List 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@tpf.co.jp 


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] New psql startup banner
Next
From: "D'Arcy" "J.M." Cain
Date:
Subject: Re: [HACKERS] RFC: Industrial-strength logging (long message)