while
parent
72a63afdee
commit
8b748280a9
|
|
@ -57,7 +57,10 @@ func run(ctx context.Context) error {
|
||||||
|
|
||||||
// https://gist.github.com/ololobus/5b25c432f208d7eb31051a5f238dffff
|
// https://gist.github.com/ololobus/5b25c432f208d7eb31051a5f238dffff
|
||||||
// 2e6=1GB, so 2e6/8=12MB
|
// 2e6=1GB, so 2e6/8=12MB
|
||||||
for i := presently() / 12; i < (*n)/12; i++ {
|
for {
|
||||||
|
if presently() >= *n {
|
||||||
|
break
|
||||||
|
}
|
||||||
for ctx.Err() == nil {
|
for ctx.Err() == nil {
|
||||||
if _, err := pg.ExecContext(ctx, `
|
if _, err := pg.ExecContext(ctx, `
|
||||||
INSERT INTO fill_with_data (x, y, z)
|
INSERT INTO fill_with_data (x, y, z)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue