From: | Lincoln Yeoh <lyeoh(at)pop(dot)jaring(dot)my> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Hannu Krosing <hannu(at)tm(dot)ee> |
Cc: | mlw <markw(at)mohawksoft(dot)com>, Thomas Swan <tswan(at)ics(dot)olemiss(dot)edu>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
Subject: | Re: Re: New Linux xfs/reiser file systems |
Date: | 2001-05-06 17:56:18 |
Message-ID: | 3.0.5.32.20010507015618.0081ee20@192.228.128.13 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
At 12:03 PM 5/6/01 -0400, Tom Lane wrote:
>Hannu Krosing <hannu(at)tm(dot)ee> writes:
>> Even the IMHO hardest to solve problem
>> - RENAME - can
>> probably be done in a transaction-safe manner by doing a
>> link(oid.<newname>) in the
>> beginning and selective unlink(oid.<newname/oldname>) at commit time.
>
>Nope. Consider
>
> begin;
> rename a to b;
> rename b to a;
> end;
>
>And don't tell me you'll solve this by ignoring failures from link().
>That's a recipe for losing your data...
>
>I would ask people who think they have a solution to please go back and
>reread the very long discussions we have had on this point in the past.
>Nobody particularly likes numeric filenames, but there really isn't any
>other workable answer.
OK. Found one of the discussions at:
http://postgresql.readysetnet.com/mhonarc/pgsql-hackers/2000-03/threads.html
#00088
Conclusion calling stuff oid.relname doesn't really work. Sorry to have
brought it up again.
Another idea that's probably more messy than it's worth:
Main object still called <oid> with a symlink called <oid.originalrelname>.
DB really just uses <oid>.
Rename= adds symlink called <oid.newrelname>, doesn't remove symlinks
(symlinks more for show!).
Committed drop table does what 7.1 does with the main oid entry.
Vacuum cleans up the symlinks leaving just a single valid one or zaps all
if the table has been dropped.
For windows create empty files named oid.relname instead of symlinks.
Windows will definitely like .verylongrelname extensions ;).
Kinda messy and kludgy. Throw in the performance reduction and Ick!
I probably have to think harder :), maybe there's just no good way :(.
Ah well,
Link.
From | Date | Subject | |
---|---|---|---|
Next Message | Stephan Szabo | 2001-05-06 18:03:40 | Re: Isn't pg_statistic a security hole? |
Previous Message | Tom Lane | 2001-05-06 17:27:31 | Re: Isn't pg_statistic a security hole? |