Re: pg_dump and large files - is this a problem?
От | Philip Warner |
---|---|
Тема | Re: pg_dump and large files - is this a problem? |
Дата | |
Msg-id | 5.1.0.14.0.20021021230921.0287d3f8@mail.rhyme.com.au обсуждение исходный текст |
Ответ на | Re: pg_dump and large files - is this a problem? (Bruce Momjian <pgman@candle.pha.pa.us>) |
Ответы |
Re: pg_dump and large files - is this a problem?
|
Список | pgsql-hackers |
At 09:50 PM 20/10/2002 -0400, Bruce Momjian wrote: >Well, I think Tom was going to try it on his HPUX machine. It might be good if someone who knows a little more than me about endianness etc has a look at the patch - specifically this bit of code: #if __BYTE_ORDER == __LITTLE_ENDIAN for (off = 0 ; off < sizeof(off_t) ; off++) { #else for (off = sizeof(off_t) -1 ; off >= 0 ; off--) { #endif i = *(char*)(ptr+off); (*AH->WriteBytePtr) (AH, i); } It is *intended* to write the data such that the least significant byte is written first to the file, but the dump Giles put on his FTP site is not correct - it's written msb->lsb. There seem to be two possibilities (a) I am an idiot and there is something wrong with the code above that I can not see, or (b) the test: #if __BYTE_ORDER == __LITTLE_ENDIAN is not the right thing to do. Any insights would be appreciated. ---------------------------------------------------------------- Philip Warner | __---_____ Albatross Consulting Pty. Ltd. |----/ - \ (A.B.N. 75 008 659 498) | /(@) ______---_ Tel: (+61) 0500 83 82 81 | _________ \ Fax: (+61) 0500 83 82 82 | ___________ | Http://www.rhyme.com.au | / \| | --________-- PGP key available upon request, | / and from pgp5.ai.mit.edu:11371 |/
В списке pgsql-hackers по дате отправления: