Tom Lane wrote:
> If we change the implementation so that the files are named after
> the (fixed, never-changed-after-creation) table OID, then RENAME
> TABLE is no problem: it affects *nothing* except the relname field
> of the table's pg_class row, and either that row update is committed
> or it ain't.
> But if the physical file names contain the logical table name, we
> have to be prepared to rename those files in sync with the transaction
> commit that makes the pg_class update valid. Quite aside from any
> implementation effort involved, the critical point is this: it is
> *not possible* to ensure that that collection of changes is atomic.
> At best, we can make the window for failure small.
How about using hard-links? The transaction that created the change
would see the new link along with the new tuple. other transactions
would see the old directory and the old tuple. rollback drops the new
tuple and the new directory entry. Commit does the obvious.
Does WinNT have something similar to a hard link?
ESN 451-9008 (302)454-9008
In response to
pgsql-hackers by date
|Next:||From: Michael Alan Dorman||Date: 2000-03-08 14:04:27|
|Subject: Re: [HACKERS] DROP TABLE inside a transaction block|
|Previous:||From: Hiroshi Inoue||Date: 2000-03-08 10:12:43|
|Subject: RE: [HACKERS] DROP TABLE inside a transaction block |