Two Postgres master process are showing - one is on and off

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Two Postgres master process are showing - one is on and off

chiru r

Hi All,

 

I have observed one of our PostgreSQL DB instance showing two postgres process on Linux server as highlighted. The second postgres process is on and off.

We did not find any references in logs.


Please provide your advice and help on this issue.


DB version :  PostgreSQL  9.5.10

Server version   :  RHEL 7.6

 

[postgres@PGSERVER data]$ ps -ef|grep postgres

root       5922   5875  0 Jul31 pts/0    00:00:00 sudo su - postgres

root       5927   5922  0 Jul31 pts/0    00:00:00 su - postgres

postgres   5928   5927  0 Jul31 pts/0    00:00:00 -bash

root      11585  11535  0 11:29 pts/2    00:00:00 sudo su - postgres

root      11606  11585  0 11:29 pts/2    00:00:00 su - postgres

postgres  11607  11606  0 11:29 pts/2    00:00:00 -bash

root      17185  17141  0 Aug19 pts/1    00:00:00 sudo su - postgres

root      17189  17185  0 Aug19 pts/1    00:00:00 su - postgres

postgres  17190  17189  0 Aug19 pts/1    00:00:00 -bash

postgres  33438      1  0 12:41 ?        00:00:03 /u01/postgres/9.5/bin/postgres -D /u02/pgdata01/9.5/data

postgres  33441  33438  0 12:41 ?        00:00:02 postgres: logger process

postgres  33443  33438  0 12:41 ?        00:00:01 postgres: checkpointer process

postgres  33444  33438  0 12:41 ?        00:00:00 postgres: writer process

postgres  33445  33438  0 12:41 ?        00:00:01 postgres: wal writer process

postgres  33446  33438  0 12:41 ?        00:00:00 postgres: autovacuum launcher process

postgres  33447  33438  0 12:41 ?        00:00:01 postgres: stats collector process

postgres  36660  33438  0 12:47 ?        00:00:00 postgres: sj2 devdb 10.220.177.63(57237) idle

root      39915  39837  0 12:53 pts/3    00:00:00 sudo su - postgres

root      39950  39915  0 12:53 pts/3    00:00:00 su - postgres

postgres  39951  39950  0 12:53 pts/3    00:00:00 -bash

postgres 110181  33438  0 15:30 ?        00:00:00 /u01/postgres/9.5/bin/postgres -D /u02/pgdata01/9.5/data

postgres 110183  11607  0 15:30 pts/2    00:00:00 ps -ef

postgres 110184  11607  0 15:30 pts/2    00:00:00 grep --color=auto postgres

[postgres@SERVER1 data]$

 

Thanks,

Chiru

Reply | Threaded
Open this post in threaded view
|

Re: Two Postgres master process are showing - one is on and off

Adrian Klaver-4
On 8/20/19 1:32 PM, chiru r wrote:
> Hi All,
>
>
> I have observed one of our PostgreSQL DB instance showing two postgres
> process on Linux server as highlighted. The second postgres process is
> on and off.

Is the on/off on a regular interval?
My guess is a script(cron possibly) is trying to start the server.

>
> We did not find any references in logs.

The information:

sudo /etc/init.d/postgresql11 start
Starting PostgreSQL: ok
aklaver@ranger:~> -2019-08-20 13:40:30.097 PDT-0FATAL:  lock file
"postmaster.pid" already exists
-2019-08-20 13:40:30.097 PDT-0HINT:  Is another postmaster (PID 1694)
running in data directory "/usr/local/pgsql11/data"?

Is sent to the starting process and does not make it to the server log
as the server is not started(the 'Starting PostgreSQL' notwithstanding).

