https://bugs.kde.org/show_bug.cgi?id=386173

--- Comment #16 from Martin Steigerwald <mar...@lichtvoll.de> ---
Created attachment 120924
  --> https://bugs.kde.org/attachment.cgi?id=120924&action=edit
akonadiserver.error log with akonadictl --verbose start on second start reusing
existing PostgreSQL processes

On second start with some of the PostgreSQL processes still running, this
happens:

Found pg_ctl: "/usr/lib/postgresql/11/bin/pg_ctl"
Found initdb: "/usr/lib/postgresql/11/bin/pg_ctl"
Found a postmaster.pid pidfile, checking whether the server is still running...
PostgreSQL for Akonadi is already running, trying to connect to it.
Database "akonadi" opened using driver "QPSQL"
DbInitializer::run()
checking table  "SchemaVersionTable"
checking table  "ResourceTable"

It reuses the PostgreSQL processes that were left over from the last akonadictl
stop:

% ps aux | grep postgres                                                        
martin   25164  0.0  0.1 214568 26444 ?        S    19:59   0:00
/usr/lib/postgresql/11/bin/postgres -D
/home/martin/.local/share/akonadi/db_data -k/tmp/akonadi-martin.wTqoXj -h
martin   25166  0.0  0.1 214696 19412 ?        Ss   19:59   0:00 postgres:
checkpointer   
martin   25167  0.0  0.0 214700  9152 ?        Ss   19:59   0:00 postgres:
background writer   
martin   25168  0.0  0.0 214568  9496 ?        Ss   19:59   0:00 postgres:
walwriter   
martin   25169  0.0  0.0 214976  6508 ?        Ss   19:59   0:00 postgres:
autovacuum launcher   
martin   25170  0.0  0.0  69616  5108 ?        Ss   19:59   0:00 postgres:
stats collector   
martin   25171  0.0  0.0 214968  6484 ?        Ss   19:59   0:00 postgres:
logical replication launcher   
martin   25507  1.4  0.9 229764 160720 ?       Ss   20:04   0:02 postgres:
martin akonadi [local] idle
martin   25516  0.0  0.0 218628 14992 ?        Ss   20:04   0:00 postgres:
martin akonadi [local] idle
martin   25517  0.0  0.0 218628 15052 ?        Ss   20:04   0:00 postgres:
martin akonadi [local] idle
martin   25567  0.0  0.0 218492 12980 ?        Ss   20:04   0:00 postgres:
martin akonadi [local] idle
[… about 20-30 more of these …]

if you compare this with my last comment, you see that the PIDs are exactly the
same.

However there are some additional processes running now.

When I stop Akonadi again the following processes remain:

% ps aux | grep postgres
martin   25164  0.0  0.1 214568 26444 ?        S    19:59   0:00
/usr/lib/postgresql/11/bin/postgres -D
/home/martin/.local/share/akonadi/db_data -k/tmp/akonadi-martin.wTqoXj -h
martin   25166  0.0  0.1 214696 19412 ?        Ss   19:59   0:00 postgres:
checkpointer   
martin   25167  0.0  0.0 214700  9152 ?        Ss   19:59   0:00 postgres:
background writer   
martin   25168  0.0  0.0 214568  9496 ?        Ss   19:59   0:00 postgres:
walwriter   
martin   25169  0.0  0.0 214976  6508 ?        Ss   19:59   0:00 postgres:
autovacuum launcher   
martin   25170  0.0  0.0  69616  5108 ?        Ss   19:59   0:00 postgres:
stats collector   
martin   25171  0.0  0.0 214968  6484 ?        Ss   19:59   0:00 postgres:
logical replication launcher   
martin   25781  0.0  0.0   8236   924 pts/3    S+   20:10   0:00 grep postgres


So it appears to me that this could be somewhat an intended feature
or option of PostgreSQL: If it does not tear down *all* of the processes
it can more quickly be started again. However that is still all just
guess work until I take the time to dig deeper in how PostgreSQL handles
stopping the database.

I'd somehow still expect that it would remove all processes.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to