!718 修复gs_initdb没指定-D参数coredump问题。

Merge pull request !718 from playrest/branch4
This commit is contained in:
opengauss-bot
2021-02-27 17:46:33 +08:00
committed by Gitee
3 changed files with 14 additions and 1 deletions

View File

@ -228,7 +228,7 @@ static const char* backend_options = "--single "
#define FREE_AND_RESET(ptr) \
do { \
if (NULL != (ptr)) { \
if (NULL != (ptr) && (char*)(ptr) != (char*)"") { \
free(ptr); \
(ptr) = NULL; \
} \

View File

@ -25,3 +25,9 @@
\! rm -rf @testtablespace@/passwd.txt
\! rm -rf @testtablespace@/test8
-- use env PGDATA
\! mkdir -p @testtablespace@/test9
\! export PGDATA=@testtablespace@/test9 && ( @abs_bindir@/gs_initdb -w test@123 --nodename coorn9 >> @abs_bindir@/test_initdb9.log 2>&1 )
\! cat @abs_bindir@/test_initdb9.log | grep Success
\! rm -f @abs_bindir@/test_initdb9.log
\! rm -rf @testtablespace@/test9

View File

@ -102,3 +102,10 @@ freezing database postgres ... ok
\! @abs_bindir@/gs_initdb -S -A trust --auth-host='ident' --auth-local='peer' --auth-host='ident' --auth-local='peer' -D @testtablespace@/test8 --nodename coorn8 -U test_initdb --pwfile=@testtablespace@/passwd.txt >> /dev/null 2>&1
\! rm -rf @testtablespace@/passwd.txt
\! rm -rf @testtablespace@/test8
-- use env PGDATA
\! mkdir -p @testtablespace@/test9
\! export PGDATA=@testtablespace@/test9 && ( @abs_bindir@/gs_initdb -w test@123 --nodename coorn9 >> @abs_bindir@/test_initdb9.log 2>&1 )
\! cat @abs_bindir@/test_initdb9.log | grep Success
Success. You can now start the database server of single node using:
\! rm -f @abs_bindir@/test_initdb9.log
\! rm -rf @testtablespace@/test9