On Tue, Oct 10, 2017 at 4:28 PM, pinker <pinker@xxxxxxx> wrote: > > Yes, it would be much easier if it would be just single query from the top, > but the most cpu is eaten by the system itself and I'm not sure why. You are experiencing a context switch storm. The OS is spending so much time trying to switch between 1,000+ processes it doesn't have any time left to do much else. -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general