Обсуждение: High CPU usage in postgres servers
when check the task manager I see these many postgres.exe are running. How to identify which pid is running for which process please any one can help me out.
Thanks ,
Nikhil
Вложения
Hi Guys ,
when check the task manager I see these many postgres.exe are running. How to identify which pid is running for which process please any one can help me out.
or Why these many postgres.exe are running on the server when check the task manager I see these many postgres.exe are running. How to identify which pid is running for which process please any one can help me out.
Thanks ,
Nikhil
Вложения
On Mon, Dec 25, 2017 at 1:28 PM, nikhil raj <nikhilraj474@gmail.com> wrote:
or Why these many postgres.exe are running on the serverHi guys ,
when check the task manager I see these many postgres.exe are running. How to identify which pid is running for which process please any one can help me out.
Thanks ,Nikhil
It appears your O/S is Windows, but you have not included which version of PostgreSQL.
Since the structure of pg_stat_activity has changed between 9.4 and 9.5
the best I can advise is to
SELECT * FROM pg_stat_activity;
Otherwise, I would give you a query tailored to your version of PostgreSQL.
--
Melvin Davidson
I reserve the right to fantasize. Whether or not you
wish to share my fantasy is entirely up to you.
I reserve the right to fantasize. Whether or not you
wish to share my fantasy is entirely up to you.
Вложения
On Mon, Dec 25, 2017 at 1:28 PM, nikhil raj <nikhilraj474@gmail.com> wrote:
or Why these many postgres.exe are running on the serverHi guys ,
when check the task manager I see these many postgres.exe are running. How to identify which pid is running for which process please any one can help me out.
Thanks ,Nikhil
It appears your O/S is Windows, but you have not included which version of PostgreSQL.
Since the structure of pg_stat_activity has changed between 9.4 and 9.5
the best I can advise is to
SELECT * FROM pg_stat_activity;
Otherwise, I would give you a query tailored to your version of PostgreSQL.
--
Melvin Davidson
I reserve the right to fantasize. Whether or not you
wish to share my fantasy is entirely up to you.
I reserve the right to fantasize. Whether or not you
wish to share my fantasy is entirely up to you.
Вложения
On Mon, Dec 25, 2017 at 1:28 PM, nikhil raj <nikhilraj474@gmail.com> wrote:
or Why these many postgres.exe are running on the serverHi guys ,
when check the task manager I see these many postgres.exe are running. How to identify which pid is running for which process please any one can help me out.
Thanks ,Nikhil
It appears your O/S is Windows, but you have not included which version of PostgreSQL.
Since the structure of pg_stat_activity has changed between 9.4 and 9.5
the best I can advise is to
SELECT * FROM pg_stat_activity;
Otherwise, I would give you a query tailored to your version of PostgreSQL.
--
Melvin Davidson
I reserve the right to fantasize. Whether or not you
wish to share my fantasy is entirely up to you.
I reserve the right to fantasize. Whether or not you
wish to share my fantasy is entirely up to you.
Вложения
On Mon, Dec 25, 2017 at 06:12:05PM -0500, Melvin Davidson wrote: > On Mon, Dec 25, 2017 at 1:28 PM, nikhil raj <nikhilraj474@gmail.com> wrote: >> Hi guys , >> when check the task manager I see these many postgres.exe are running. How >> to identify which pid is running for which process please any one can help >> me out. >> or Why these many postgres.exe are running on the server >> >> [image: Inline image 1] >> >> Thanks , >> Nikhil >> > > It appears your O/S is Windows, but you have not included which version of > PostgreSQL. > Since the structure of pg_stat_activity has changed between 9.4 and 9.5 > the best I can advise is to > SELECT * FROM pg_stat_activity; > > Otherwise, I would give you a query tailored to your version of PostgreSQL. Looking at queries that take a long time and look at their plans can help in measuring the impact on CPU. For example, a sequential scan with a large ORDER BY would be bad. Windows is also paked with perfmon (Performance Monitor) that you could use. Combined with PostgreSQL logs with PID information, you could always extract some information. In the context of Windows which has no POSIX fork() implementation, note that the build runs under the context of EXEC_BACKEND, where each process is directly called via automaticly-built command lines. Still you are giving close to no information regarding your system, so general pieces of advices are the best you can get. -- Michael
Вложения
On Mon, Dec 25, 2017 at 06:12:05PM -0500, Melvin Davidson wrote: > On Mon, Dec 25, 2017 at 1:28 PM, nikhil raj <nikhilraj474@gmail.com> wrote: >> Hi guys , >> when check the task manager I see these many postgres.exe are running. How >> to identify which pid is running for which process please any one can help >> me out. >> or Why these many postgres.exe are running on the server >> >> [image: Inline image 1] >> >> Thanks , >> Nikhil >> > > It appears your O/S is Windows, but you have not included which version of > PostgreSQL. > Since the structure of pg_stat_activity has changed between 9.4 and 9.5 > the best I can advise is to > SELECT * FROM pg_stat_activity; > > Otherwise, I would give you a query tailored to your version of PostgreSQL. Looking at queries that take a long time and look at their plans can help in measuring the impact on CPU. For example, a sequential scan with a large ORDER BY would be bad. Windows is also paked with perfmon (Performance Monitor) that you could use. Combined with PostgreSQL logs with PID information, you could always extract some information. In the context of Windows which has no POSIX fork() implementation, note that the build runs under the context of EXEC_BACKEND, where each process is directly called via automaticly-built command lines. Still you are giving close to no information regarding your system, so general pieces of advices are the best you can get. -- Michael
Вложения
On Mon, Dec 25, 2017 at 06:12:05PM -0500, Melvin Davidson wrote: > On Mon, Dec 25, 2017 at 1:28 PM, nikhil raj <nikhilraj474@gmail.com> wrote: >> Hi guys , >> when check the task manager I see these many postgres.exe are running. How >> to identify which pid is running for which process please any one can help >> me out. >> or Why these many postgres.exe are running on the server >> >> [image: Inline image 1] >> >> Thanks , >> Nikhil >> > > It appears your O/S is Windows, but you have not included which version of > PostgreSQL. > Since the structure of pg_stat_activity has changed between 9.4 and 9.5 > the best I can advise is to > SELECT * FROM pg_stat_activity; > > Otherwise, I would give you a query tailored to your version of PostgreSQL. Looking at queries that take a long time and look at their plans can help in measuring the impact on CPU. For example, a sequential scan with a large ORDER BY would be bad. Windows is also paked with perfmon (Performance Monitor) that you could use. Combined with PostgreSQL logs with PID information, you could always extract some information. In the context of Windows which has no POSIX fork() implementation, note that the build runs under the context of EXEC_BACKEND, where each process is directly called via automaticly-built command lines. Still you are giving close to no information regarding your system, so general pieces of advices are the best you can get. -- Michael