Skip to content

Commit fae0d61

Browse files
committed
fix(ci): keep synchronous_commit on and scope durability tuning to e2e jobs
1 parent ae21bdc commit fae0d61

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

‎.github/workflows/checks.yml‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,6 @@ jobs:
145145
with:
146146
provider: ${{ vars.CI_PROVIDER }}
147147

148-
# No suite survives a database crash; see the script for what this does and does not change.
149-
- name: Turn off Postgres crash durability
150-
run: bun scripts/tune-ci-postgres.ts
151-
152148
- name: Provision a fresh database through the supported command
153149
working-directory: packages/db
154150
run: |
@@ -271,6 +267,7 @@ jobs:
271267

272268
# No suite survives a database crash; see the script for what this does and does not change.
273269
- name: Turn off Postgres crash durability
270+
working-directory: packages/db
274271
run: bun scripts/tune-ci-postgres.ts
275272

276273
# Migrations create their own extensions, as on a fresh self-hosted install.
@@ -393,6 +390,7 @@ jobs:
393390

394391
# No suite survives a database crash; see the script for what this does and does not change.
395392
- name: Turn off Postgres crash durability
393+
working-directory: packages/db
396394
run: bun scripts/tune-ci-postgres.ts
397395

398396
- name: Provision the database through migrations
@@ -516,6 +514,7 @@ jobs:
516514

517515
# No suite survives a database crash; see the script for what this does and does not change.
518516
- name: Turn off Postgres crash durability
517+
working-directory: packages/db
519518
run: bun scripts/tune-ci-postgres.ts
520519

521520
- name: Provision the database through migrations
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,18 @@
22
* Turns off crash durability on a CI job's throwaway Postgres service. No suite survives a crash of
33
* its database, and flushing each commit to the runner's disk is most of a bulk write's cost.
44
* Visibility, locking and isolation are unchanged, so every suite checks the same behavior.
5+
* `synchronous_commit` stays on: asynchronous commits delay hint bits and VACUUM's all-visible
6+
* marking until the WAL flush, which turns the index-only plans the plan tests assert into heap
7+
* fetches. With `fsync` off that flush costs nothing anyway.
58
*
69
* Service containers take no `-c` flags; each setting reloads without a restart. Exits non-zero
710
* unless a fresh session reports all of them applied.
811
*
9-
* Usage: DATABASE_URL=... bun scripts/tune-ci-postgres.ts
12+
* Usage (from packages/db): DATABASE_URL=... bun scripts/tune-ci-postgres.ts
1013
*/
1114
import postgres from 'postgres'
1215

13-
const SETTINGS = { fsync: 'off', full_page_writes: 'off', synchronous_commit: 'off' } as const
16+
const SETTINGS = { fsync: 'off', full_page_writes: 'off' } as const
1417

1518
const url = process.env.DATABASE_URL
1619
if (!url) throw new Error('DATABASE_URL is required')

0 commit comments

Comments
 (0)