pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: c_michal@poczta.onet.pl
Subject: BUG #15942: not working function pg_stat_file
Date: Wed, 07 Aug 2019 20:07:27 +0000
Message-ID: <15942-58fbac022aa82a2f@postgresql.org> (raw)

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.



view thread (2+ messages)  latest in thread

Message-ID: <15942-58fbac022aa82a2f@postgresql.org>
Permalink:  ../15942-58fbac022aa82a2f@postgresql.org/
Also on:    postgresql.org/message-id/15942-58fbac022aa82a2f@postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: noreply@postgresql.org, c_michal@poczta.onet.pl
  Subject: Re: BUG #15942: not working function pg_stat_file
  In-Reply-To: <15942-58fbac022aa82a2f@postgresql.org>
  References: <15942-58fbac022aa82a2f@postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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