Обсуждение: pgsql: Remove pg_dump/pg_dumpall support for dumping from pre-8.0 serve

Поиск
Список
Период
Сортировка

pgsql: Remove pg_dump/pg_dumpall support for dumping from pre-8.0 serve

От
Tom Lane
Дата:
Remove pg_dump/pg_dumpall support for dumping from pre-8.0 servers.

The need for dumping from such ancient servers has decreased to about nil
in the field, so let's remove all the code that catered to it.  Aside
from removing a lot of boilerplate variant queries, this allows us to not
have to cope with servers that don't have (a) schemas or (b) pg_depend.
That means we can get rid of assorted squishy code around that.  There
may be some nonobvious additional simplifications possible, but this patch
already removes about 1500 lines of code.

I did not remove the ability for pg_restore to read custom-format archives
generated by these old versions (and light testing says that that does
still work).  If you have an old server, you probably also have a pg_dump
that will work with it; but you have an old custom-format backup file,
that might be all you have.

It'd be possible at this point to remove fmtQualifiedId()'s version
argument, but I refrained since that would affect code outside pg_dump.

Discussion: <2661.1475849167@sss.pgh.pa.us>

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/64f3524e2c8deebc02808aa5ebdfa17859473add

Modified Files
--------------
doc/src/sgml/ref/pg_dump.sgml        |    7 +-
src/bin/pg_dump/dumputils.c          |   50 +-
src/bin/pg_dump/pg_backup_archiver.c |    2 +-
src/bin/pg_dump/pg_dump.c            | 1761 ++++------------------------------
src/bin/pg_dump/pg_dump.h            |    1 -
src/bin/pg_dump/pg_dump_sort.c       |   96 +-
src/bin/pg_dump/pg_dumpall.c         |  110 +--
7 files changed, 250 insertions(+), 1777 deletions(-)


Re: pgsql: Remove pg_dump/pg_dumpall support for dumping from pre-8.0 serve

От
Peter Eisentraut
Дата:
On 10/12/16 12:20 PM, Tom Lane wrote:
> Remove pg_dump/pg_dumpall support for dumping from pre-8.0 servers.

It looks like this or a related commit has caused these compiler warnings:

pg_dump.c: In function 'getTypes':
pg_dump.c:3692:8: error: variable 'i_typoutput' set but not used
[-Werror=unused-but-set-variable]
  int   i_typoutput;
        ^~~~~~~~~~~
pg_dump.c:3691:8: error: variable 'i_typinput' set but not used
[-Werror=unused-but-set-variable]
  int   i_typinput;
        ^~~~~~~~~~

--
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


Re: pgsql: Remove pg_dump/pg_dumpall support for dumping from pre-8.0 serve

От
Tom Lane
Дата:
Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
> On 10/12/16 12:20 PM, Tom Lane wrote:
>> Remove pg_dump/pg_dumpall support for dumping from pre-8.0 servers.

> It looks like this or a related commit has caused these compiler warnings:

> pg_dump.c: In function 'getTypes':
> pg_dump.c:3692:8: error: variable 'i_typoutput' set but not used
> [-Werror=unused-but-set-variable]
>   int   i_typoutput;
>         ^~~~~~~~~~~
> pg_dump.c:3691:8: error: variable 'i_typinput' set but not used
> [-Werror=unused-but-set-variable]
>   int   i_typinput;
>         ^~~~~~~~~~

Ah, I'd not noticed because my compiler doesn't complain.
Will fix, thanks.

            regards, tom lane