Fail to create PK or index for large table in Windows

From: Pavel <ospavelmail(at)gmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Fail to create PK or index for large table in Windows
Date: 2018-11-12 21:06:55
Message-ID: CAHDGBJP_GsESbTt4P3FZA8kMUKuYxjg57XHF7NRBoKnR=CAR-g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

PostgreSQL 11.0, 11.1
OS: Windows 7 x64
RAM: 16GB

Database location was created with initdb.
Scheme sc.

Table contains 600 000 000 rows with structure:
table sc.address
(
id_address integer not null,
base varchar not null,
raw bytea not null,
key bytea,
id_key integer
)

Server start command:
pg_ctl -D g:\PostgreSQL11\data -l g:\PostgreSQL11\log\log.txt -o "-p 5426" start

Bug:
>psql -d dbname -p 5426
psql (11.1)
dbname =# \set VERBOSITY verbose
dbname =# alter table sc.address add primary key (id_address);
ERROR: 58P01: could not determine size of temporary file "0"
LOCATION: ltsConcatWorkerTapes,
d:\pginstaller.auto\postgres.windows-x64\src\backend\utils\sort\logtape.c:439
dbname=#

Log file (command "alter..." requested at 2018-11-12 20:21:37):
2018-11-12 20:21:37.640 MSK [6848] ERROR: canceling autovacuum task
2018-11-12 20:21:37.640 MSK [6848] CONTEXT: automatic vacuum of table
"dbname.sc.address"
2018-11-12 21:31:05.182 MSK [6672] ERROR: could not determine size of
temporary file "0"
2018-11-12 21:31:05.182 MSK [6672] STATEMENT: alter table sc.address
add primary key (id_address);
2018-11-12 21:31:05.889 MSK [7008] LOG: could not rmdir directory
"base/pgsql_tmp/pgsql_tmp6672.0.sharedfileset": Directory not empty

After error the directory
"base/pgsql_tmp/pgsql_tmp6672.0.sharedfileset" is empty.

In the PostgreSQL 10 with the same database (copied via pg_dump and
psql) there is no problems - index/key created successfully.

It looks like this bug is disallow to index any large tables under Windows.

Best regards,
Pavel Oskin

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Romero, Yonatan 2018-11-12 21:10:54 Re: BUG #15499: pg_dump does not read connection URL from environment variable
Previous Message David G. Johnston 2018-11-12 21:03:56 Re: BUG #15499: pg_dump does not read connection URL from environment variable