Skip to content

Commit a797af7

Browse files
authored
Merge pull request #161 from postgres/master
Sync Fork from Upstream
2 parents 39ebb24 + 4cd7a18 commit a797af7

File tree

430 files changed

+10524
-4645
lines changed

Some content is hidden

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

430 files changed

+10524
-4645
lines changed

config/thread_test.c

Lines changed: 0 additions & 433 deletions
This file was deleted.

configure

Lines changed: 42 additions & 152 deletions
Original file line numberDiff line numberDiff line change
@@ -11939,10 +11939,10 @@ if test "$ac_res" != no; then :
1193911939

1194011940
fi
1194111941

11942-
# Required for thread_test.c on Solaris
11943-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sched_yield" >&5
11944-
$as_echo_n "checking for library containing sched_yield... " >&6; }
11945-
if ${ac_cv_search_sched_yield+:} false; then :
11942+
# Cygwin:
11943+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
11944+
$as_echo_n "checking for library containing shmget... " >&6; }
11945+
if ${ac_cv_search_shmget+:} false; then :
1194611946
$as_echo_n "(cached) " >&6
1194711947
else
1194811948
ac_func_search_save_LIBS=$LIBS
@@ -11955,52 +11955,51 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1195511955
#ifdef __cplusplus
1195611956
extern "C"
1195711957
#endif
11958-
char sched_yield ();
11958+
char shmget ();
1195911959
int
1196011960
main ()
1196111961
{
11962-
return sched_yield ();
11962+
return shmget ();
1196311963
;
1196411964
return 0;
1196511965
}
1196611966
_ACEOF
11967-
for ac_lib in '' rt; do
11967+
for ac_lib in '' cygipc; do
1196811968
if test -z "$ac_lib"; then
1196911969
ac_res="none required"
1197011970
else
1197111971
ac_res=-l$ac_lib
1197211972
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
1197311973
fi
1197411974
if ac_fn_c_try_link "$LINENO"; then :
11975-
ac_cv_search_sched_yield=$ac_res
11975+
ac_cv_search_shmget=$ac_res
1197611976
fi
1197711977
rm -f core conftest.err conftest.$ac_objext \
1197811978
conftest$ac_exeext
11979-
if ${ac_cv_search_sched_yield+:} false; then :
11979+
if ${ac_cv_search_shmget+:} false; then :
1198011980
break
1198111981
fi
1198211982
done
11983-
if ${ac_cv_search_sched_yield+:} false; then :
11983+
if ${ac_cv_search_shmget+:} false; then :
1198411984

1198511985
else
11986-
ac_cv_search_sched_yield=no
11986+
ac_cv_search_shmget=no
1198711987
fi
1198811988
rm conftest.$ac_ext
1198911989
LIBS=$ac_func_search_save_LIBS
1199011990
fi
11991-
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sched_yield" >&5
11992-
$as_echo "$ac_cv_search_sched_yield" >&6; }
11993-
ac_res=$ac_cv_search_sched_yield
11991+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
11992+
$as_echo "$ac_cv_search_shmget" >&6; }
11993+
ac_res=$ac_cv_search_shmget
1199411994
if test "$ac_res" != no; then :
1199511995
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
1199611996

1199711997
fi
1199811998

