Not sure what you are requesting exactly but here is the strace for the start of the pg_ctl
Il giorno lun 4 mar 2019 alle ore 21:55 Thomas Munro <thomas.munro@xxxxxxxxx> ha scritto:
On Tue, Mar 5, 2019 at 5:01 AM Nicola Contu <nicola.contu@xxxxxxxxx> wrote:
> Attached a part of the strace running the pgbench command for pg11
> Also attached strace_10 for pg10.6.
That looks like strace output from pgbench, and I don't see any
interesting differences between v10 and v11 (though I'm surprised to
see it using poll() instead of ppoll(), and opening a new connection
for every transaction).
How about syscalls on the server side? You could start it with
something like "strace -f path/to/postgres -D path/to/pgdata" (-f for
follow children), and perhaps also use -c so that it shows aggregated
data (up until you ^C it) instead of every syscall?
--
Thomas Munro
https://enterprisedb.com
[postgres@STAGING-CMD1 ~]$ strace /usr/local/pgsql11.2/bin/pg_ctl -D /db/pgsql11/data/ -c start execve("/usr/local/pgsql11.2/bin/pg_ctl", ["/usr/local/pgsql11.2/bin/pg_ctl", "-D", "/db/pgsql11/data/", "-c", "start"], [/* 27 vars */]) = 0 brk(NULL) = 0x204b000 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f6878854000 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) open("/usr/local/pgsql11.2/lib/tls/x86_64/libpthread.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) stat("/usr/local/pgsql11.2/lib/tls/x86_64", 0x7fff444938d0) = -1 ENOENT (No such file or directory) open("/usr/local/pgsql11.2/lib/tls/libpthread.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) stat("/usr/local/pgsql11.2/lib/tls", 0x7fff444938d0) = -1 ENOENT (No such file or directory) open("/usr/local/pgsql11.2/lib/x86_64/libpthread.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) stat("/usr/local/pgsql11.2/lib/x86_64", 0x7fff444938d0) = -1 ENOENT (No such file or directory) open("/usr/local/pgsql11.2/lib/libpthread.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) stat("/usr/local/pgsql11.2/lib", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=48564, ...}) = 0 mmap(NULL, 48564, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f6878848000 close(3) = 0 open("/lib64/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0m\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=144792, ...}) = 0 mmap(NULL, 2208904, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f6878418000 mprotect(0x7f687842f000, 2093056, PROT_NONE) = 0 mmap(0x7f687862e000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x16000) = 0x7f687862e000 mmap(0x7f6878630000, 13448, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f6878630000 close(3) = 0 open("/usr/local/pgsql11.2/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) open("/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P%\2\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0755, st_size=2173512, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f6878847000 mmap(NULL, 3981792, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f687804b000 mprotect(0x7f687820e000, 2093056, PROT_NONE) = 0 mmap(0x7f687840d000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1c2000) = 0x7f687840d000 mmap(0x7f6878413000, 16864, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f6878413000 close(3) = 0 mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f6878845000 arch_prctl(ARCH_SET_FS, 0x7f6878845740) = 0 mprotect(0x7f687840d000, 16384, PROT_READ) = 0 mprotect(0x7f687862e000, 4096, PROT_READ) = 0 mprotect(0x60a000, 4096, PROT_READ) = 0 mprotect(0x7f6878855000, 4096, PROT_READ) = 0 munmap(0x7f6878848000, 48564) = 0 set_tid_address(0x7f6878845a10) = 92441 set_robust_list(0x7f6878845a20, 24) = 0 rt_sigaction(SIGRTMIN, {0x7f687841e7e0, [], SA_RESTORER|SA_SIGINFO, 0x7f68784276d0}, NULL, 8) = 0 rt_sigaction(SIGRT_1, {0x7f687841e870, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x7f68784276d0}, NULL, 8) = 0 rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0 getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0 brk(NULL) = 0x204b000 brk(0x206c000) = 0x206c000 brk(NULL) = 0x206c000 open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=106070960, ...}) = 0 mmap(NULL, 106070960, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f6871b22000 close(3) = 0 getcwd("/home/postgres", 1024) = 15 stat("/usr/local/pgsql11.2/bin/pg_ctl", {st_mode=S_IFREG|0755, st_size=58144, ...}) = 0 access("/usr/local/pgsql11.2/bin/pg_ctl", R_OK) = 0 access("/usr/local/pgsql11.2/bin/pg_ctl", X_OK) = 0 getcwd("/home/postgres", 1024) = 15 chdir("/usr/local/pgsql11.2/bin") = 0 lstat("pg_ctl", {st_mode=S_IFREG|0755, st_size=58144, ...}) = 0 getcwd("/usr/local/pgsql11.2/bin", 1024) = 25 chdir("/home/postgres") = 0 umask(077) = 02 geteuid() = 1001 open("/db/pgsql11/data/postgresql.conf", O_RDONLY) = 3 close(3) = 0 open("/db/pgsql11/data/PG_VERSION", O_RDONLY) = 3 close(3) = 0 stat("/db/pgsql11/data", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0 umask(077) = 077 stat("/db/pgsql11/data", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0 stat("/db/pgsql11/data/PG_VERSION", {st_mode=S_IFREG|0600, st_size=3, ...}) = 0 open("/db/pgsql11/data/postmaster.pid", O_RDONLY) = -1 ENOENT (No such file or directory) getcwd("/home/postgres", 1024) = 15 stat("/usr/local/pgsql11.2/bin/pg_ctl", {st_mode=S_IFREG|0755, st_size=58144, ...}) = 0 access("/usr/local/pgsql11.2/bin/pg_ctl", R_OK) = 0 access("/usr/local/pgsql11.2/bin/pg_ctl", X_OK) = 0 getcwd("/home/postgres", 1024) = 15 chdir("/usr/local/pgsql11.2/bin") = 0 lstat("pg_ctl", {st_mode=S_IFREG|0755, st_size=58144, ...}) = 0 getcwd("/usr/local/pgsql11.2/bin", 1024) = 25 chdir("/home/postgres") = 0 stat("/usr/local/pgsql11.2/bin/postgres", {st_mode=S_IFREG|0755, st_size=7908968, ...}) = 0 access("/usr/local/pgsql11.2/bin/postgres", R_OK) = 0 access("/usr/local/pgsql11.2/bin/postgres", X_OK) = 0 pipe2([3, 4], O_CLOEXEC) = 0 clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f6878845a10) = 92442 close(4) = 0 fcntl(3, F_SETFD, 0) = 0 fstat(3, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f6878853000 read(3, "postgres (PostgreSQL) 11.2\n", 4096) = 27 close(3) = 0 wait4(92442, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 92442 --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=92442, si_uid=1001, si_status=0, si_utime=0, si_stime=0} --- munmap(0x7f6878853000, 4096) = 0 getrlimit(RLIMIT_CORE, {rlim_cur=0, rlim_max=RLIM64_INFINITY}) = 0 setrlimit(RLIMIT_CORE, {rlim_cur=RLIM64_INFINITY, rlim_max=RLIM64_INFINITY}) = 0 getppid() = 92439 clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f6878845a10) = 92443 fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 3), ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f6878853000 write(1, "waiting for server to start...", 30waiting for server to start...) = 30 open("/db/pgsql11/data/postmaster.pid", O_RDONLY) = -1 ENOENT (No such file or directory) wait4(92443, 0x7fff44494fb0, WNOHANG, NULL) = 0 write(1, ".", 1.) = 1 select(0, NULL, NULL, NULL, {0, 100000}2019-03-05 15:16:08.893 GMT [92443] LOG: listening on IPv6 address "::1", port 5432 2019-03-05 15:16:08.893 GMT [92443] LOG: listening on IPv4 address "127.0.0.1", port 5432 2019-03-05 15:16:08.894 GMT [92443] LOG: listening on Unix socket "/tmp/.s.PGSQL.5432" 2019-03-05 15:16:08.902 GMT [92444] LOG: database system was shut down at 2019-03-05 15:15:48 GMT 2019-03-05 15:16:08.903 GMT [92443] LOG: database system is ready to accept connections ) = 0 (Timeout) open("/db/pgsql11/data/postmaster.pid", O_RDONLY) = 3 fstat(3, {st_mode=S_IFREG|0600, st_size=83, ...}) = 0 read(3, "92443\n/db/pgsql11/data\n155179896"..., 84) = 83 close(3) = 0 write(1, " done\n", 6 done ) = 6 write(1, "server started\n", 15server started ) = 15 exit_group(0) = ? +++ exited with 0 +++