pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #15942: not working function pg_stat_file
2+ messages / 2 participants
[nested] [flat]
* BUG #15942: not working function pg_stat_file
@ 2019-08-07 20:07 PG Bug reporting form <noreply@postgresql.org>
2019-08-07 21:44 ` Re: BUG #15942: not working function pg_stat_file Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 2+ messages in thread
From: PG Bug reporting form @ 2019-08-07 20:07 UTC (permalink / raw)
To: pgsql-bugs@lists.postgresql.org; +Cc: c_michal@poczta.onet.pl
The following bug has been logged on the website:
Bug reference: 15942
Logged by: Michal C
Email address: c_michal@poczta.onet.pl
PostgreSQL version: 11.4
Operating system: Microsoft Windows [Version 10.0.18362.267]
Description:
Sorry my English is horribile.
my PG version is "PostgreSQL 11.4, compiled by Visual C++ build 1914,
64-bit"
I create 2 GB file:
show data_directory;
Result: "D:/pg_data"
copy (select
to_char(number,'0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000')
from generate_series(1,1024*1024*2,1) d(number))
to 'D:\pg_data\my_data_01.txt';
and reading information about file:
with files as (select * from pg_ls_dir('.') f(file) where file ilike
'my_data_01.txt')
, files_info as (select file, (pg_stat_file(file)).* from files)
select * from files_info;
and result is:
> ERROR: could not stat file "my_data_01.txt": Unknown error
> SQL state: XX000
When I run the script on PG 10.9 on the same computer, everything works
fine.
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: BUG #15942: not working function pg_stat_file
2019-08-07 20:07 BUG #15942: not working function pg_stat_file PG Bug reporting form <noreply@postgresql.org>
@ 2019-08-07 21:44 ` Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2019-08-07 21:44 UTC (permalink / raw)
To: c_michal@poczta.onet.pl; +Cc: pgsql-bugs@lists.postgresql.org
PG Bug reporting form <noreply@postgresql.org> writes:
> I create 2 GB file:
> ...
> (and then pg_stat_file fails on it)
Yeah, this is a known problem on Windows: it provides a stat() function
that fails on large files. There's been some discussion of how we might
work around that, most recently here:
https://www.postgresql.org/message-id/flat/1803D792815FC24D871C00D17AE95905CF5099%40g01jpexmbkw24
but that hasn't been turned into a patch and you shouldn't
hold your breath waiting for it to happen :-(. There's probably
no chance that the eventual fix would be safe to back-patch into
existing release branches, either.
So ... we might have a fix for this someday, but probably not soon.
It is annoying that we're just reporting "Unknown error" though.
That could be improved to show something more specific without
a lot of work, I imagine.
regards, tom lane
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2019-08-07 21:44 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-08-07 20:07 BUG #15942: not working function pg_stat_file PG Bug reporting form <noreply@postgresql.org>
2019-08-07 21:44 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox