Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6944dc1

Browse files
author
Alexander Korotkov
committed
Merge tag 'REL9_4_7' into waits_monitoring_94
2 parents34df02d +d77841d commit6944dc1

File tree

128 files changed

+13788
-11105
lines changed

Some content is hidden

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

128 files changed

+13788
-11105
lines changed

‎config/c-library.m4

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,4 +366,34 @@ fi
366366
if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
367367
AC_DEFINE(LOCALE_T_IN_XLOCALE,1,
368368
[Define to 1 if `locale_t' requires <xlocale.h>.])
369-
fi])])# PGAC_HEADER_XLOCALE
369+
fi])# PGAC_TYPE_LOCALE_T
370+
371+
372+
# PGAC_FUNC_WCSTOMBS_L
373+
# --------------------
374+
# Try to find a declaration for wcstombs_l(). It might be in stdlib.h
375+
# (following the POSIX requirement for wcstombs()), or in locale.h, or in
376+
# xlocale.h. If it's in the latter, define WCSTOMBS_L_IN_XLOCALE.
377+
#
378+
AC_DEFUN([PGAC_FUNC_WCSTOMBS_L],
379+
[AC_CACHE_CHECK([for wcstombs_l declaration],pgac_cv_func_wcstombs_l,
380+
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
381+
[#include <stdlib.h>
382+
#include <locale.h>],
383+
[#ifndef wcstombs_l
384+
(void) wcstombs_l;
385+
#endif])],
386+
[pgac_cv_func_wcstombs_l='yes'],
387+
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
388+
[#include <stdlib.h>
389+
#include <locale.h>
390+
#include <xlocale.h>],
391+
[#ifndef wcstombs_l
392+
(void) wcstombs_l;
393+
#endif])],
394+
[pgac_cv_func_wcstombs_l='yes (in xlocale.h)'],
395+
[pgac_cv_func_wcstombs_l='no'])])])
396+
if test "$pgac_cv_func_wcstombs_l" = 'yes (in xlocale.h)'; then
397+
AC_DEFINE(WCSTOMBS_L_IN_XLOCALE,1,
398+
[Define to 1 if `wcstombs_l' requires <xlocale.h>.])
399+
fi])# PGAC_FUNC_WCSTOMBS_L

‎configure

Lines changed: 62 additions & 9 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.69 for PostgreSQL 9.4.6.
3+
# Generated by GNU Autoconf 2.69 for PostgreSQL 9.4.7.
44
#
55
# Report bugs to <pgsql-bugs@postgresql.org>.
66
#
@@ -582,8 +582,8 @@ MAKEFLAGS=
582582
# Identity of this package.
583583
PACKAGE_NAME='PostgreSQL'
584584
PACKAGE_TARNAME='postgresql'
585-
PACKAGE_VERSION='9.4.6'
586-
PACKAGE_STRING='PostgreSQL 9.4.6'
585+
PACKAGE_VERSION='9.4.7'
586+
PACKAGE_STRING='PostgreSQL 9.4.7'
587587
PACKAGE_BUGREPORT='pgsql-bugs@postgresql.org'
588588
PACKAGE_URL=''
589589