11999-
# Required for thread_test.c on Solaris 2.5:
12000-
# Other ports use it too (HP-UX) so test unconditionally
12001-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname_r" >&5
12002-
$as_echo_n "checking for library containing gethostbyname_r... " >&6; }
12003-
if ${ac_cv_search_gethostbyname_r+:} false; then :
11999+
# *BSD:
12000+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace_symbols" >&5
12001+
$as_echo_n "checking for library containing backtrace_symbols... " >&6; }
12002+
if ${ac_cv_search_backtrace_symbols+:} false; then :
1200412003
$as_echo_n "(cached) " >&6
1200512004
else
1200612005
ac_func_search_save_LIBS=$LIBS
@@ -12013,108 +12012,52 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1201312012
#ifdef __cplusplus
1201412013
extern "C"
1201512014
#endif
12016-
char gethostbyname_r ();
12015+
char backtrace_symbols ();
1201712016
int
1201812017
main ()
1201912018
{
12020-
return gethostbyname_r ();
12019+
return backtrace_symbols ();
1202112020
;
1202212021
return 0;
1202312022
}
1202412023
_ACEOF
12025-
for ac_lib in '' nsl; do
12024+
for ac_lib in '' execinfo; do
1202612025
if test -z "$ac_lib"; then
1202712026
ac_res="none required"
1202812027
else
1202912028
ac_res=-l$ac_lib
1203012029
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
1203112030
fi
1203212031
if ac_fn_c_try_link "$LINENO"; then :
12033-
ac_cv_search_gethostbyname_r=$ac_res
12032+
ac_cv_search_backtrace_symbols=$ac_res
1203412033
fi
1203512034
rm -f core conftest.err conftest.$ac_objext \
1203612035
conftest$ac_exeext
12037-
if ${ac_cv_search_gethostbyname_r+:} false; then :
12036+
if ${ac_cv_search_backtrace_symbols+:} false; then :
1203812037
break
1203912038
fi
1204012039
done
12041-
if ${ac_cv_search_gethostbyname_r+:} false; then :
12040+
if ${ac_cv_search_backtrace_symbols+:} false; then :
1204212041

1204312042
else
12044-
ac_cv_search_gethostbyname_r=no
12043+
ac_cv_search_backtrace_symbols=no
1204512044
fi
1204612045
rm conftest.$ac_ext
1204712046
LIBS=$ac_func_search_save_LIBS
1204812047
fi
12049-
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname_r" >&5
12050-
$as_echo "$ac_cv_search_gethostbyname_r" >&6; }
12051-
ac_res=$ac_cv_search_gethostbyname_r
12048+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace_symbols" >&5
12049+
$as_echo "$ac_cv_search_backtrace_symbols" >&6; }
12050+
ac_res=$ac_cv_search_backtrace_symbols
1205212051
if test "$ac_res" != no; then :
1205312052
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
1205412053

1205512054
fi
1205612055

12057-
# Cygwin:
12058-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
12059-
$as_echo_n "checking for library containing shmget... " >&6; }
12060-
if ${ac_cv_search_shmget+:} false; then :
12061-
$as_echo_n "(cached) " >&6
12062-
else
12063-
ac_func_search_save_LIBS=$LIBS
12064-
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12065-
/* end confdefs.h. */
1206612056

12067-
/* Override any GCC internal prototype to avoid an error.
12068-
Use char because int might match the return type of a GCC
12069-
builtin and then its argument prototype would still apply. */
12070-
#ifdef __cplusplus
12071-
extern "C"
12072-
#endif
12073-
char shmget ();
12074-
int
12075-
main ()
12076-
{
12077-
return shmget ();
12078-
;
12079-
return 0;
12080-
}
12081-
_ACEOF
12082-
for ac_lib in '' cygipc; do
12083-
if test -z "$ac_lib"; then
12084-
ac_res="none required"
12085-
else
12086-
ac_res=-l$ac_lib
12087-
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12088-
fi
12089-
if ac_fn_c_try_link "$LINENO"; then :
12090-
ac_cv_search_shmget=$ac_res
12091-
fi
12092-
rm -f core conftest.err conftest.$ac_objext \
12093-
conftest$ac_exeext
12094-
if ${ac_cv_search_shmget+:} false; then :
12095-
break
12096-
fi
12097-
done
12098-
if ${ac_cv_search_shmget+:} false; then :
12099-
12100-
else
12101-
ac_cv_search_shmget=no
12102-
fi
12103-
rm conftest.$ac_ext
12104-
LIBS=$ac_func_search_save_LIBS
12105-
fi
12106-
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
12107-
$as_echo "$ac_cv_search_shmget" >&6; }
12108-
ac_res=$ac_cv_search_shmget
12109-
if test "$ac_res" != no; then :
12110-
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12111-
12112-
fi
12113-
12114-
# *BSD:
12115-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace_symbols" >&5
12116-
$as_echo_n "checking for library containing backtrace_symbols... " >&6; }
12117-
if ${ac_cv_search_backtrace_symbols+:} false; then :
12057+
if test "$enable_thread_safety" = yes; then
12058+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname_r" >&5
12059+
$as_echo_n "checking for library containing gethostbyname_r... " >&6; }
12060+
if ${ac_cv_search_gethostbyname_r+:} false; then :
1211812061
$as_echo_n "(cached) " >&6
1211912062
else
1212012063
ac_func_search_save_LIBS=$LIBS
@@ -12127,49 +12070,47 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1212712070
#ifdef __cplusplus
1212812071
extern "C"
1212912072
#endif
12130-
char backtrace_symbols ();
12073+
char gethostbyname_r ();
1213112074
int
1213212075
main ()
1213312076
{
12134-
return backtrace_symbols ();
12077+
return gethostbyname_r ();
1213512078
;
1213612079
return 0;
1213712080
}
1213812081
_ACEOF
12139-
for ac_lib in '' execinfo; do
12082+
for ac_lib in '' nsl; do
1214012083
if test -z "$ac_lib"; then
1214112084
ac_res="none required"
1214212085
else
1214312086
ac_res=-l$ac_lib
1214412087
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
1214512088
fi
1214612089
if ac_fn_c_try_link "$LINENO"; then :
12147-
ac_cv_search_backtrace_symbols=$ac_res
12090+
ac_cv_search_gethostbyname_r=$ac_res
1214812091
fi
1214912092
rm -f core conftest.err conftest.$ac_objext \
1215012093
conftest$ac_exeext
12151-
if ${ac_cv_search_backtrace_symbols+:} false; then :
12094+
if ${ac_cv_search_gethostbyname_r+:} false; then :
1215212095
break
1215312096
fi
1215412097
done
12155-
if ${ac_cv_search_backtrace_symbols+:} false; then :
12098+
if ${ac_cv_search_gethostbyname_r+:} false; then :
1215612099

