Elektrine lite

← Feed

@europlus@social.europlus.zone

Post #3932976

2026-07-19 10:41 UTC

If I wanted to run a PostgreSQL query on my masto server which shows my personal home timeline as the result, does anyone have any pointers to guides or even such a query itself? Please boost for reach. #MastoAdmin #SelfHosting #MastoAdmins #PostgreSQL

Replies (2)

  • @erick@social.erick.sh 2026-07-19 11:21

    @europlus@social.europlus.zone I guess there’s a good reason to not use the REST API that would give you exactly what you’re asking for. I don’t have experience with the Mastodon DB; some months ago I did some changes where I needed to query my GoToSocial timeline and it was a non trivial task, because of how the data was normalized across multiple tables. I presume it’s going to be the same for Mastodon.

    Open ##3932972

  • @alan@lighthouse.co.im 2026-07-19 10:51

    @europlus@social.europlus.zone There isn't one, because the home timeline isn't computed from Postgres at request time — it's fanned out to Redis (feed:home:ACCOUNT_ID) whenever someone you follow posts. What you actually want is tootctl feeds build USERNAME — rebuilds that Redis feed straight from the DB via FeedManager#populate_home. Already shipped, no SQL required.

    Open ##4393581