Merge pull request #4254 from hashicorp/tmessi-disable-jit

Disable postgres JIT for boudary dev
This commit is contained in:
Timothy Messier authored and GitHub committed 2024-01-18 14:38:14 -05:00
commit af5779e92b
5 files changed
+36 -2

No files matched your search

+14 -2
View File
@@ -41,6 +41,16 @@ func startDbInDockerSupported(dialect string, opt ...Option) (cleanup func() err
}
}
runOpts := &dockertest.RunOptions{
Tag: tag,
Env: []string{"POSTGRES_PASSWORD=password", "POSTGRES_DB=boundary"},
Cmd: []string{
// JIT seems to cause noticeable overhead without providing noticeable benefit.
// See: ICU-12283
"-c", "jit=off",
},
}
switch dialect {
case "postgres", "pgx":
switch {
@@ -48,13 +58,15 @@ func startDbInDockerSupported(dialect string, opt ...Option) (cleanup func() err
url = os.Getenv("BOUNDARY_TESTING_PG_URL")
return func() error { return nil }, url, "", nil
case repository != "":
resource, err = pool.Run(repository, tag, []string{"POSTGRES_PASSWORD=password", "POSTGRES_DB=boundary"})
runOpts.Repository = repository
resource, err = pool.RunWithOptions(runOpts)
url = "postgres://postgres:password@localhost:%s?sslmode=disable"
if err == nil {
url = fmt.Sprintf("postgres://postgres:password@%s/boundary?sslmode=disable", resource.GetHostPort("5432/tcp"))
}
default:
resource, err = pool.Run(dialect, tag, []string{"POSTGRES_PASSWORD=password", "POSTGRES_DB=boundary"})
runOpts.Repository = dialect
resource, err = pool.RunWithOptions(runOpts)
url = "postgres://postgres:password@localhost:%s?sslmode=disable"
if err == nil {
url = fmt.Sprintf("postgres://postgres:password@%s/boundary?sslmode=disable", resource.GetHostPort("5432/tcp"))
@@ -0,0 +1,7 @@
FROM postgres:14-alpine
ADD init-db.sh /docker-entrypoint-initdb.d/00-init-db.sh
ADD restore-benchmark-dumps.sh /docker-entrypoint-initdb.d/01-restore-benchmark-dumps.sh
ADD postgresql.conf /etc/postgresql/postgresql.conf
CMD ["postgres", "-c", "config_file=/etc/postgresql/postgresql.conf"]
@@ -0,0 +1,7 @@
FROM postgres:15-alpine
ADD init-db.sh /docker-entrypoint-initdb.d/00-init-db.sh
ADD restore-benchmark-dumps.sh /docker-entrypoint-initdb.d/01-restore-benchmark-dumps.sh
ADD postgresql.conf /etc/postgresql/postgresql.conf
CMD ["postgres", "-c", "config_file=/etc/postgresql/postgresql.conf"]
@@ -0,0 +1,7 @@
FROM postgres:16-alpine
ADD init-db.sh /docker-entrypoint-initdb.d/00-init-db.sh
ADD restore-benchmark-dumps.sh /docker-entrypoint-initdb.d/01-restore-benchmark-dumps.sh
ADD postgresql.conf /etc/postgresql/postgresql.conf
CMD ["postgres", "-c", "config_file=/etc/postgresql/postgresql.conf"]
+1
View File
@@ -34,3 +34,4 @@ lc_monetary = 'en_US.utf8'
lc_numeric = 'en_US.utf8'
lc_time = 'en_US.utf8'
default_text_search_config = 'pg_catalog.english'
jit = off # Disable JIT since it seems to just cause overhead and no gain