@@ -1393,7 +1393,7 @@ if test "$ac_init_help" = "long"; then
13931393
# Omit some internal or obsolete options to make the list less imposing.
13941394
# This message is too long to be a string in the A/UX 3.1 sh.
13951395
cat<<_ACEOF
1396-
\`configure' configures PostgreSQL 9.4.6 to adapt to many kinds of systems.
1396+
\`configure' configures PostgreSQL 9.4.7 to adapt to many kinds of systems.
13971397
13981398
Usage:$0 [OPTION]... [VAR=VALUE]...
13991399
@@ -1458,7 +1458,7 @@ fi
14581458

14591459
iftest -n"$ac_init_help";then
14601460
case$ac_init_helpin
1461-
short | recursive )echo"Configuration of PostgreSQL 9.4.6:";;
1461+
short | recursive )echo"Configuration of PostgreSQL 9.4.7:";;
14621462
esac
14631463
cat<<\_ACEOF
14641464
@@ -1607,7 +1607,7 @@ fi
16071607
test -n "$ac_init_help" && exit $ac_status
16081608
if $ac_init_version; then
16091609
cat <<\_ACEOF
1610-
PostgreSQL configure 9.4.6
1610+
PostgreSQL configure 9.4.7
16111611
generated by GNU Autoconf 2.69
16121612
16131613
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2318,7 +2318,7 @@ cat >config.log <<_ACEOF
23182318
This file contains any messages produced by compilers while
23192319
running configure, to aid debugging if configure makes a mistake.
23202320
2321-
It was created by PostgreSQL$as_me 9.4.6, which was
2321+
It was created by PostgreSQL$as_me 9.4.7, which was
23222322
generated by GNU Autoconf 2.69. Invocation command line was
23232323
23242324
$$0$@
@@ -11419,6 +11419,59 @@ $as_echo "#define GETTIMEOFDAY_1ARG 1" >>confdefs.h
1141911419

1142011420
fi
1142111421

11422+
{$as_echo"$as_me:${as_lineno-$LINENO}: checking for wcstombs_l declaration">&5
11423+
$as_echo_n"checking for wcstombs_l declaration...">&6; }
11424+
if${pgac_cv_func_wcstombs_l+:}false;then:
11425+
$as_echo_n"(cached)">&6
11426+
else
11427+
cat confdefs.h -<<_ACEOF >conftest.$ac_ext
11428+
/* end confdefs.h. */
11429+
#include <stdlib.h>
11430+
#include <locale.h>
11431+
int
11432+
main ()
11433+
{
11434+
#ifndef wcstombs_l
11435+
(void) wcstombs_l;
11436+
#endif
11437+
;
11438+
return 0;
11439+
}
11440+
_ACEOF
11441+
if ac_fn_c_try_compile"$LINENO";then:
11442+
pgac_cv_func_wcstombs_l='yes'
11443+
else
11444+
cat confdefs.h -<<_ACEOF >conftest.$ac_ext
11445+
/* end confdefs.h. */
11446+
#include <stdlib.h>
11447+
#include <locale.h>
11448+
#include <xlocale.h>
11449+
int
11450+
main ()
11451+
{
11452+
#ifndef wcstombs_l
11453+
(void) wcstombs_l;
11454+
#endif
11455+
;
11456+
return 0;
11457+
}
11458+
_ACEOF
11459+
if ac_fn_c_try_compile"$LINENO";then:
11460+
pgac_cv_func_wcstombs_l='yes (in xlocale.h)'
11461+
else
11462+
pgac_cv_func_wcstombs_l='no'
11463+
fi
11464+
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11465+
fi
11466+
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11467+
fi
11468+
{$as_echo"$as_me:${as_lineno-$LINENO}: result:$pgac_cv_func_wcstombs_l">&5
11469+
$as_echo"$pgac_cv_func_wcstombs_l">&6; }
11470+
iftest"$pgac_cv_func_wcstombs_l" ='yes (in xlocale.h)';then
11471+
11472+
$as_echo"#define WCSTOMBS_L_IN_XLOCALE 1">>confdefs.h
11473+
11474+
fi
1142211475

1142311476
# Some versions of libedit contain strlcpy(), setproctitle(), and other
1142411477
# symbols that that library has no business exposing to the world. Pending
@@ -15651,7 +15704,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
1565115704
# report actual input values of CONFIG_FILES etc. instead of their
1565215705
# values after options handling.
1565315706
ac_log="
15654-
This file was extended by PostgreSQL $as_me 9.4.6, which was
15707+
This file was extended by PostgreSQL $as_me 9.4.7, which was
1565515708
generated by GNU Autoconf 2.69. Invocation command line was
1565615709
1565715710
CONFIG_FILES = $CONFIG_FILES
@@ -15721,7 +15774,7 @@ _ACEOF
1572115774
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1572215775
ac_cs_config="`$as_echo"$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
1572315776
ac_cs_version="\\
15724-
PostgreSQL config.status 9.4.6
15777+
PostgreSQL config.status 9.4.7
1572515778
configured by$0, generated by GNU Autoconf 2.69,
1572615779
with options\\"\$ac_cs_config\\"
1572715780

