0

Ubuntu 18.04 PostgreSQL 10.10 Mattermost 5.15

On mattermost startup process stay forever on

{"level":"info","ts":1570609055.2422519,"caller":"sqlstore/supplier.go:223","msg":"Pinging SQL master database"}

Running this query

SELECT pid, age(clock_timestamp(), query_start), usename, query, state
FROM pg_stat_activity
WHERE query != '' AND query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;

Gives me

 pid  |      age       | usename |         query         | state
------+----------------+---------+-------------------------------
 8700 | 00:08:54.84669 | mmuser  | SELECT * FROM Systems | idle

From there, how do I diagnose what makes this query never end ?

2
  • What do you get if you include state in the list of columns selected by your query? Commented Oct 9, 2019 at 8:32
  • @LaurenzAlbe idle
    – Yvain
    Commented Oct 9, 2019 at 8:36

1 Answer 1

1

The query has already ended 9 minutes ago. PostgreSQL is sitting idle and waiting for the next statement on this connection, which isn't coming.

The block must be somewhere else in your startup process.

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.