0

Not sure what sort of platform AWS runs 9.x Postgres on. What's the maximum value for the process pid?

Im looking into an issue around the use of pg_backend_pid in a trigger.

1 Answer 1

1

AWS doesn't run PostgreSQL.

What's the maximum value for the process pid? Im looking into an issue around the use of pg_backend_pid in a trigger.

I assume the maximum value for process pid is the maximum pid value for Linux.

But, for PostgreSQL it's stored in an interger.

select pg_typeof(pg_backend_pid());
 pg_typeof 
-----------
 integer
(1 row)

Which means the max value is pow(2,31)-1

2
  • With a little empirical testing it appears the max pid is 32767. Used SELECT pid FROM pg_stat_activity order by pid;
    – ethrbunny
    Commented Jul 11, 2017 at 16:22
  • Not sure why this q/a pair got downvoted. Tough crowd.
    – ethrbunny
    Commented Jul 11, 2017 at 16:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.