News for hackers. Stuff that matters.
Re:A read query can write to disk: a Postgres story by ianleeclark on Monday November 01, 2021 @07:49AM (#29065493)
> `work_mem` is the amount of memory a connection has to, you know, do work.

It's the amount of memory a connection has to do work per sorting/hashing operation. https://www.postgresql.org/docs/12/runtime-config-resource.h...

> There's no way for example to say: I want all the connections from username "myapp" to have 10MB and those from user "reporting" to have 100MB.

Yes, you can with

`ALTER ROLE myapp SET work_mem TO '10mb';`

and

`ALTER ROLE reporting SET work_mem TO '100mb';

Re:A read query can write to disk: a Postgres story by jhgb on Monday November 01, 2021 @08:34AM (#29065889)
> Yes, you can with [...a helpful example...]

Some days it's nice to have a lucky 10k problem (https://xkcd.com/1053) in place of a c10k problem (http://www.kegel.com/c10k.html). Thanks.