Re: spiexceptions.UndefinedFile: could not open file "base/16482/681830": No such file or directory - Mailing list pgsql-general

From Celia McInnis
Subject Re: spiexceptions.UndefinedFile: could not open file "base/16482/681830": No such file or directory
Date
Msg-id CAGD6t7L0sMMzaZgx1a0zp+ZA60GjG6Qufa3wu=zKLp2V-9T5QA@mail.gmail.com
Whole thread Raw
In response to Re: spiexceptions.UndefinedFile: could not open file "base/16482/681830": No such file or directory  (Thomas Munro <thomas.munro@gmail.com>)
List pgsql-general
YES!!! The chdir caused the error! Thanks very much for this help. BTW it was worse than just "not a very good idea" to use chdir - After generating the error, I would lose the ability to see things in my database until restarting postgresql. All's okay now!

On Wed, Sep 8, 2021 at 8:56 PM Thomas Munro <thomas.munro@gmail.com> wrote:
On Thu, Sep 9, 2021 at 9:19 AM Celia McInnis <celia.mcinnis@gmail.com> wrote:
> Note that the file does exist:! (How do I know if it is looking under the correct directory? Other times I have done similar temporary table creations with no problems!):

PostgreSQL internally uses relative paths.  It's probably not a very
good idea to use 'chdir' in a procedure.

pgsql-general by date:

Previous
From: Thomas Munro
Date:
Subject: Re: spiexceptions.UndefinedFile: could not open file "base/16482/681830": No such file or directory
Next
From: Abhishek Bhola
Date:
Subject: Postgresql 11: terminating walsender process due to replication timeout