>
>
> Please provide your advice and help on this issue.
>
>
> DB version :  PostgreSQL *9.5.10*
>
> Server version   :  RHEL *7.6*
>
> [postgres@PGSERVER data]$ ps -ef|grep postgres
>
> root       5922 5875  0 Jul31 pts/0    00:00:00 sudo su - postgres
>
> root       5927 5922  0 Jul31 pts/0    00:00:00 su - postgres
>
> postgres   5928   5927  0 Jul31 pts/0    00:00:00 -bash
>
> root      11585  11535  0 11:29 pts/2    00:00:00 sudo su - postgres
>
> root      11606  11585  0 11:29 pts/2    00:00:00 su - postgres
>
> postgres  11607  11606  0 11:29 pts/2    00:00:00 -bash
>
> root      17185  17141  0 Aug19 pts/1    00:00:00 sudo su - postgres
>
> root      17189  17185  0 Aug19 pts/1    00:00:00 su - postgres
>
> postgres  17190  17189  0 Aug19 pts/1    00:00:00 -bash
>
> postgres 33438      1  0 12:41 ?        00:00:03
> /u01/postgres/9.5/bin/postgres -D /u02/pgdata01/9.5/data
>
> postgres  33441  33438  0 12:41 ?        00:00:02 postgres: logger process
>
> postgres  33443  33438  0 12:41 ?        00:00:01 postgres: checkpointer
> process
>
> postgres  33444  33438  0 12:41 ?        00:00:00 postgres: writer process
>
> postgres  33445  33438  0 12:41 ?        00:00:01 postgres: wal writer
> process
>
> postgres  33446  33438  0 12:41 ?        00:00:00 postgres: autovacuum
> launcher process
>
> postgres  33447  33438  0 12:41 ?        00:00:01 postgres: stats
> collector process
>
> postgres  36660  33438  0 12:47 ?        00:00:00 postgres: sj2 devdb
> 10.220.177.63(57237) idle
>
> root      39915  39837  0 12:53 pts/3    00:00:00 sudo su - postgres
>
> root      39950  39915  0 12:53 pts/3    00:00:00 su - postgres
>
> postgres  39951  39950  0 12:53 pts/3    00:00:00 -bash
>
> postgres 110181  33438  0 15:30 ? 00:00:00
> /u01/postgres/9.5/bin/postgres -D /u02/pgdata01/9.5/data
>
> postgres 110183  11607  0 15:30 pts/2    00:00:00 ps -ef
>
> postgres 110184  11607  0 15:30 pts/2    00:00:00 grep --color=auto postgres
>
> [postgres@SERVER1 data]$
>
> Thanks,
>
> Chiru
>


