I've implemented large file support for pg_dump, in what I hope is a
portable fashion.  Please review the attached patch.

This needs an additional option from autoconf, because pg_dump prints a
hex offset which needs to be either %Lx or %llx, but there is no hex
equivalent to INT64_FORMAT.  To get this working I have arbitrarily
defined OFF_T_FORMATX as "%lld", but that needs to be changed before the
patch is incorporated.

Peter E suggested that there was no need for the macro definitions in
pg_backup.h but I wasn't clear how else to achieve what was needed.


-- 
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight, UK                            
http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
                 ========================================
     "Praying always with all prayer and supplication in the
      Spirit, and watching thereunto with all perseverance 
      and supplication for all saints."       Ephesians 6:18
15 Aug 2002 11:41:20 +0100
Oliver Elphick <olly@lfix.co.uk>
pg_dump large file support
On Thu, 2002-08-15 at 11:41, Oliver Elphick wrote:
> I've implemented large file support for pg_dump, in what I hope is a
> portable fashion.  Please review the attached patch.

> Index: src/bin/pg_dump/Makefile
> ===================================================================
> RCS file: /projects/cvsroot/pgsql-server/src/bin/pg_dump/Makefile,v
> retrieving revision 1.36
> diff -u -r1.36 Makefile
> --- src/bin/pg_dump/Makefile	2002/07/27 20:10:05	1.36
> +++ src/bin/pg_dump/Makefile	2002/08/15 10:31:53
> @@ -18,6 +18,8 @@
>  
>  override CPPFLAGS := -I$(libpq_srcdir) $(CPPFLAGS)
>  
> +CFLAGS +=  -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
> +

I just realised this is the wrong place to put this definition, since it
will act unconditonally and attempt to compile large file support even
where it is not available.  This too ought to come from autoconf, I
think.

-- 
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight, UK                            
http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
                 ========================================
     "Praying always with all prayer and supplication in the
      Spirit, and watching thereunto with all perseverance 
      and supplication for all saints."       Ephesians 6:18


15 Aug 2002 12:47:33 +0100
Oliver Elphick <olly@lfix.co.uk>
Re: pg_dump large file support
Oliver Elphick writes:

> I've implemented large file support for pg_dump, in what I hope is a
> portable fashion.  Please review the attached patch.

Hmm, not quite right, but since you've indicated that you're not familiar
with Autoconf I can take it from here.

-- 
Peter Eisentraut   peter_e@gmx.net


Thu, 15 Aug 2002 21:30:22 +0200 (CEST)
Peter Eisentraut <peter_e@gmx.net>
Re: pg_dump large file support
On Thu, 2002-08-15 at 20:30, Peter Eisentraut wrote:
> Oliver Elphick writes:
> 
> > I've implemented large file support for pg_dump, in what I hope is a
> > portable fashion.  Please review the attached patch.
> 
> Hmm, not quite right, but since you've indicated that you're not familiar
> with Autoconf I can take it from here.

Thanks, Peter
-- 
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight, UK                            
http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
                 ========================================
     "Praying always with all prayer and supplication in the
      Spirit, and watching thereunto with all perseverance 
      and supplication for all saints."       Ephesians 6:18


15 Aug 2002 20:45:45 +0100
Oliver Elphick <olly@lfix.co.uk>
Re: pg_dump large file support