Skip to content

Conversation

finestructure
Copy link
Member

@finestructure finestructure commented Aug 8, 2024

Both dev and prod are on version 16.3 now.

In order to switch over locally, run

make db-down db-up

⚠️ This will delete local data ⚠️

Check the postgres version via the following SQL query:

SELECT version();

@cla-bot cla-bot bot added the cla-signed label Aug 8, 2024
@finestructure finestructure marked this pull request as ready for review September 1, 2024 09:05
@finestructure finestructure marked this pull request as draft September 1, 2024 09:12
@finestructure
Copy link
Member Author

Putting this back in draft, because I'm seeing a huge performance regression when running the tests locally with the postgres:16.3-alpine container: 360 seconds vs 90 seconds.

I'm guessing it's related to the temp fs flag --tmpfs /pgdata:rw,noexec,nosuid,size=1024m we're using. Needs investigation.

@finestructure
Copy link
Member Author

No, it's Postgres itself. Here are the timing just running the AnalyzerTests:

❯ make db-down-test db-up-test && sleep 3 && time swift test --disable-automatic-resolution --filter AppTests.AnalyzerTests

for different versions of Postgres (plus with/without tempfs in two cases):

  • pg13 + tempfs: 11s
  • pg16 + tempfs: 27s
  • pg13: 15s
  • pg14: 37s
  • pg15: 37s
  • pg16: 34s

Next guess it's related to the table truncation we're doing in db test setup.

@finestructure finestructure marked this pull request as ready for review September 5, 2024 13:42
@finestructure finestructure merged commit 1d24166 into main Sep 5, 2024
5 checks passed
@finestructure finestructure deleted the update-postgres-db branch September 5, 2024 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants