Skip to content

Commit 1a683df

Browse files
committed
Merge commit '384f933046dc9e9a2b416f5f7b3be30b93587c63' into catalog_mvcc
Conflicts: configure configure.in contrib/pgbench/pgbench.c src/backend/access/common/printtup.c src/backend/postmaster/postmaster.c src/include/pg_config.h.win32 src/include/storage/procarray.h src/test/regress/expected/create_index.out src/test/regress/expected/foreign_key.out
2 parents 094954c + 384f933 commit 1a683df

File tree

155 files changed

+7880
-6243
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

155 files changed

+7880
-6243
lines changed

config/c-library.m4

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ res = _timezone / 60;
1818
[pgac_cv_var_int_timezone=yes],
1919
[pgac_cv_var_int_timezone=no])])
2020
if test x"$pgac_cv_var_int_timezone" = xyes ; then
21-
AC_DEFINE(HAVE_INT_TIMEZONE,, [Define to 1 if you have the global variable 'int timezone'.])
21+
AC_DEFINE(HAVE_INT_TIMEZONE, 1,
22+
[Define to 1 if you have the global variable 'int timezone'.])
2223
fi])# PGAC_VAR_INT_TIMEZONE
2324

2425

@@ -68,7 +69,8 @@ gettimeofday(tp,tzp);],
6869
[pgac_cv_func_gettimeofday_1arg=no],
6970
[pgac_cv_func_gettimeofday_1arg=yes])])
7071
if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
71-
AC_DEFINE(GETTIMEOFDAY_1ARG,, [Define to 1 if gettimeofday() takes only 1 argument.])
72+
AC_DEFINE(GETTIMEOFDAY_1ARG, 1,
73+
[Define to 1 if gettimeofday() takes only 1 argument.])
7274
fi
7375
AH_VERBATIM(GETTIMEOFDAY_1ARG_,
7476
[@%:@ifdef GETTIMEOFDAY_1ARG
@@ -95,7 +97,8 @@ getpwuid_r(uid, space, buf, bufsize, result);],
9597
[pgac_cv_func_getpwuid_r_5arg=yes],
9698
[pgac_cv_func_getpwuid_r_5arg=no])])
9799
if test x"$pgac_cv_func_getpwuid_r_5arg" = xyes ; then
98-
AC_DEFINE(GETPWUID_R_5ARG,, [Define to 1 if getpwuid_r() takes a 5th argument.])
100+
AC_DEFINE(GETPWUID_R_5ARG, 1,
101+
[Define to 1 if getpwuid_r() takes a 5th argument.])
99102
fi
100103
])# PGAC_FUNC_GETPWUID_R_5ARG
101104

@@ -117,7 +120,8 @@ int strerror_r();
117120
[pgac_cv_func_strerror_r_int=yes],
118121
[pgac_cv_func_strerror_r_int=no])])
119122
if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
120-
AC_DEFINE(STRERROR_R_INT,, [Define to 1 if strerror_r() returns a int.])
123+
AC_DEFINE(STRERROR_R_INT, 1,
124+
[Define to 1 if strerror_r() returns a int.])
121125
fi
122126
])# PGAC_FUNC_STRERROR_R_INT
123127

@@ -210,7 +214,8 @@ sigaction(0, &act, &oact);],
210214
[pgac_cv_func_posix_signals=yes],
211215
[pgac_cv_func_posix_signals=no])])
212216
if test x"$pgac_cv_func_posix_signals" = xyes ; then
213-
AC_DEFINE(HAVE_POSIX_SIGNALS,, [Define to 1 if you have the POSIX signal interface.])
217+
AC_DEFINE(HAVE_POSIX_SIGNALS, 1,
218+
[Define to 1 if you have the POSIX signal interface.])
214219
fi
215220
HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
216221
AC_SUBST(HAVE_POSIX_SIGNALS)])# PGAC_FUNC_POSIX_SIGNALS

configure

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#! /bin/sh
22
# Guess values for system-dependent variables and create Makefiles.
3-
# Generated by GNU Autoconf 2.63 for Postgres-XC 1.2devel.
3+
# Generated by GNU Autoconf 2.63 for Postgres-XC 1.3devel.
44
#
55
# Report bugs to <postgres-xc-bugs@lists.sourceforge.net>.
66
#
@@ -597,8 +597,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
597597
PACKAGE_NAME='Postgres-XC'
598598
PACKAGE_TARNAME='postgres-xc'
599599
# Package is based on former PostgreSQL, so base package version on that
600-
PACKAGE_VERSION='9.3beta1'
601-
# Postgres-XC 1.2devel is based on PostgreSQL 9.3RC1
600+
PACKAGE_VERSION='9.4beta1'
601+
# Postgres-XC 1.3devel is based on PostgreSQL 9.4devel
602602
PACKAGE_STRING='Postgres-XC 1.2devel'
603603
PACKAGE_BUGREPORT='postgres-xc-bugs@lists.sourceforge.net'
604604

@@ -1414,7 +1414,7 @@ if test "$ac_init_help" = "long"; then
14141414
# Omit some internal or obsolete options to make the list less imposing.
14151415
# This message is too long to be a string in the A/UX 3.1 sh.
14161416
cat <<_ACEOF
1417-
\`configure' configures Postgres-XC 1.2devel to adapt to many kinds of systems.
1417+
\`configure' configures Postgres-XC 1.3devel to adapt to many kinds of systems.
14181418

14191419
Usage: $0 [OPTION]... [VAR=VALUE]...
14201420

@@ -1479,7 +1479,7 @@ fi
14791479

14801480
if test -n "$ac_init_help"; then
14811481
case $ac_init_help in
1482-
short | recursive ) echo "Configuration of Postgres-XC 1.2devel:";;
1482+
short | recursive ) echo "Configuration of Postgres-XC 1.3devel:";;
14831483
esac
14841484
cat <<\_ACEOF
14851485

@@ -1625,7 +1625,7 @@ fi
16251625
test -n "$ac_init_help" && exit $ac_status
16261626
if $ac_init_version; then
16271627
cat <<\_ACEOF
1628-
Postgres-XC configure 1.2devel
1628+
Postgres-XC configure 1.3devel
16291629
generated by GNU Autoconf 2.63
16301630

16311631
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1641,7 +1641,7 @@ cat >config.log <<_ACEOF
16411641
This file contains any messages produced by compilers while
16421642
running configure, to aid debugging if configure makes a mistake.
16431643

1644-
It was created by Postgres-XC $as_me 1.2devel, which was
1644+
It was created by Postgres-XC $as_me 1.3devel, which was
16451645
generated by GNU Autoconf 2.63. Invocation command line was
16461646

16471647
$ $0 $@
@@ -19510,7 +19510,7 @@ $as_echo "$pgac_cv_var_int_timezone" >&6; }
1951019510
if test x"$pgac_cv_var_int_timezone" = xyes ; then
1951119511

1951219512
cat >>confdefs.h <<\_ACEOF
19513-
#define HAVE_INT_TIMEZONE /**/
19513+
#define HAVE_INT_TIMEZONE 1
1951419514
_ACEOF
1951519515

1951619516
fi
@@ -19678,7 +19678,7 @@ $as_echo "$pgac_cv_func_gettimeofday_1arg" >&6; }
1967819678
if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
1967919679

1968019680
cat >>confdefs.h <<\_ACEOF
19681-
#define GETTIMEOFDAY_1ARG /**/
19681+
#define GETTIMEOFDAY_1ARG 1
1968219682
_ACEOF
1968319683

1968419684
fi
@@ -20694,7 +20694,7 @@ $as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
2069420694
if test "$pgac_cv_var_PS_STRINGS" = yes ; then
2069520695

2069620696
cat >>confdefs.h <<\_ACEOF
20697-
#define HAVE_PS_STRINGS /**/
20697+
#define HAVE_PS_STRINGS 1
2069820698
_ACEOF
2069920699

2070020700
fi
@@ -23955,7 +23955,7 @@ $as_echo "$pgac_cv_func_getpwuid_r_5arg" >&6; }
2395523955
if test x"$pgac_cv_func_getpwuid_r_5arg" = xyes ; then
2395623956

2395723957
cat >>confdefs.h <<\_ACEOF
23958-
#define GETPWUID_R_5ARG /**/
23958+
#define GETPWUID_R_5ARG 1
2395923959
_ACEOF
2396023960

2396123961
fi
@@ -24018,7 +24018,7 @@ $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
2401824018
if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
2401924019

2402024020
cat >>confdefs.h <<\_ACEOF
24021-
#define STRERROR_R_INT /**/
24021+
#define STRERROR_R_INT 1
2402224022
_ACEOF
2402324023

2402424024
fi
@@ -28656,7 +28656,7 @@ $as_echo "$pgac_cv_func_posix_signals" >&6; }
2865628656
if test x"$pgac_cv_func_posix_signals" = xyes ; then
2865728657

2865828658
cat >>confdefs.h <<\_ACEOF
28659-
#define HAVE_POSIX_SIGNALS /**/
28659+
#define HAVE_POSIX_SIGNALS 1
2866028660
_ACEOF
2866128661

2866228662
fi
@@ -30847,7 +30847,7 @@ exec 6>&1
3084730847
# report actual input values of CONFIG_FILES etc. instead of their
3084830848
# values after options handling.
3084930849
ac_log="
30850-
This file was extended by Postgres-XC $as_me 1.2devel, which was
30850+
This file was extended by Postgres-XC $as_me 1.3devel, which was
3085130851
generated by GNU Autoconf 2.63. Invocation command line was
3085230852

3085330853
CONFIG_FILES = $CONFIG_FILES
@@ -30914,7 +30914,7 @@ Report bugs to <bug-autoconf@gnu.org>."
3091430914
_ACEOF
3091530915
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
3091630916
ac_cs_version="\\
30917-
Postgres-XC config.status 1.2devel
30917+
Postgres-XC config.status 1.3devel
3091830918
configured by $0, generated by GNU Autoconf 2.63,
3091930919
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
3092030920

configure.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ dnl Read the Autoconf manual for details.
1717
dnl
1818
m4_pattern_forbid(^PGAC_)dnl to catch undefined macros
1919

20-
AC_INIT([Postgres-XC], [1.2devel], [pgsql-bugs@postgresql.org])
20+
AC_INIT([Postgres-XC], [1.3devel], [pgsql-bugs@postgresql.org])
2121

2222
m4_if(m4_defn([m4_PACKAGE_VERSION]), [2.63], [], [m4_fatal([Autoconf version 2.63 is required.
2323
Untested combinations of 'autoconf' and PostgreSQL versions are not
@@ -1267,7 +1267,7 @@ PS_STRINGS->ps_argvstr = "foo";],
12671267
[pgac_cv_var_PS_STRINGS=yes],
12681268
[pgac_cv_var_PS_STRINGS=no])])
12691269
if test "$pgac_cv_var_PS_STRINGS" = yes ; then
1270-
AC_DEFINE([HAVE_PS_STRINGS], [], [Define to 1 if the PS_STRINGS thing exists.])
1270+
AC_DEFINE([HAVE_PS_STRINGS], 1, [Define to 1 if the PS_STRINGS thing exists.])
12711271
fi
12721272

12731273

contrib/pg_test_fsync/pg_test_fsync.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,7 @@ handle_args(int argc, char *argv[])
146146

147147
if (argc > 1)
148148
{
149-
if (strcmp(argv[1], "--help") == 0 || strcmp(argv[1], "-h") == 0 ||
150-
strcmp(argv[1], "-?") == 0)
149+
if (strcmp(argv[1], "--help") == 0 || strcmp(argv[1], "-?") == 0)
151150
{
152151
printf("Usage: %s [-f FILENAME] [-s SECS-PER-TEST]\n", progname);
153152
exit(0);

contrib/pg_test_timing/pg_test_timing.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@ handle_args(int argc, char *argv[])
4949

5050
if (argc > 1)
5151
{
52-
if (strcmp(argv[1], "--help") == 0 || strcmp(argv[1], "-h") == 0 ||
53-
strcmp(argv[1], "-?") == 0)
52+
if (strcmp(argv[1], "--help") == 0 || strcmp(argv[1], "-?") == 0)
5453
{
5554
printf("Usage: %s [-d DURATION]\n", progname);
5655
exit(0);

contrib/pg_upgrade/check.c

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,13 @@ void
459459
create_script_for_cluster_analyze(char **analyze_script_file_name)
460460
{
461461
FILE *script = NULL;
462+
char *user_specification = "";
463+
464+
if (os_info.user_specified)
465+
{
466+
user_specification = pg_malloc(strlen(os_info.user) + 7);
467+
sprintf(user_specification, "-U \"%s\" ", os_info.user);
468+
}
462469

463470
*analyze_script_file_name = pg_malloc(MAXPGPATH);
464471

@@ -501,7 +508,8 @@ create_script_for_cluster_analyze(char **analyze_script_file_name)
501508
ECHO_QUOTE, ECHO_QUOTE);
502509
fprintf(script, "echo %sthis script and run:%s\n",
503510
ECHO_QUOTE, ECHO_QUOTE);
504-
fprintf(script, "echo %s \"%s/vacuumdb\" --all %s%s\n", ECHO_QUOTE, new_cluster.bindir,
511+
fprintf(script, "echo %s \"%s/vacuumdb\" %s--all %s%s\n", ECHO_QUOTE,
512+
new_cluster.bindir, user_specification,
505513
/* Did we copy the free space files? */
506514
(GET_MAJOR_VERSION(old_cluster.major_version) >= 804) ?
507515
"--analyze-only" : "--analyze", ECHO_QUOTE);
@@ -522,7 +530,8 @@ create_script_for_cluster_analyze(char **analyze_script_file_name)
522530
ECHO_QUOTE, ECHO_QUOTE);
523531
fprintf(script, "echo %s--------------------------------------------------%s\n",
524532
ECHO_QUOTE, ECHO_QUOTE);
525-
fprintf(script, "\"%s/vacuumdb\" --all --analyze-only\n", new_cluster.bindir);
533+
fprintf(script, "\"%s/vacuumdb\" %s--all --analyze-only\n",
534+
new_cluster.bindir, user_specification);
526535
fprintf(script, "echo%s\n", ECHO_BLANK);
527536
fprintf(script, "echo %sThe server is now available with minimal optimizer statistics.%s\n",
528537
ECHO_QUOTE, ECHO_QUOTE);
@@ -543,7 +552,8 @@ create_script_for_cluster_analyze(char **analyze_script_file_name)
543552
ECHO_QUOTE, ECHO_QUOTE);
544553
fprintf(script, "echo %s---------------------------------------------------%s\n",
545554
ECHO_QUOTE, ECHO_QUOTE);
546-
fprintf(script, "\"%s/vacuumdb\" --all --analyze-only\n", new_cluster.bindir);
555+
fprintf(script, "\"%s/vacuumdb\" %s--all --analyze-only\n",
556+
new_cluster.bindir, user_specification);
547557
fprintf(script, "echo%s\n\n", ECHO_BLANK);
548558

549559
#ifndef WIN32
@@ -556,7 +566,8 @@ create_script_for_cluster_analyze(char **analyze_script_file_name)
556566
ECHO_QUOTE, ECHO_QUOTE);
557567
fprintf(script, "echo %s-------------------------------------------------------------%s\n",
558568
ECHO_QUOTE, ECHO_QUOTE);
559-
fprintf(script, "\"%s/vacuumdb\" --all %s\n", new_cluster.bindir,
569+
fprintf(script, "\"%s/vacuumdb\" %s--all %s\n", new_cluster.bindir,
570+
user_specification,
560571
/* Did we copy the free space files? */
561572
(GET_MAJOR_VERSION(old_cluster.major_version) >= 804) ?
562573
"--analyze-only" : "--analyze");
@@ -573,6 +584,9 @@ create_script_for_cluster_analyze(char **analyze_script_file_name)
573584
*analyze_script_file_name, getErrorText(errno));
574585
#endif
575586

587+
if (os_info.user_specified)
588+
pg_free(user_specification);
589+
576590
check_ok();
577591
}
578592

contrib/pg_upgrade/option.c

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ parseCommandLine(int argc, char *argv[])
4848
{"old-port", required_argument, NULL, 'p'},
4949
{"new-port", required_argument, NULL, 'P'},
5050

51-
{"user", required_argument, NULL, 'u'},
51+
{"username", required_argument, NULL, 'U'},
5252
{"check", no_argument, NULL, 'c'},
5353
{"link", no_argument, NULL, 'k'},
5454
{"retain", no_argument, NULL, 'r'},
@@ -82,8 +82,7 @@ parseCommandLine(int argc, char *argv[])
8282

8383
if (argc > 1)
8484
{
85-
if (strcmp(argv[1], "--help") == 0 || strcmp(argv[1], "-h") == 0 ||
86-
strcmp(argv[1], "-?") == 0)
85+
if (strcmp(argv[1], "--help") == 0 || strcmp(argv[1], "-?") == 0)
8786
{
8887
usage();
8988
exit(0);
@@ -102,7 +101,7 @@ parseCommandLine(int argc, char *argv[])
102101
if ((log_opts.internal = fopen_priv(INTERNAL_LOG_FILE, "a")) == NULL)
103102
pg_log(PG_FATAL, "cannot write to log file %s\n", INTERNAL_LOG_FILE);
104103

105-
while ((option = getopt_long(argc, argv, "d:D:b:B:cj:ko:O:p:P:ru:v",
104+
while ((option = getopt_long(argc, argv, "d:D:b:B:cj:ko:O:p:P:rU:v",
106105
long_options, &optindex)) != -1)
107106
{
108107
switch (option)
@@ -170,9 +169,10 @@ parseCommandLine(int argc, char *argv[])
170169
log_opts.retain = true;
171170
break;
172171

173-
case 'u':
172+
case 'U':
174173
pg_free(os_info.user);
175174
os_info.user = pg_strdup(optarg);
175+
os_info.user_specified = true;
176176

177177
/*
178178
* Push the user name into the environment so pre-9.1
@@ -229,33 +229,33 @@ usage(void)
229229
pg_upgrade [OPTION]...\n\
230230
\n\
231231
Options:\n\
232-
-b, --old-bindir=OLDBINDIR old cluster executable directory\n\
233-
-B, --new-bindir=NEWBINDIR new cluster executable directory\n\
232+
-b, --old-bindir=BINDIR old cluster executable directory\n\
233+
-B, --new-bindir=BINDIR new cluster executable directory\n\
234234
-c, --check check clusters only, don't change any data\n\
235-
-d, --old-datadir=OLDDATADIR old cluster data directory\n\
236-
-D, --new-datadir=NEWDATADIR new cluster data directory\n\
235+
-d, --old-datadir=DATADIR old cluster data directory\n\
236+
-D, --new-datadir=DATADIR new cluster data directory\n\
237237
-j, --jobs number of simultaneous processes or threads to use\n\
238238
-k, --link link instead of copying files to new cluster\n\
239239
-o, --old-options=OPTIONS old cluster options to pass to the server\n\
240240
-O, --new-options=OPTIONS new cluster options to pass to the server\n\
241-
-p, --old-port=OLDPORT old cluster port number (default %d)\n\
242-
-P, --new-port=NEWPORT new cluster port number (default %d)\n\
241+
-p, --old-port=PORT old cluster port number (default %d)\n\
242+
-P, --new-port=PORT new cluster port number (default %d)\n\
243243
-r, --retain retain SQL and log files after success\n\
244-
-u, --user=NAME cluster superuser (default \"%s\")\n\
244+
-U, --username=NAME cluster superuser (default \"%s\")\n\
245245
-v, --verbose enable verbose internal logging\n\
246246
-V, --version display version information, then exit\n\
247-
-?, -h, --help show this help, then exit\n\
247+
-?, --help show this help, then exit\n\
248248
\n\
249249
Before running pg_upgrade you must:\n\
250250
create a new database cluster (using the new version of initdb)\n\
251251
shutdown the postmaster servicing the old cluster\n\
252252
shutdown the postmaster servicing the new cluster\n\
253253
\n\
254254
When you run pg_upgrade, you must provide the following information:\n\
255-
the data directory for the old cluster (-d OLDDATADIR)\n\
256-
the data directory for the new cluster (-D NEWDATADIR)\n\
257-
the \"bin\" directory for the old version (-b OLDBINDIR)\n\
258-
the \"bin\" directory for the new version (-B NEWBINDIR)\n\
255+
the data directory for the old cluster (-d DATADIR)\n\
256+
the data directory for the new cluster (-D DATADIR)\n\
257+
the \"bin\" directory for the old version (-b BINDIR)\n\
258+
the \"bin\" directory for the new version (-B BINDIR)\n\
259259
\n\
260260
For example:\n\
261261
pg_upgrade -d oldCluster/data -D newCluster/data -b oldCluster/bin -B newCluster/bin\n\

contrib/pg_upgrade/pg_upgrade.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,7 @@ typedef struct
291291
const char *progname; /* complete pathname for this program */
292292
char *exec_path; /* full path to my executable */
293293
char *user; /* username for clusters */
294+
bool user_specified; /* user specified on command-line */
294295
char **old_tablespaces; /* tablespaces */
295296
int num_old_tablespaces;
296297
char **libraries; /* loadable libraries */

contrib/pg_upgrade/server.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ start_postmaster(ClusterInfo *cluster, bool throw_error)
190190
#ifdef HAVE_UNIX_SOCKETS
191191
/* prevent TCP/IP connections, restrict socket access */
192192
strcat(socket_string,
193-
" -c listen_addresses='' -c unix_socket_permissions=0700");
193+
" -c listen_addresses=\"\" -c unix_socket_permissions=0700");
194194

195195
/* Have a sockdir? Tell the postmaster. */
196196
if (cluster->sockdir)

0 commit comments

Comments
 (0)