Re: What's left?

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: What's left?
Дата
Msg-id 200401270153.i0R1r2w21730@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: What's left?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > In this way, no one ever has the rename file open while we are holding
> > the locks, and we can loop without holding an exclusive lock on
> > pg_shadow, and file writes remain in order.
>
> You're doing this where exactly, and are certain that you are holding no
> locks why exactly?  And if you aren't holding a lock, what prevents
> concurrency bugs?

Oh, for concurrency bugs, you make realfile.new while holding the
exclusive lock, so someone could come in later and replace realfile.new
while I am in the rename loop, but then I just install theirs instead.

I could install someone who has just done the rename to realfile.new but
not tried the rename from realfile.new to realfile, but that seems OK.
They will just fine the file missing and fail on the rename, which is
OK.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [pgsql-hackers-win32] What's left?
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Extending SET SESSION AUTHORIZATION