ERROR: could not open file "pg_tblspc/ issue with replication setup.

From: Rajkumar Raghuwanshi <rajkumar(dot)raghuwanshi(at)enterprisedb(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: ERROR: could not open file "pg_tblspc/ issue with replication setup.
Date: 2020-04-16 08:26:47
Message-ID: CAKcux6k6AeA1Sd1XzTaeb-o0f0CNZu2+UdHr6OqUfWxh16ocgQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

While testing for a feature I got this tablespace related error while
running script.
The Issue is not reproducible everytime, but If I am running the same set
of commands after 2-3 runs I am able to reproduce the same error.

--first run - pass
# master slave setup
+ mkdir /tmp/test_bkp/tblsp01
+ ./psql postgres -p 5432 -c 'create tablespace tblsp01 location
'\''/tmp/test_bkp/tblsp01'\'';'
CREATE TABLESPACE
+ ./psql postgres -p 5432 -c 'create table test (a text) tablespace
tblsp01;'
CREATE TABLE
#cleanup

--next
#master-slave setup
+ mkdir /tmp/test_bkp/tblsp01
+ ./psql postgres -p 5432 -c 'create tablespace tblsp01 location
'\''/tmp/test_bkp/tblsp01'\'';'
CREATE TABLESPACE
+ ./psql postgres -p 5432 -c 'create table test (a text) tablespace
tblsp01;'
ERROR: could not open file "pg_tblspc/16384/PG_13_202004074/13530/16388":
No such file or directory

Attaching command and script which help to reproduce it.
[edb(at)localhost bin]$ while sh pg_tblsp_wal.sh; do :; done

Thanks & Regards,
Rajkumar Raghuwanshi

Attachment Content-Type Size
pg_tblsp_wal.sh application/x-shellscript 1.2 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hamid Akhtar 2020-04-16 08:42:36 Re: Do we need to handle orphaned prepared transactions in the server?
Previous Message Michael Paquier 2020-04-16 08:11:00 Re: [BUG] non archived WAL removed during production crash recovery