This works in Hugo v0.122.0:
{{- $pages = where (where .Site.Pages "Section" "post") "Path" "!=" "post" -}}
The same for Hugo v0.123.0:
{{- $pages = where (where .Site.Pages "Section" "post") "Path" "!=" "/post" -}}
The idea is to get all pages except the root section, notice that now (v0.123.0) the leading slash is needed.
Since I’m not sure if this should considered to be a bug I’ll post it here, no further help is needed.