pg_dump large file support

Started by Oliver Elphickover 23 years ago4 messageshackers
Jump to latest
#1Oliver Elphick
olly@lfix.co.uk

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

Attachments:

pg_dump.patchtext/x-patch; charset=ISO-8859-15; name=pg_dump.patchDownload+48-26
#2Oliver Elphick
olly@lfix.co.uk
In reply to: Oliver Elphick (#1)
Re: 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

#3Peter Eisentraut
peter_e@gmx.net
In reply to: Oliver Elphick (#1)
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

#4Oliver Elphick
olly@lfix.co.uk
In reply to: Peter Eisentraut (#3)
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