‎configure.in

Lines changed: 2 additions & 1 deletion
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([PostgreSQL], [9.4.6], [pgsql-bugs@postgresql.org])
20+
AC_INIT([PostgreSQL], [9.4.7], [pgsql-bugs@postgresql.org])
2121

2222
m4_if(m4_defn([m4_PACKAGE_VERSION]), [2.69], [], [m4_fatal([Autoconf version 2.69 is required.
2323
Untested combinations of 'autoconf' and PostgreSQL versions are not
@@ -1291,6 +1291,7 @@ fi
12911291
PGAC_VAR_INT_TIMEZONE
12921292
AC_FUNC_ACCEPT_ARGTYPES
12931293
PGAC_FUNC_GETTIMEOFDAY_1ARG
1294+
PGAC_FUNC_WCSTOMBS_L
12941295

12951296
# Some versions of libedit contain strlcpy(), setproctitle(), and other
12961297
# symbols that that library has no business exposing to the world. Pending

‎contrib/ltree/_ltree_gist.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ _ltree_compress(PG_FUNCTION_ARGS)
8585
(errcode(ERRCODE_NULL_VALUE_NOT_ALLOWED),
8686
errmsg("array must not contain nulls")));
8787

88-
key= (ltree_gist*)palloc(len);
88+
key= (ltree_gist*)palloc0(len);
8989
SET_VARSIZE(key,len);
9090
key->flag=0;
9191

@@ -116,7 +116,7 @@ _ltree_compress(PG_FUNCTION_ARGS)
116116
PG_RETURN_POINTER(retval);
117117
}
118118
len=LTG_HDRSIZE;
119-
key= (ltree_gist*)palloc(len);
119+
key= (ltree_gist*)palloc0(len);
120120
SET_VARSIZE(key,len);
121121
key->flag=LTG_ALLTRUE;
122122

@@ -196,7 +196,7 @@ _ltree_union(PG_FUNCTION_ARGS)
196196
}
197197

198198
len=LTG_HDRSIZE+ ((flag&LTG_ALLTRUE) ?0 :ASIGLEN);
199-
result= (ltree_gist*)palloc(len);
199+
result= (ltree_gist*)palloc0(len);
200200
SET_VARSIZE(result,len);
201201
result->flag=flag;
202202
if (!LTG_ISALLTRUE(result))
@@ -333,26 +333,26 @@ _ltree_picksplit(PG_FUNCTION_ARGS)
333333
/* form initial .. */
334334
if (LTG_ISALLTRUE(GETENTRY(entryvec,seed_1)))
335335
{
336-
datum_l= (ltree_gist*)palloc(LTG_HDRSIZE);
336+
datum_l= (ltree_gist*)palloc0(LTG_HDRSIZE);
337337
SET_VARSIZE(datum_l,LTG_HDRSIZE);
338338
datum_l->flag=LTG_ALLTRUE;
339339
}
340340
else
341341
{
342-
datum_l= (ltree_gist*)palloc(LTG_HDRSIZE+ASIGLEN);
342+
datum_l= (ltree_gist*)palloc0(LTG_HDRSIZE+ASIGLEN);
343343
SET_VARSIZE(datum_l,LTG_HDRSIZE+ASIGLEN);
344344
datum_l->flag=0;
345345
memcpy((void*)LTG_SIGN(datum_l), (void*)LTG_SIGN(GETENTRY(entryvec,seed_1)),sizeof(ABITVEC));
346346
}
347347
if (LTG_ISALLTRUE(GETENTRY(entryvec,seed_2)))
348348
{
349-
datum_r= (ltree_gist*)palloc(LTG_HDRSIZE);
349+
datum_r= (ltree_gist*)palloc0(LTG_HDRSIZE);
350350
SET_VARSIZE(datum_r,LTG_HDRSIZE);
351351
datum_r->flag=LTG_ALLTRUE;
352352
}
353353
else
354354
{
355-
datum_r= (ltree_gist*)palloc(LTG_HDRSIZE+ASIGLEN);
355+
datum_r= (ltree_gist*)palloc0(LTG_HDRSIZE+ASIGLEN);
356356
SET_VARSIZE(datum_r,LTG_HDRSIZE+ASIGLEN);
357357
datum_r->flag=0;
358358
memcpy((void*)LTG_SIGN(datum_r), (void*)LTG_SIGN(GETENTRY(entryvec,seed_2)),sizeof(ABITVEC));

‎contrib/ltree/_ltree_op.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ _ltree_extract_isparent(PG_FUNCTION_ARGS)
211211
PG_RETURN_NULL();
212212
}
213213

214-
item= (ltree*)palloc(VARSIZE(found));
214+
item= (ltree*)palloc0(VARSIZE(found));
215215
memcpy(item,found,VARSIZE(found));
216216

217217
PG_FREE_IF_COPY(la,0);
@@ -234,7 +234,7 @@ _ltree_extract_risparent(PG_FUNCTION_ARGS)
234234
PG_RETURN_NULL();
235235
}
236236

