1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-23 14:01:44 +03:00

Move some pg_dump function around.

Move functions used only by pg_dump and pg_restore from dumputils.c to a new
file, pg_backup_utils.c. dumputils.c is linked into psql and some programs
in bin/scripts, so it seems good to keep it slim. The parallel functionality
is moved to parallel.c, as is exit_horribly, because the interesting code in
exit_horribly is parallel-related.

This refactoring gets rid of the on_exit_msg_func function pointer. It was
problematic, because a modern gcc version with -Wmissing-format-attribute
complained if it wasn't marked with PF_PRINTF_ATTRIBUTE, but the ancient gcc
version that Tom Lane's old HP-UX box has didn't accept that attribute on a
function pointer, and gave an error. We still use a similar function pointer
trick for getLocalPQBuffer() function, to use a thread-local version of that
in parallel mode on Windows, but that dodges the problem because it doesn't
take printf-like arguments.
This commit is contained in:
Heikki Linnakangas
2013-03-27 18:10:40 +02:00
parent 1cea9bbb21
commit 7800a71291
19 changed files with 336 additions and 247 deletions

View File

@ -21,7 +21,7 @@
*/
#include "pg_backup_db.h"
#include "dumputils.h"
#include "pg_backup_utils.h"
#include "parallel.h"
#include <ctype.h>