Users not loading in System Console after environment refresh

Problem

After refreshing an environment, some customers may notice that the System Console → User Management → Users page does not display any users.

Other user-related functionality continues to work normally, such as:

  • Searching for users when starting a DM
  • Adding users to a team or channel
  • Searching for channels and posts

However, the System Console Users page remains blank as below-

Screenshot 2025-09-26 at 9.16.33 AM.png

In the server logs, you may also see a 500 error for the /api/v4/reports/users endpoint, similar to:

{"level":"error","msg":"Failed to fetch user report.","error":"GetUsersForReporting: failed to get users for reporting: pq: materialized view \"poststats\" has not been populated"}

Cause

This behavior can occur if the Postgres materialized view poststats is not populated after the database restore.

The poststats view is used by Mattermost for reporting data, including the Users page in the System Console. If the view is empty (ispopulated = false), the reports endpoint will return errors, and the Users list cannot load.

Solution

To resolve the issue, you need to refresh the poststats materialized view in the Postgres database:

  1. Connect to your Mattermost Postgres database.
  2. Run the following command to refresh the view:

    REFRESH MATERIALIZED VIEW public.poststats;
    
  3. Verify that the view is now populated:

    SELECT schemaname, matviewname, ispopulated 
    FROM pg_matviews 
    WHERE matviewname IN ('poststats');
    
    • If ispopulated = true, the view is successfully refreshed.
  4. Retry accessing System Console → User Management → Users. The user list should now load as expected.

 

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.