237-
item= (ltree*)palloc(VARSIZE(found));
237+
item= (ltree*)palloc0(VARSIZE(found));
238238
memcpy(item,found,VARSIZE(found));
239239

240240
PG_FREE_IF_COPY(la,0);
@@ -257,7 +257,7 @@ _ltq_extract_regex(PG_FUNCTION_ARGS)
257257
PG_RETURN_NULL();
258258
}
259259

260-
item= (ltree*)palloc(VARSIZE(found));
260+
item= (ltree*)palloc0(VARSIZE(found));
261261
memcpy(item,found,VARSIZE(found));
262262

263263
PG_FREE_IF_COPY(la,0);
@@ -280,7 +280,7 @@ _ltxtq_extract_exec(PG_FUNCTION_ARGS)
280280
PG_RETURN_NULL();
281281
}
282282

283-
item= (ltree*)palloc(VARSIZE(found));
283+
item= (ltree*)palloc0(VARSIZE(found));
284284
memcpy(item,found,VARSIZE(found));
285285

286286
PG_FREE_IF_COPY(la,0);

‎contrib/ltree/ltree_gist.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ ltree_compress(PG_FUNCTION_ARGS)
5656
ltree*val= (ltree*)DatumGetPointer(PG_DETOAST_DATUM(entry->key));
5757
int32len=LTG_HDRSIZE+VARSIZE(val);
5858

59-
key= (ltree_gist*)palloc(len);
59+
key= (ltree_gist*)palloc0(len);
6060
SET_VARSIZE(key,len);
6161
key->flag=LTG_ONENODE;
6262
memcpy((void*)LTG_NODE(key), (void*)val,VARSIZE(val));
@@ -213,7 +213,7 @@ ltree_union(PG_FUNCTION_ARGS)
213213
isleqr= (left==right||ISEQ(left,right)) ? true : false;
214214
*size=LTG_HDRSIZE+ ((isalltrue) ?0 :SIGLEN)+VARSIZE(left)+ ((isleqr) ?0 :VARSIZE(right));
215215

216-
result= (ltree_gist*)palloc(*size);
216+
result= (ltree_gist*)palloc0(*size);
217217
SET_VARSIZE(result,*size);
218218
result->flag=0;
219219

