Re: pg_dump refactor patch to remove global variables

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Joachim Wieland <joe(at)mcknight(dot)de>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_dump refactor patch to remove global variables
Date: 2014-10-08 03:05:39
Message-ID: 20141008030539.GR7043@eldon.alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Here's a rebased patch for this (I also pgindented it).

One thing I find a bit odd is the fact that we copy
RestoreOptions->superuser into DumpOptions->outputSuperuser (a char *
pointer) without pstrdup or similar. We're already doing the inverse
elsewhere, and the uses of the routine where this is done are pretty
limited, so it seems harmless. Still, it's pretty weird. (Really,
the whole dumpOptionsFromRestoreOptions() business is odd.)

I'm not real happy with the forward struct declare in pg_backup.h, but I
think this is just general messiness in this code structure and not this
patch' fault.

--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

Attachment Content-Type Size
pg_dump_refactor_globals.5.diff text/x-diff 123.1 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2014-10-08 03:36:49 Re: pgaudit - an auditing extension for PostgreSQL
Previous Message Jim Nasby 2014-10-08 00:58:10 Re: PL/pgSQL 2