Re: NOLOGGING option, or ?

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: NOLOGGING option, or ?
Дата
Msg-id 200506012302.j51N2H921211@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: NOLOGGING option, or ?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > One idea would be to look at the table file size first.  If it has zero
> > blocks, lock the table and if it still has zero blocks, do the no-WAL
> > copy.
> 
> I think that's a bad idea.  It would make the behavior unpredictable
> --- sometimes a COPY will take an exclusive lock, and other times not;
> and the reason why is at a lower semantic level than the user is
> supposed to know about.
> 
> Before you say "this is not important", consider the nontrivial risk
> that the stronger lock will cause a deadlock failure.  I don't think
> that it's acceptable for lock strength to be unpredictable.

Yea, but you are only doing the lock if the table is zero pages. 
Doesn't that help?  Maybe not.

I do like the LOCK keyword if we have to use one to enable this
functionality, but I am suspecting people will want this functionality
in pg_dump output.  How do we do that?  Just make it the default for
pg_dump output?

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


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: NOLOGGING option, or ?
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: NOLOGGING option, or ?