Fail to create PK or index for large table in Windows
Pavel <ospavelmail@gmail.com>
From: Pavel <ospavelmail@gmail.com>
To: pgsql-bugs@postgresql.org
Date: 2018-11-12T21:06:55Z
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
Commits
-
Use 64 bit type for BufFileSize().
- fa2ceaca4358 11.2 landed
- aa5518304213 12.0 landed