1215712100
else
12158-
ac_cv_search_backtrace_symbols=no
12101+
ac_cv_search_gethostbyname_r=no
1215912102
fi
1216012103
rm conftest.$ac_ext
1216112104
LIBS=$ac_func_search_save_LIBS
1216212105
fi
12163-
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace_symbols" >&5
12164-
$as_echo "$ac_cv_search_backtrace_symbols" >&6; }
12165-
ac_res=$ac_cv_search_backtrace_symbols
12106+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname_r" >&5
12107+
$as_echo "$ac_cv_search_gethostbyname_r" >&6; }
12108+
ac_res=$ac_cv_search_gethostbyname_r
1216612109
if test "$ac_res" != no; then :
1216712110
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
1216812111

1216912112
fi
1217012113

12171-
12172-
if test "$enable_thread_safety" = yes; then
1217312114
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_barrier_wait" >&5
1217412115
$as_echo_n "checking for library containing pthread_barrier_wait... " >&6; }
1217512116
if ${ac_cv_search_pthread_barrier_wait+:} false; then :
@@ -19456,57 +19397,6 @@ fi
1945619397
fi
1945719398
fi
1945819399

19459-
# Thread testing
19460-
19461-
# We have to run the thread test near the end so we have all our symbols
19462-
# defined. Cross compiling throws a warning.
19463-
#
19464-
if test "$enable_thread_safety" = yes; then
19465-
if test "$PORTNAME" != "win32"
19466-
then
19467-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking thread safety of required library functions" >&5
19468-
$as_echo_n "checking thread safety of required library functions... " >&6; }
19469-
19470-
_CFLAGS="$CFLAGS"
19471-
_LIBS="$LIBS"
19472-
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
19473-
LIBS="$LIBS $PTHREAD_LIBS"
19474-
if test "$cross_compiling" = yes; then :
19475-
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: maybe" >&5
19476-
$as_echo "maybe" >&6; }
19477-
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
19478-
*** Skipping thread test program because of cross-compile build.
19479-
" >&5
19480-
$as_echo "$as_me: WARNING:
19481-
*** Skipping thread test program because of cross-compile build.
19482-
" >&2;}
19483-
else
19484-
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19485-
/* end confdefs.h. */
19486-
#include "$srcdir/config/thread_test.c"
19487-
_ACEOF
19488-
if ac_fn_c_try_run "$LINENO"; then :
19489-
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19490-
$as_echo "yes" >&6; }
19491-
else
19492-
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19493-
$as_echo "no" >&6; }
19494-
as_fn_error $? "thread test program failed
19495-
This platform is not thread-safe. Check the file 'config.log' for the
19496-
exact reason, or use --disable-thread-safety to disable thread safety." "$LINENO" 5
19497-
fi
19498-
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19499-
conftest.$ac_objext conftest.beam conftest.$ac_ext
19500-
fi
19501-
19502-
CFLAGS="$_CFLAGS"
19503-
LIBS="$_LIBS"
19504-
else
19505-
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** skipping thread test on Win32" >&5
19506-
$as_echo "$as_me: WARNING: *** skipping thread test on Win32" >&2;}
19507-
fi
19508-
fi
19509-
1951019400
# If compiler will take -Wl,--as-needed (or various platform-specific
1951119401
# spellings thereof) then add that to LDFLAGS. This is much easier than
1951219402
# trying to filter LIBS to the minimum for each executable.

