if err != nil {
return
}
+ if opts.PageSize == 0 {
+ opts.PageSize = 1 << 14
+ }
err = initPoolDatabase(conns, opts.InitDbOpts)
if err != nil {
conns.Close()
func initDatabase(conn conn, opts InitDbOpts) (err error) {
if !opts.DontInitSchema {
- if opts.PageSize == 0 {
- // There doesn't seem to be an optimal size. I did try with the standard chunk size, but
- // the difference is not convincing.
-
- opts.PageSize = 1 << 14
- }
err = InitSchema(conn, opts.PageSize, !opts.NoTriggers)
if err != nil {
return