From: raf <raf@raf.org>
To: pgsql-general@lists.postgresql.org, FOUTE K. Jaurès <jauresfoute@gmail.com>
Subject: Re: PostgreSQL 12 - ERROR: could not rename file "pg_logical/snapshots/1A-7C00D890.snap.13594.tmp" to "pg_logical/snapshots/1A-7C00D890.snap": No space left on device
Date: Thu, 2 Jul 2020 10:06:22 +1000
Message-ID: <20200702000622.ehwnezoyu2valp5t@raf.org> (raw)
In-Reply-To: <CAHQ1jfc5CLT6sMG1XNv4coMq=bUZLoKj+HpzfhL37sYDmPo9SA@mail.gmail.com>
References: <CAHQ1jfcrLUFhn4BpeySx1_7VnA15Yt778TbxpYy6dWX-qxmf=w@mail.gmail.com>
<20200630231141.aw5qix2l4tvufxau@raf.org>
<CAHQ1jfc5CLT6sMG1XNv4coMq=bUZLoKj+HpzfhL37sYDmPo9SA@mail.gmail.com>
FOUTE K. Jaurès wrote:
> Le mer. 1 juil. 2020 à 00:11, raf <raf@raf.org> a écrit :
>
> > FOUTE K. Jaurčs wrote:
> >
> > > Hi everyone,
> > >
> > > I am use a native logical replication in PostgreSQL 12 on Ubuntu 16.04
> > and
> > > all is working fine until i faced this error below.
> > >
> > > ERROR: could not rename file
> > > "pg_logical/snapshots/1A-7C00D890.snap.13594.tmp" to
> > > "pg_logical/snapshots/1A-7C00D890.snap": No space left on device
> > >
> > > Is there someone who faced this problem?
> > > Any idea how I can solve it ?
> > >
> > > BTW: I don't have any problem with space.
> > >
> > > Best Regard
> > >
> > > --
> > > Jaurčs FOUTE
> >
> > If you really haven't run out of space,
> > you might have run out of inodes.
> > The -i option of df should show you.
> > 100,000 empty files could cause that.
> > I wouldn't think that renaming would
> > require a new inode, but I also wouldn't
> > think that renaming would require any
> > more space on a file system.
>
>
> The result of df -i
>
> Sys. de fichiers Inœuds IUtil. ILibre IUti% Monté sur
> udev 3065149 433 3064716 1% /dev
> tmpfs 3072780 665 3072115 1% /run
> /dev/sdb2 59973632 356029 59617603 1% /
> tmpfs 3072780 7 3072773 1% /dev/shm
> tmpfs 3072780 10 3072770 1% /run/lock
> tmpfs 3072780 17 3072763 1% /sys/fs/cgroup
> /dev/sdb1 0 0 0 - /boot/efi
> tmpfs 3072780 19 3072761 1% /run/user/108
> tmpfs 3072780 5 3072775 1% /run/user/1001
> tmpfs 3072780 5 3072775 1% /run/user/1000
So that's not it. It would take ~60 million
files to fill up your / inode table. I can't
think of another explanation for that error
message if df without -i also shows free space.
I tried googling for "No space left on device"
and everything suggested checking inodes with "df -i".
One suggested looking for files that were deleted
but that were still open by a process (can be found
with "lsof / | grep deleted") but if that were the
problem, df would show a full disk (but du wouldn't
be able to account for it).
Could it be some other "device"? like shared memory
segment space or IPC resources? That seems unlikely if
the operation was just a file system rename. Perhaps
strace/stap could help check if it really was a file
system rename that went wrong (if there's any reason to
doubt it). It does seem to clearly be a file rename
though.
If there any chance that the drive is failing? But
you'd expect "I/O error" messages if that were the case.
Is it on a journalling file system and could the journal
be the device that is full? I don't know how to check
that (or if it even makes sense).
cheers,
raf
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-general@postgresql.org
Cc: raf@raf.org, jauresfoute@gmail.com
Subject: Re: PostgreSQL 12 - ERROR: could not rename file "pg_logical/snapshots/1A-7C00D890.snap.13594.tmp" to "pg_logical/snapshots/1A-7C00D890.snap": No space left on device
In-Reply-To: <20200702000622.ehwnezoyu2valp5t@raf.org>
References: <CAHQ1jfcrLUFhn4BpeySx1_7VnA15Yt778TbxpYy6dWX-qxmf=w@mail.gmail.com> <20200630231141.aw5qix2l4tvufxau@raf.org> <CAHQ1jfc5CLT6sMG1XNv4coMq=bUZLoKj+HpzfhL37sYDmPo9SA@mail.gmail.com> <20200702000622.ehwnezoyu2valp5t@raf.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