Re: [HACKERS] pg_restore fails with a custom backup file

2007-02-19 Thread Magnus Hagander
On Sat, Feb 17, 2007 at 08:40:54PM +0100, Magnus Hagander wrote: IIRC, there was a warning from pg_dump. I don't recall exactly what, and don't have the space to re-run the test on my laptop here, but I think it was from: write_msg(modulename, WARNING: ftell mismatch with expected position

Re: [HACKERS] pg_restore fails with a custom backup file

2007-02-19 Thread Magnus Hagander
On Sat, Feb 17, 2007 at 01:28:22PM -0500, Tom Lane wrote: Magnus Hagander [EMAIL PROTECTED] writes: I'd also like a comment from at least one other patch reviewer that the methods used are good. It looks reasonable as far as it goes. One thought is that pg_dump really should have noticed

Re: [HACKERS] pg_restore fails with a custom backup file

2007-02-17 Thread Yoshiyuki Asaba
From: Magnus Hagander [EMAIL PROTECTED] Subject: Re: [HACKERS] pg_restore fails with a custom backup file Date: Fri, 16 Feb 2007 10:13:35 +0100 On Fri, Feb 16, 2007 at 02:09:41PM +0900, Yoshiyuki Asaba wrote: Does not compile on my MinGW - errors in the system headers (unistd.h, io.h

Re: [HACKERS] pg_restore fails with a custom backup file

2007-02-17 Thread Magnus Hagander
Yoshiyuki Asaba wrote: From: Magnus Hagander [EMAIL PROTECTED] Subject: Re: [HACKERS] pg_restore fails with a custom backup file Date: Fri, 16 Feb 2007 10:13:35 +0100 On Fri, Feb 16, 2007 at 02:09:41PM +0900, Yoshiyuki Asaba wrote: Does not compile on my MinGW - errors in the system

Re: [HACKERS] pg_restore fails with a custom backup file

2007-02-17 Thread Tom Lane
Magnus Hagander [EMAIL PROTECTED] writes: I'd also like a comment from at least one other patch reviewer that the methods used are good. It looks reasonable as far as it goes. One thought is that pg_dump really should have noticed that it was writing a broken archive. On machines where off_t

Re: [HACKERS] pg_restore fails with a custom backup file

2007-02-17 Thread Magnus Hagander
Tom Lane wrote: Magnus Hagander [EMAIL PROTECTED] writes: I'd also like a comment from at least one other patch reviewer that the methods used are good. It looks reasonable as far as it goes. One thought is that pg_dump Ok. I'll run some more tests and then get it in. really should have

Re: [HACKERS] pg_restore fails with a custom backup file

2007-02-16 Thread Magnus Hagander
On Fri, Feb 16, 2007 at 02:09:41PM +0900, Yoshiyuki Asaba wrote: Does not compile on my MinGW - errors in the system headers (unistd.h, io.h) due to changing the argument format for chsize(). The change of off_t propagated into parts of the system headers, thus chaos was ensured.

Re: [HACKERS] pg_restore fails with a custom backup file

2007-02-15 Thread Magnus Hagander
On Fri, Dec 29, 2006 at 05:30:48PM +0100, Magnus Hagander wrote: On Tue, Dec 19, 2006 at 04:58:22PM +0100, Zeugswetter Andreas ADI SD wrote: MinGW has fseeko64 and ftello64 with off64_t. Maybe we need separate macros for MSVC and MinGW. Given the other You

Re: [HACKERS] pg_restore fails with a custom backup file

2007-02-15 Thread Hiroshi Saito
Hi Magnus-san. Great!! Although not tested yet, I seem to equip it with the tolerance to 32GB.? P.S) In Japan, there is a user who is employing 300GB of database on Windows2003. I have received some problems other than this. however, this user does not permit public presentation of the

Re: [HACKERS] pg_restore fails with a custom backup file

2007-02-15 Thread Yoshiyuki Asaba
Hi, From: Magnus Hagander [EMAIL PROTECTED] Subject: Re: [HACKERS] pg_restore fails with a custom backup file Date: Thu, 15 Feb 2007 17:38:59 +0100 On Fri, Dec 29, 2006 at 05:30:48PM +0100, Magnus Hagander wrote: On Tue, Dec 19, 2006 at 04:58:22PM +0100, Zeugswetter Andreas ADI SD wrote

Re: [HACKERS] pg_restore fails with a custom backup file

2007-02-01 Thread Magnus Hagander
Still sitting on my TODO. I have a working solution for MSVC, but it didn't run on MingW. Andreas had a working solution on his MingW, but it didn't work on my MingW. I need to merge them together for something that works on all three. I hope to have this done for 8.3, and possibly a 8.2.x, but

Re: [HACKERS] pg_restore fails with a custom backup file

2007-02-01 Thread Bruce Momjian
Thread URL added to TODO item: o Add long file support for binary pg_dump output --- Magnus Hagander wrote: On Fri, Dec 15, 2006 at 12:57:50AM +0900, Hiroshi Saito wrote: Win32 does not implement fseeko()

Re: [HACKERS] pg_restore fails with a custom backup file

2007-01-31 Thread Bruce Momjian
Where are we on this? --- Magnus Hagander wrote: On Tue, Dec 19, 2006 at 04:58:22PM +0100, Zeugswetter Andreas ADI SD wrote: MinGW has fseeko64 and ftello64 with off64_t. Maybe we need separate

Re: [HACKERS] pg_restore fails with a custom backup file

2006-12-29 Thread Magnus Hagander
On Tue, Dec 19, 2006 at 04:58:22PM +0100, Zeugswetter Andreas ADI SD wrote: MinGW has fseeko64 and ftello64 with off64_t. Maybe we need separate macros for MSVC and MinGW. Given the other You mean something quick and dirty like this ? That would work. Yes,

Re: [HACKERS] pg_restore fails with a custom backup file

2006-12-19 Thread Dave Page
Magnus Hagander wrote: Also, it compiles fine on MSVC. I still haven't managed to get the MingW build environment working properly on Win64 even for building Win32 apps, so I haven't been able to build it on MingW yet. It *should* work since it's all standard functions, but might require further

Re: [HACKERS] pg_restore fails with a custom backup file

2006-12-19 Thread Zeugswetter Andreas ADI SD
I suspect we might need to create a pg_off_t type or some such gadget. Bleah. But it does need to be fixed. Bummer. That might be what's needed, but I'm going to at least try to find some neater way first. I wonder why it didn't happen on MSVC... I don't see how the error

Re: [HACKERS] pg_restore fails with a custom backup file

2006-12-19 Thread Yoshiyuki Asaba
Hi, From: Hiroshi Saito [EMAIL PROTECTED] Subject: Re: [HACKERS] pg_restore fails with a custom backup file Date: Fri, 15 Dec 2006 00:57:50 +0900 Win32 does not implement fseeko() and ftello(). So I think it limit to handle a 2GB file. Is this a specification? Yes, Magnus-san suggested

Re: [HACKERS] pg_restore fails with a custom backup file

2006-12-19 Thread Magnus Hagander
On Tue, Dec 19, 2006 at 09:59:05PM +0900, Yoshiyuki Asaba wrote: Hi, Win32 does not implement fseeko() and ftello(). So I think it limit to handle a 2GB file. Is this a specification? Yes, Magnus-san suggested the problem. It is present TODO. The entire adjustment was still

Re: [HACKERS] pg_restore fails with a custom backup file

2006-12-19 Thread Andrew Dunstan
Magnus Hagander wrote: On Tue, Dec 19, 2006 at 09:59:05PM +0900, Yoshiyuki Asaba wrote: Hi, Win32 does not implement fseeko() and ftello(). So I think it limit to handle a 2GB file. Is this a specification? Yes, Magnus-san suggested the problem. It is present TODO. The

Re: [HACKERS] pg_restore fails with a custom backup file

2006-12-19 Thread Magnus Hagander
However, did you test the actual backend after that change? Given where you change the define of off_t, that would affect every call in the backend that uses off_t, and it just seems very strange that you could get away with that without touching anything else? (If we're lucky, but I wouldn't

Re: [HACKERS] pg_restore fails with a custom backup file

2006-12-19 Thread Zeugswetter Andreas ADI SD
Did you see this from Andreas? MinGW has fseeko64 and ftello64 with off64_t. Maybe we need separate macros for MSVC and MinGW. Given the other You mean something quick and dirty like this ? That would work. Andreas pg_dump_fseeko64.patch Description: pg_dump_fseeko64.patch

Re: [HACKERS] pg_restore fails with a custom backup file

2006-12-19 Thread Magnus Hagander
On Tue, Dec 19, 2006 at 04:25:18PM +0100, Zeugswetter Andreas ADI SD wrote: Did you see this from Andreas? MinGW has fseeko64 and ftello64 with off64_t. Maybe we need separate macros for MSVC and MinGW. Given the other You mean something quick and dirty like this ? That

Re: [HACKERS] pg_restore fails with a custom backup file

2006-12-19 Thread Zeugswetter Andreas ADI SD
MinGW has fseeko64 and ftello64 with off64_t. Maybe we need separate macros for MSVC and MinGW. Given the other You mean something quick and dirty like this ? That would work. Yes, except does that actually work? If so you found the place in the headers to stick it

Re: [HACKERS] pg_restore fails with a custom backup file

2006-12-19 Thread Andrew Dunstan
Magnus Hagander wrote: We need different macrosand possibly functions, yes. I think I got enough patched at home last night to get it working with this, I was just too focused on one set of macros at the time. It's not enough to include them very late - because off_t is used in the shared

Re: [HACKERS] pg_restore fails with a custom backup file

2006-12-19 Thread Magnus Hagander
Andrew Dunstan wrote: Magnus Hagander wrote: We need different macrosand possibly functions, yes. I think I got enough patched at home last night to get it working with this, I was just too focused on one set of macros at the time. It's not enough to include them very late - because off_t is

Re: [HACKERS] pg_restore fails with a custom backup file

2006-12-19 Thread Hiroshi Saito
Hi Asaba-san. From: Yoshiyuki Asaba Is it able to use fsetpos()/fgetpos() instead of ftell()/fseek()? fpos_t is a 8byte type. I tested pg_dump/pg_restore with the attached patch. I'm sorry the response ..slowly...my machine reacts for the reasons of poverty late. Last night.. I was actually

Re: [HACKERS] pg_restore fails with a custom backup file

2006-12-18 Thread Magnus Hagander
On Fri, Dec 15, 2006 at 12:57:50AM +0900, Hiroshi Saito wrote: Win32 does not implement fseeko() and ftello(). So I think it limit to handle a 2GB file. Is this a specification? Yes, Magnus-san suggested the problem. It is present TODO. The entire adjustment was still difficult though I

Re: [HACKERS] pg_restore fails with a custom backup file

2006-12-18 Thread Bruce Momjian
Magnus Hagander wrote: On Fri, Dec 15, 2006 at 12:57:50AM +0900, Hiroshi Saito wrote: Win32 does not implement fseeko() and ftello(). So I think it limit to handle a 2GB file. Is this a specification? Yes, Magnus-san suggested the problem. It is present TODO. The entire adjustment

Re: [HACKERS] pg_restore fails with a custom backup file

2006-12-18 Thread Hiroshi Saito
Hi. Oh, your great trust confidence.:-) I have the fix made for just bin/pg_dump for now (in pg_dump.h), and I'm testing that. (So far only on MSVC builds) However, MinGW+gcc be able to be saved? I was wishing it Regards, Hiroshi Saito ---(end of

Re: [HACKERS] pg_restore fails with a custom backup file

2006-12-18 Thread Magnus Hagander
On Mon, Dec 18, 2006 at 09:50:12AM -0500, Bruce Momjian wrote: Yes, Magnus-san suggested the problem. It is present TODO. The entire adjustment was still difficult though I had tried it. SetFilePointer might be able to be saved. However, I think it might be an attempt of 8.3...

Re: [HACKERS] pg_restore fails with a custom backup file

2006-12-18 Thread Tom Lane
Bruce Momjian [EMAIL PROTECTED] writes: Magnus Hagander wrote: A question though - is there any *gain* from using 64-bit offsets in the actual backend? The change could of course be done in port.h, but that No, not really. All files are kept 1gig for the backend. Not so: consider a backend

Re: [HACKERS] pg_restore fails with a custom backup file

2006-12-18 Thread Bruce Momjian
Tom Lane wrote: Bruce Momjian [EMAIL PROTECTED] writes: Magnus Hagander wrote: A question though - is there any *gain* from using 64-bit offsets in the actual backend? The change could of course be done in port.h, but that No, not really. All files are kept 1gig for the backend.

Re: [HACKERS] pg_restore fails with a custom backup file

2006-12-18 Thread Tom Lane
Bruce Momjian [EMAIL PROTECTED] writes: Tom Lane wrote: Not so: consider a backend COPY reading or writing a multi-gig table. Good point --- but do we do any seeks in COPY files? I don't think so, True, so if the problem is limited to whether we can seek or not, then we don't need to fix the

Re: [HACKERS] pg_restore fails with a custom backup file

2006-12-18 Thread Bruce Momjian
Tom Lane wrote: Bruce Momjian [EMAIL PROTECTED] writes: Tom Lane wrote: Not so: consider a backend COPY reading or writing a multi-gig table. Good point --- but do we do any seeks in COPY files? I don't think so, True, so if the problem is limited to whether we can seek or not, then

Re: [HACKERS] pg_restore fails with a custom backup file

2006-12-18 Thread Andrew Dunstan
Magnus Hagander wrote: Index: src/bin/pg_dump/pg_dump.h === RCS file: /projects/cvsroot/pgsql/src/bin/pg_dump/pg_dump.h,v retrieving revision 1.130 diff -c -r1.130 pg_dump.h *** src/bin/pg_dump/pg_dump.h 9 Oct 2006 23:36:59 -

Re: [HACKERS] pg_restore fails with a custom backup file

2006-12-18 Thread Magnus Hagander
Andrew Dunstan wrote: Magnus Hagander wrote: Index: src/bin/pg_dump/pg_dump.h === RCS file: /projects/cvsroot/pgsql/src/bin/pg_dump/pg_dump.h,v retrieving revision 1.130 diff -c -r1.130 pg_dump.h *** src/bin/pg_dump/pg_dump.h

Re: [HACKERS] pg_restore fails with a custom backup file

2006-12-18 Thread Tom Lane
Magnus Hagander [EMAIL PROTECTED] writes: Andrew Dunstan wrote: I suspect we might need to create a pg_off_t type or some such gadget. Bleah. Bummer. That might be what's needed, but I'm going to at least try to find some neater way first. I wonder why it didn't happen on MSVC... Seems like

Re: [HACKERS] pg_restore fails with a custom backup file

2006-12-18 Thread Magnus Hagander
Tom Lane wrote: Magnus Hagander [EMAIL PROTECTED] writes: Andrew Dunstan wrote: I suspect we might need to create a pg_off_t type or some such gadget. Bleah. Bummer. That might be what's needed, but I'm going to at least try to find some neater way first. I wonder why it didn't happen on

Re: [HACKERS] pg_restore fails with a custom backup file

2006-12-18 Thread Magnus Hagander
I suspect we might need to create a pg_off_t type or some such gadget. Bleah. But it does need to be fixed. Bummer. That might be what's needed, but I'm going to at least try to find some neater way first. I wonder why it didn't happen on MSVC... Hmm. This was even worse than I thought

Re: [HACKERS] pg_restore fails with a custom backup file

2006-12-18 Thread Andrew Dunstan
Magnus Hagander wrote: I suspect we might need to create a pg_off_t type or some such gadget. Bleah. But it does need to be fixed. Bummer. That might be what's needed, but I'm going to at least try to find some neater way first. I wonder why it didn't happen on MSVC... Hmm. This

Re: [HACKERS] pg_restore fails with a custom backup file

2006-12-18 Thread Magnus Hagander
Hmm. This was even worse than I thought :-( I got it building most of the way by following Andrews suggestion and greating a pgoff_t, just to check it out. That done, it seems that mingw doesn't include these 64-bit functions in their import library *at all*. That gives us basically two

Re: [HACKERS] pg_restore fails with a custom backup file

2006-12-18 Thread Magnus Hagander
Magnus Hagander wrote: Hmm. This was even worse than I thought :-( I got it building most of the way by following Andrews suggestion and greating a pgoff_t, just to check it out. That done, it seems that mingw doesn't include these 64-bit functions in their import library *at all*. That

Re: [HACKERS] pg_restore fails with a custom backup file

2006-12-18 Thread Bruce Momjian
Magnus Hagander wrote: I'll try to take a look at this sometime the next couple of days (out of time for today) unless beaten to it. Actually, there's another option that Hiroshi mentioned off-list, that I forgot. We can implement the Microsoft functions _fseeki64() and _ftelli64()

[HACKERS] pg_restore fails with a custom backup file

2006-12-14 Thread Yoshiyuki Asaba
Hi, pg_restore faied by the following operations on Windows XP. $ createdb test $ pgbench -i -s 1000 test $ pg_dump -Fc test out $ createdb restore $ pg_restore -d restore out pg_restore: [custom archiver] error during file seek: Invalid argument Win32 does not implement fseeko()

Re: [HACKERS] pg_restore fails with a custom backup file

2006-12-14 Thread Hiroshi Saito
Hi. Asaba-san. From: Yoshiyuki Asaba Win32 does not implement fseeko() and ftello(). So I think it limit to handle a 2GB file. Is this a specification? Yes, Magnus-san suggested the problem. It is present TODO. The entire adjustment was still difficult though I had tried it.