RE: [HACKERS] tables > 1 gig
От | Hiroshi Inoue |
---|---|
Тема | RE: [HACKERS] tables > 1 gig |
Дата | |
Msg-id | 001001beb93e$a6c6a620$2801007e@cadzone.tpf.co.jp обсуждение исходный текст |
Ответ на | Re: [HACKERS] tables > 1 gig (Bruce Momjian <maillist@candle.pha.pa.us>) |
Ответы |
Re: [HACKERS] tables > 1 gig
|
Список | pgsql-hackers |
> > > > > > How about my idea of creating a truncated file, the renaming it to the > > > table file. That keeps the table open for other open file > descriptors, > > > but put a zero-length file in place in an atomic manner. > > > > > > > Sorry,I couldn't understand what you mean. > > What is differenct from truncating existent files to zero length ? > > Glad to explain. Here is the pseudocode: > > create temp file, make it zero length, call it 'zz' > rename(zz,tablename) > > What this does is to create a zero length file, and the rename unlinks > the tablename file, and puts the zero-length file in it's place. > rename() is atomic, so there is no time that the table file does not > exist. > Leti1 be the inode of zzi2 be the inode of tablename before rename(). Does this mean New backends read/write i1 inode and backends that have the table open read/write i2 inode ? If so,it seems wrong. All backends should see same data. Regards. Hiroshi Inoue Inoue@tpf.co.jp
В списке pgsql-hackers по дате отправления: