Server IP : 127.0.0.2 / Your IP : 52.14.93.7 Web Server : Apache/2.4.18 (Ubuntu) System : User : www-data ( ) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : disk_free_space,disk_total_space,diskfreespace,dl,exec,fpaththru,getmyuid,getmypid,highlight_file,ignore_user_abord,leak,listen,link,opcache_get_configuration,opcache_get_status,passthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,php_uname,phpinfo,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix,_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,pclose,popen,proc_open,proc_close,proc_get_status,proc_nice,proc_terminate,shell_exec,source,show_source,system,virtual MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/share/postgresql-common/t/ |
Upload File : |
# Check pg_ctl.conf handling. use strict; use lib 't'; use TestLib; use PgCommon; use Test::More tests => $MAJORS[-1] >= '8.3' ? 31 : 1; # Do test with newest version my $v = $MAJORS[-1]; if ($v < '8.3') { pass 'Skipping core limit tests for versions < 8.3'; exit 0; } is ((system "pg_createcluster $v main >/dev/null"), 0, "pg_createcluster $v main"); ok (-f "/etc/postgresql/$v/main/pg_ctl.conf", "/etc/postgresql/$v/main/pg_ctl.conf exists"); # Default behaviour, core size=0 is_program_out 'postgres', "pg_ctlcluster $v main start", 0, '', "starting cluster"; is_program_out 'postgres', "xargs -i awk '/core/ {print \$5}' /proc/{}/limits < /var/run/postgresql/$v-main.pid", 0, "0\n", "soft core size is 0"; # -c in pg_ctl.conf, core size=unlimited ok (set_cluster_pg_ctl_conf($v, 'main', '-c'), "set pg_ctl default option to -c"); is_program_out 'postgres', "pg_ctlcluster $v main restart", 0, '', "restarting cluster"; is_program_out 'postgres', "xargs -i awk '/core/ {print \$5}' /proc/{}/limits < /var/run/postgresql/$v-main.pid", 0, "unlimited\n", "soft core size is unlimited"; # Back to default behaviour, core size=0 ok (set_cluster_pg_ctl_conf($v, 'main', ''), "restored pg_ctl default option"); is_program_out 'postgres', "pg_ctlcluster $v main restart", 0, '', "restarting cluster"; is_program_out 'postgres', "xargs -i awk '/core/ {print \$5}' /proc/{}/limits < /var/run/postgresql/$v-main.pid", 0, "0\n", "soft core size is 0"; # pg_ctl -c, core size=unlimited is_program_out 'postgres', "pg_ctlcluster $v main restart -- -c", 0, '', "restarting cluster with -c on the command line"; is_program_out 'postgres', "xargs -i awk '/core/ {print \$5}' /proc/{}/limits < /var/run/postgresql/$v-main.pid", 0, "unlimited\n", "soft core size is unlimited"; is ((system "pg_dropcluster $v main --stop"), 0, 'dropping cluster'); check_clean; # vim: filetype=perl