Re: pgsql-server/src/port fseeko.c

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: pgsql-server/src/port fseeko.c
Дата
Msg-id 200210250000.g9P00XV04412@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: pgsql-server/src/port fseeko.c  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-committers
Peter Eisentraut wrote:
> Bruce Momjian - CVS writes:
>
> > Log message:
> >     Make BSD/OS fseeko thread-safe.
>
> I don't think that standard fseeko is thread safe.  The whole FILE* based
> API is suspect.

I think the issue is that when you do a SEEK_CUR/SEEK_END, you have to
take a snapshot of where the current pointer is or the current file
size, so you should lock out other threads while you do those
operations.  If you didn't, there could be random unreliability in the
function.


--
  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-committers по дате отправления:

Предыдущее
От: tgl@postgresql.org (Tom Lane)
Дата:
Сообщение: pgsql-server/src/interfaces/libpq fe-connect.c ...
Следующее
От: momjian@postgresql.org (Bruce Momjian - CVS)
Дата:
Сообщение: pgsql-server/src/bin/pg_dump common.c pg_backu ...