configure.ac

Lines changed: 1 addition & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1178,17 +1178,13 @@ AC_SEARCH_LIBS(shm_unlink, rt)
11781178
AC_SEARCH_LIBS(clock_gettime, [rt posix4])
11791179
# Solaris:
11801180
AC_SEARCH_LIBS(fdatasync, [rt posix4])
1181-
# Required for thread_test.c on Solaris
1182-
AC_SEARCH_LIBS(sched_yield, rt)
1183-
# Required for thread_test.c on Solaris 2.5:
1184-
# Other ports use it too (HP-UX) so test unconditionally
1185-
AC_SEARCH_LIBS(gethostbyname_r, nsl)
11861181
# Cygwin:
11871182
AC_SEARCH_LIBS(shmget, cygipc)
11881183
# *BSD:
11891184
AC_SEARCH_LIBS(backtrace_symbols, execinfo)
11901185

11911186
if test "$enable_thread_safety" = yes; then
1187+
AC_SEARCH_LIBS(gethostbyname_r, nsl)
11921188
AC_SEARCH_LIBS(pthread_barrier_wait, pthread)
11931189
fi
11941190

@@ -2362,38 +2358,6 @@ if test "$enable_tap_tests" = yes; then
23622358
fi
23632359
fi
23642360

2365-
# Thread testing
2366-
2367-
# We have to run the thread test near the end so we have all our symbols
2368-
# defined. Cross compiling throws a warning.
2369-
#
2370-
if test "$enable_thread_safety" = yes; then
2371-
if test "$PORTNAME" != "win32"
2372-
then
2373-
AC_MSG_CHECKING([thread safety of required library functions])
2374-
2375-
_CFLAGS="$CFLAGS"
2376-
_LIBS="$LIBS"
2377-
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
2378-
LIBS="$LIBS $PTHREAD_LIBS"
2379-
AC_RUN_IFELSE(
2380-
[AC_LANG_SOURCE([[#include "$srcdir/config/thread_test.c"]])],
2381-
[AC_MSG_RESULT(yes)],
2382-
[AC_MSG_RESULT(no)
2383-
AC_MSG_ERROR([thread test program failed
2384-
This platform is not thread-safe. Check the file 'config.log' for the
2385-
exact reason, or use --disable-thread-safety to disable thread safety.])],
2386-
[AC_MSG_RESULT(maybe)
2387-
AC_MSG_WARN([
2388-
*** Skipping thread test program because of cross-compile build.
2389-
])])
2390-
CFLAGS="$_CFLAGS"
2391-
LIBS="$_LIBS"
2392-
else
2393-
AC_MSG_WARN([*** skipping thread test on Win32])
2394-
fi
2395-
fi
2396-
23972361
# If compiler will take -Wl,--as-needed (or various platform-specific
23982362
# spellings thereof) then add that to LDFLAGS. This is much easier than
23992363
# trying to filter LIBS to the minimum for each executable.

contrib/amcheck/t/001_verify_heapam.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#
1616
# Test set-up
1717
#
18-
$node = get_new_node('test');
18+
$node = PostgresNode->new('test');
1919
$node->init;
2020
$node->append_conf('postgresql.conf', 'autovacuum=off');
2121
$node->start;

contrib/auto_explain/t/001_auto_explain.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
use TestLib;
99
use Test::More tests => 4;
1010

11-
my $node = get_new_node('main');
11+
my $node = PostgresNode->new('main');
1212
$node->init;
1313
$node->append_conf('postgresql.conf',
1414
"shared_preload_libraries = 'auto_explain'");

0 commit comments

Comments
 (0)