Skip to content

Commit 39799e3

Browse files
committed
Merge tag '0.9.17'
Hollo 0.9.17
2 parents 34faee4 + 1a6bf1f commit 39799e3

4 files changed

Lines changed: 7550 additions & 0 deletions

File tree

‎CHANGES.md‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,35 @@ To be released.
8080
[#549]: https://github.com/fedify-dev/hollo/issues/549
8181

8282

83+
Version 0.9.17
84+
--------------
85+
86+
Released on August 30, 2026.
87+
88+
- Fixed status URL searches timing out on installations with large posts
89+
tables by adding a partial hash index on `posts.url`. On large
90+
installations, create the index before upgrading to avoid blocking writes
91+
during the automatic migration:
92+
93+
~~~~ sql
94+
CREATE INDEX CONCURRENTLY posts_url_index
95+
ON posts USING hash (url)
96+
WHERE url IS NOT NULL;
97+
~~~~
98+
99+
If this concurrent build fails or is interrupted, PostgreSQL can leave an
100+
invalid index behind. Drop it and retry the command above before
101+
upgrading:
102+
103+
~~~~ sql
104+
DROP INDEX CONCURRENTLY IF EXISTS posts_url_index;
105+
~~~~
106+
107+
[[#596]]
108+
109+
[#596]: https://github.com/fedify-dev/hollo/issues/596
110+
111+
83112
Version 0.9.16
84113
--------------
85114

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
-- CONCURRENTLY omitted: Drizzle migrator wraps pending PostgreSQL migrations
2+
-- in a transaction, and CREATE INDEX CONCURRENTLY cannot run inside one.
3+
-- Large installations can pre-create this index with CONCURRENTLY before
4+
-- deployment; IF NOT EXISTS makes this step a no-op after a successful build.
5+
CREATE INDEX IF NOT EXISTS "posts_url_index"
6+
ON "posts" USING hash ("url")
7+
WHERE ("url" IS NOT NULL);
8+
--> statement-breakpoint
9+
DO $$ BEGIN
10+
IF NOT EXISTS (
11+
SELECT 1
12+
FROM pg_catalog.pg_index AS idx
13+
JOIN pg_catalog.pg_class AS relation
14+
ON relation.oid = idx.indexrelid
15+
JOIN pg_catalog.pg_am AS access_method
16+
ON access_method.oid = relation.relam
17+
WHERE relation.oid = 'public.posts_url_index'::regclass
18+
AND idx.indrelid = 'public.posts'::regclass
19+
AND idx.indisvalid
20+
AND idx.indnkeyatts = 1
21+
AND pg_get_indexdef(relation.oid, 1, false) = 'url'
22+
AND access_method.amname = 'hash'
23+
) THEN
24+
RAISE EXCEPTION 'posts_url_index is missing or invalid';
25+
END IF;
26+
END $$;

0 commit comments

Comments
 (0)