>
> 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