Skip site navigation (1) Skip section navigation (2)

BUG #7573: data loss in corner case using

From: maxim(dot)boguk(at)gmail(dot)com
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #7573: data loss in corner case using
Date: 2012-09-28 01:18:26
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
The following bug has been logged on the website:

Bug reference:      7573
Logged by:          Maxim Boguk
Email address:      maxim(dot)boguk(at)gmail(dot)com
PostgreSQL version: 9.2.0
Operating system:   Linux


today while performing migration of test database (with no critical data...
and that was good thing).
I found very nasty corner case with using after

Test database have a bit unusual tablespace layout:
main tablespace partition was mounted inside data directory of the old
data directory - /var/lib/postgresql/9.2/main
main tablespace (another partition mount point) -

Now funny part: migration was successful but after few days I decided to
clear old cluster data...
I echecked content of but found nothing suspicious...
just one string...
rm -rf /var/lib/postgresql/9.2/main

Well I know I should be more careful, but in result that command deleted
whole tablespace data on another partition including 9.2 version

It was surprise...

May be it is good idea to add:
              when removing a hierarchy recursively, skip any directory that
is on a file system different from that of the corresponding command line

to rm call into that script.

However, it is Linux only feature.

PS: Yes I know that keeping any foreign data inside PostgreSQL data
directory is bad idea.


pgsql-bugs by date

Next:From: Alvaro HerreraDate: 2012-09-28 04:00:54
Subject: Re: BUG #7545: Unresponsive server with error log reporting: "poll() failed: Invalid argument"
Previous:From: Simon RiggsDate: 2012-09-27 21:29:02
Subject: Re: BUG #7572: virtualxid lock held by bgwriter on promoted slaves

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group