netstat -ap | grep postgre
return
tcp 0 0 localhost:5433 0.0.0.0:* LISTEN 15416/postgres
tcp 0 0 localhost:5433 localhost:33138 ESTABLISHED 15435/postgres: 15/
unix 2 [ ACC ] STREAM LISTENING 75271 15416/postgres /var/run/postgresql/.s.PGSQL.5433
psql:
select pg_backend_pid();
return
+----------------+
| pg_backend_pid |
+----------------+
| 15435 |
+----------------+
in another tab. run ps aux | grep postgres
return
postgres 15416 0.0 0.7 217652 29532 ? Ss 20:42 0:00 /usr/lib/postgresql/15/bin/postgres -D /var/lib/postgresql/15/main -c config_file=/etc/postgresql/15/main/postgresql.conf
First command return 3 rows. I get the meaning of the second row.
So i guess 15416 refer to the server process id. But what does last row 75271 mean?
I also didn't get the meaning of unix 2
in the last row.
I found the man page of netstat: https://man7.org/linux/man-pages/man8/netstat.8.html But I don't know how to display column.So the netsat result not that intuitive.