--
Adrian Klaver
[hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: Two Postgres master process are showing - one is on and off

chiru r
Thank you Adrian.


Is the on/off on a regular interval?
My guess is a script(cron possibly) is trying to start the server.

Yes, It is regular interval.
No Con-jobs scheduled on server or even remotely.

>
> We did not find any references in logs.

The information:

sudo /etc/init.d/postgresql11 start
Starting PostgreSQL: ok
aklaver@ranger:~> -2019-08-20 13:40:30.097 PDT-0FATAL:  lock file
"postmaster.pid" already exists
-2019-08-20 13:40:30.097 PDT-0HINT:  Is another postmaster (PID 1694)
running in data directory "/usr/local/pgsql11/data"?

Is sent to the starting process and does not make it to the server log
as the server is not started(the 'Starting PostgreSQL' notwithstanding).

I have verified startup.log and regular postgresql logs also, i did not found above messages.
  
Thanks,
Chiru  
Reply | Threaded
Open this post in threaded view
|

Re: Two Postgres master process are showing - one is on and off

Steve Crawford
In reply to this post by chiru r
FWIW, the second process (110181) is a child of the main process (33438). I can't recall if any maintenance process that gets automatically activated (autovacuum, checkpoint, stats, etc.) shows with the same name as the main process.

Cheers,
Steve

On Tue, Aug 20, 2019 at 1:32 PM chiru r <[hidden email]> wrote:

Hi All,

 

I have observed one of our PostgreSQL DB instance showing two postgres process on Linux server as highlighted. The second postgres process is on and off.

We did not find any references in logs.


Please provide your advice and help on this issue.


DB version :  PostgreSQL  9.5.10

Server version   :  RHEL 7.6

 

[postgres@PGSERVER data]$ ps -ef|grep postgres

root       5922   5875  0 Jul31 pts/0    00:00:00 sudo su - postgres

root       5927   5922  0 Jul31 pts/0    00:00:00 su - postgres

postgres   5928   5927  0 Jul31 pts/0    00:00:00 -bash

root      11585  11535  0 11:29 pts/2    00:00:00 sudo su - postgres

root      11606  11585  0 11:29 pts/2    00:00:00 su - postgres

postgres  11607  11606  0 11:29 pts/2    00:00:00 -bash

root      17185  17141  0 Aug19 pts/1    00:00:00 sudo su - postgres

root      17189  17185  0 Aug19 pts/1    00:00:00 su - postgres

postgres  17190  17189  0 Aug19 pts/1    00:00:00 -bash

postgres  33438      1  0 12:41 ?        00:00:03 /u01/postgres/9.5/bin/postgres -D /u02/pgdata01/9.5/data

postgres  33441  33438  0 12:41 ?        00:00:02 postgres: logger process

postgres  33443  33438  0 12:41 ?        00:00:01 postgres: checkpointer process

postgres  33444  33438  0 12:41 ?        00:00:00 postgres: writer process

postgres  33445  33438  0 12:41 ?        00:00:01 postgres: wal writer process

postgres  33446  33438  0 12:41 ?        00:00:00 postgres: autovacuum launcher process

postgres  33447  33438  0 12:41 ?        00:00:01 postgres: stats collector process

postgres  36660  33438  0 12:47 ?        00:00:00 postgres: sj2 devdb 10.220.177.63(57237) idle

root      39915  39837  0 12:53 pts/3    00:00:00 sudo su - postgres

root      39950  39915  0 12:53 pts/3    00:00:00 su - postgres

postgres  39951  39950  0 12:53 pts/3    00:00:00 -bash

postgres 110181  33438  0 15:30 ?        00:00:00 /u01/postgres/9.5/bin/postgres -D /u02/pgdata01/9.5/data

postgres 110183  11607  0 15:30 pts/2    00:00:00 ps -ef

postgres 110184  11607  0 15:30 pts/2    00:00:00 grep --color=auto postgres

[postgres@SERVER1 data]$

 

Thanks,

Chiru

Reply | Threaded
Open this post in threaded view
|

Re: Two Postgres master process are showing - one is on and off

Steve Crawford
(sorry for the top-post - blame GMail)

-Steve
Reply | Threaded
Open this post in threaded view
|

Sv: Two Postgres master process are showing - one is on and off

Andreas Joseph Krogh-2
In reply to this post by chiru r
På tirsdag 20. august 2019 kl. 22:32:25, skrev chiru r <[hidden email]>:

Hi All,

 

I have observed one of our PostgreSQL DB instance showing two postgres process on Linux server as highlighted. The second postgres process is on and off.

We did not find any references in logs.

[...]

postgres  33438      1  0 12:41 ?        00:00:03 /u01/postgres/9.5/bin/postgres -D /u02/pgdata01/9.5/data

 

[...]

 

postgres 110181  33438  0 15:30 ?        00:00:00 /u01/postgres/9.5/bin/postgres -D /u02/pgdata01/9.5/data

 
 
Strange, the second is a child of the first...
 
--
Andreas Joseph Krogh
Reply | Threaded
Open this post in threaded view
|

Re: Two Postgres master process are showing - one is on and off

Laurenz Albe
In reply to this post by chiru r
chiru r wrote:

> I have observed one of our PostgreSQL DB instance showing two postgres process on Linux server as highlighted. The second postgres process is on and off.
> We did not find any references in logs.
>
> Please provide your advice and help on this issue.
>
> DB version :  PostgreSQL  9.5.10
> Server version   :  RHEL 7.6
>  
> [postgres@PGSERVER data]$ ps -ef|grep postgres
> postgres  33438      1  0 12:41 ?        00:00:03 /u01/postgres/9.5/bin/postgres -D /u02/pgdata01/9.5/data
> [...]
> postgres 110181  33438  0 15:30 ?        00:00:00 /u01/postgres/9.5/bin/postgres -D /u02/pgdata01/9.5/data

Perhaps it is a new client connection, and the process title just hasn't been changed (yet).

What is your setting for "update_process_title"?

Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com