@@ -386,7 +386,7 @@ ltree_picksplit(PG_FUNCTION_ARGS)
386386
lu_l=LTG_GETLNODE(GETENTRY(entryvec,array[FirstOffsetNumber].index));
387387
isleqr= (lu_l==lu_r||ISEQ(lu_l,lu_r)) ? true : false;
388388
size=LTG_HDRSIZE+ ((lisat) ?0 :SIGLEN)+VARSIZE(lu_l)+ ((isleqr) ?0 :VARSIZE(lu_r));
389-
lu= (ltree_gist*)palloc(size);
389+
lu= (ltree_gist*)palloc0(size);
390390
SET_VARSIZE(lu,size);
391391
lu->flag=0;
392392
if (lisat)
@@ -403,7 +403,7 @@ ltree_picksplit(PG_FUNCTION_ARGS)
403403
ru_l=LTG_GETLNODE(GETENTRY(entryvec,array[1+ ((maxoff-FirstOffsetNumber+1) /2)].index));
404404
isleqr= (ru_l==ru_r||ISEQ(ru_l,ru_r)) ? true : false;
405405
size=LTG_HDRSIZE+ ((risat) ?0 :SIGLEN)+VARSIZE(ru_l)+ ((isleqr) ?0 :VARSIZE(ru_r));
406-
ru= (ltree_gist*)palloc(size);
406+
ru= (ltree_gist*)palloc0(size);
407407
SET_VARSIZE(ru,size);
408408
ru->flag=0;
409409
if (risat)
@@ -445,7 +445,7 @@ gist_isparent(ltree_gist *key, ltree *query)
445445
staticltree*
446446
copy_ltree(ltree*src)
447447
{
448-
ltree*dst= (ltree*)palloc(VARSIZE(src));
448+
ltree*dst= (ltree*)palloc0(VARSIZE(src));
449449

450450
memcpy(dst,src,VARSIZE(src));
451451
returndst;

‎contrib/ltree/ltree_op.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ inner_subltree(ltree *t, int32 startpos, int32 endpos)
211211
ptr=LEVEL_NEXT(ptr);
212212
}
213213

214-
res= (ltree*)palloc(LTREE_HDRSIZE+ (end-start));
214+
res= (ltree*)palloc0(LTREE_HDRSIZE+ (end-start));
215215
SET_VARSIZE(res,LTREE_HDRSIZE+ (end-start));
216216
res->numlevel=endpos-startpos;
217217

@@ -268,7 +268,7 @@ ltree_concat(ltree *a, ltree *b)
268268
{
269269
ltree*r;
270270

271-
r= (ltree*)palloc(VARSIZE(a)+VARSIZE(b)-LTREE_HDRSIZE);
271+
r= (ltree*)palloc0(VARSIZE(a)+VARSIZE(b)-LTREE_HDRSIZE);
272272
SET_VARSIZE(r,VARSIZE(a)+VARSIZE(b)-LTREE_HDRSIZE);
273273
r->numlevel=a->numlevel+b->numlevel;
274274

@@ -450,7 +450,7 @@ lca_inner(ltree **a, int len)
450450
l1=LEVEL_NEXT(l1);
451451
}
452452

453-
res= (ltree*)palloc(reslen);
453+
res= (ltree*)palloc0(reslen);
454454
SET_VARSIZE(res,reslen);
455455
res->numlevel=num;
456456

‎contrib/ltree/ltxtquery_io.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ queryin(char *buf)
350350
errmsg("ltxtquery is too large")));
351351
commonlen=COMPUTESIZE(state.num,state.sumlen);
352352

353-
query= (ltxtquery*)palloc(commonlen);
353+
query= (ltxtquery*)palloc0(commonlen);
354354
SET_VARSIZE(query,commonlen);
355355
query->size=state.num;
356356
ptr=GETQUERY(query);

‎contrib/pg_stat_statements/pg_stat_statements.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -735,11 +735,7 @@ pgss_shmem_shutdown(int code, Datum arg)
735735
/*
736736
* Rename file into place, so we atomically replace any old one.
737737
*/
738-
if (rename(PGSS_DUMP_FILE".tmp",PGSS_DUMP_FILE)!=0)
739-
ereport(LOG,
740-
(errcode_for_file_access(),
741-
errmsg("could not rename pg_stat_statement file \"%s\": %m",
742-
PGSS_DUMP_FILE".tmp")));
738+
(void)durable_rename(PGSS_DUMP_FILE".tmp",PGSS_DUMP_FILE,LOG);
743739

744740
/* Unlink query-texts file; it's not needed while shutdown */
745741
unlink(PGSS_TEXT_FILE);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp