cleanup workaround for neon db
We are now using the llink database within our gcp datbase instances, so likely won't be needing this workaround
This commit is contained in:
@@ -5,7 +5,6 @@ import (
|
|||||||
"log/slog"
|
"log/slog"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/jackc/pgx/v5"
|
|
||||||
"github.com/jackc/pgx/v5/pgxpool"
|
"github.com/jackc/pgx/v5/pgxpool"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -26,14 +25,7 @@ func Init() {
|
|||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
config, err := pgxpool.ParseConfig(connString)
|
dbpool, err := pgxpool.New(context.Background(), connString)
|
||||||
if err != nil {
|
|
||||||
slog.Error("unable to parse connection string", "error", err)
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
config.ConnConfig.DefaultQueryExecMode = pgx.QueryExecModeCacheDescribe
|
|
||||||
|
|
||||||
dbpool, err := pgxpool.NewWithConfig(context.Background(), config)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
slog.Error("unable to create connection pool", "error", err)
|
slog.Error("unable to create connection pool", "error", err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
|
|||||||
Reference in New Issue
Block a user