Re: Should rename "startup process" to something else? - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Should rename "startup process" to something else?
Date
Msg-id 202111241854.p5yusjgsp5ln@alvherre.pgsql
Whole thread Raw
In response to Re: Should rename "startup process" to something else?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Should rename "startup process" to something else?
Re: Should rename "startup process" to something else?
List pgsql-hackers
On 2021-Nov-23, Tom Lane wrote:

> Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> > On 2021-Nov-20, Andrew Dunstan wrote:
> >> Maybe something along those lines but using a dash/hyphen would work:
> >> e.g. wal-replayer
> 
> > Yeah, the idea of a dash occurred to me too.
> 
> Bad memories of uuid-ossp float up ... can we use underscore?

I don't object to an underscore, but it looks a bit uglier to me.
AFAIK the main problem with uuid-ossp was that it is used as an identifier, so
it required quoting, which won't be the case with this process name.


Anyway, as a second and separate point, should we rename the other WAL-related
process names to use the same character?

walreceiver -> wal_receiver / wal-receiver
walsender -> wal_sender / wal-sender
walwriter -> wal_writer / wal-writer.

I assume we would *not* rename other existing processes that already
have spaces in their names, such as "autovacuum launcher" to
"autovacuum_launcher", as that would be a net loss IMO.

Currently, the process list in an idle primary server looks like 

USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
alvherre 1091970  0.0  0.0 199608 22252 pts/0    S+   12:22   0:00 /pgsql/install/master/bin/postmaster -p 55432
alvherre 1091983  0.0  0.0 199608  3644 ?        Ss   12:22   0:00  \_ postgres: checkpointer 
alvherre 1091984  0.0  0.0 199608  5432 ?        Ss   12:22   0:00  \_ postgres: background writer 
alvherre 1091986  0.0  0.0 199608  8956 ?        Ss   12:22   0:00  \_ postgres: walwriter 
alvherre 1091987  0.0  0.0 200148  7988 ?        Ss   12:22   0:00  \_ postgres: autovacuum launcher 
alvherre 1091988  0.0  0.0  54432  4156 ?        Ss   12:22   0:00  \_ postgres: stats collector 
alvherre 1091989  0.0  0.0 200036  6416 ?        Ss   12:22   0:00  \_ postgres: logical replication launcher 

I think this looks better:

USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
alvherre 1091970  0.0  0.0 199608 22252 pts/0    S+   12:22   0:00 /pgsql/install/master/bin/postmaster -p 55432
alvherre 1091983  0.0  0.0 199608  3644 ?        Ss   12:22   0:00  \_ postgres: checkpointer 
alvherre 1091984  0.0  0.0 199608  5432 ?        Ss   12:22   0:00  \_ postgres: background writer 
alvherre 1091986  0.0  0.0 199608  8956 ?        Ss   12:22   0:00  \_ postgres: wal-writer 
alvherre 1091987  0.0  0.0 200148  7988 ?        Ss   12:22   0:00  \_ postgres: autovacuum launcher 
alvherre 1091988  0.0  0.0  54432  4156 ?        Ss   12:22   0:00  \_ postgres: stats collector 
alvherre 1091989  0.0  0.0 200036  6416 ?        Ss   12:22   0:00  \_ postgres: logical replication launcher 

-- 
Álvaro Herrera              Valdivia, Chile  —  https://www.EnterpriseDB.com/



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: pgsql: xlog.c: Remove global variables ReadRecPtr and EndRecPtr.
Next
From: Andres Freund
Date:
Subject: Re: Reduce function call costs on ELF platforms