Skip to content

Instantly share code, notes, and snippets.

@tobiasmcnulty
Created June 20, 2022 14:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tobiasmcnulty/97b0df703a36da899e25a064e8d4008e to your computer and use it in GitHub Desktop.
Save tobiasmcnulty/97b0df703a36da899e25a064e8d4008e to your computer and use it in GitHub Desktop.
$ docker run --rm -e POSTGRES_PASSWORD=mysecretpassword -d postgres:13
a9fd95ccfeaeaa94c0a0a39deac52e74f59841607258c6827eabd2b33972f633
$ docker exec -it a9fd95ccfeaeaa94c0a0a39deac52e74f59841607258c6827eabd2b33972f633 bash
root@661543604ec8:/# apt-get update && apt-get install -y procps
<snip>
root@661543604ec8:/# psql -U postgres -c 'SELECT pg_sleep(60)' &
[1] 463
root@661543604ec8:/# ps auxww
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
postgres 1 0.0 0.1 213072 27168 ? Ss 14:45 0:00 postgres
postgres 62 0.0 0.0 213072 4232 ? Ss 14:45 0:00 postgres: checkpointer
postgres 63 0.0 0.0 213072 5896 ? Ss 14:45 0:00 postgres: background writer
postgres 64 0.0 0.0 213072 10084 ? Ss 14:45 0:00 postgres: walwriter
postgres 65 0.0 0.0 213628 8532 ? Ss 14:45 0:00 postgres: autovacuum launcher
postgres 66 0.0 0.0 67428 4792 ? Ss 14:45 0:00 postgres: stats collector
postgres 67 0.0 0.0 213504 6896 ? Ss 14:45 0:00 postgres: logical replication launcher
root 68 0.0 0.0 7092 3748 pts/0 Ss 14:46 0:00 bash
root 463 1.5 0.0 20480 8296 pts/0 S 14:47 0:00 /usr/lib/postgresql/13/bin/psql -U postgres -c SELECT pg_sleep(60)
postgres 464 0.0 0.0 214028 11688 ? Ss 14:47 0:00 postgres: postgres postgres [local] SELECT
root 465 0.0 0.0 9692 3308 pts/0 R+ 14:47 0:00 ps auxww
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment