[Pkg-postgresql-public] Bug#768098: Bug#768098: Upgrade Instructions - POSSIBLE DATA LOSS

Evgeni Golov evgeni at debian.org
Wed Nov 5 06:35:26 UTC 2014


Hi Michael,

On 11/05/2014 12:11 AM, Michael Evans wrote:
> The provided upgrade instructions, if run exactly, lead to data loss
> (critical).

As there is no automatic upgrade, one could expect the admin reads the
output on his screen. Otherwise dropcluster can produce data loss too :)

> When following the provided instructions, the current working directory
> is not changed.

"su -" changes the working directory.

> Files are saved to the current working directory.
> 
> It is /extremely/ likely that the postgres user does not have write
> access to said current working directory (often it is /root ).

root at nana:~# whoami
root
root at nana:~# pwd
/root
root at nana:~# su - postgres
postgres at nana:~$ pwd
/var/lib/postgresql

> The instructions should be modified to store and read files in ~
> postgres/ OR include a cd ~postgres (to ensure that the correct
> directory is referenced).

And what if there is not enough space left in ~postgres?

> Alternatively, a multi-instruction pre/post commands with && separating
> operations should be used, to force an error to occur the first time
> revealing the need to modify the provided commands to administrator taste.
> 
> The provided example is particularly dangerous because it /looks/ at a
> glance like it will work and that status messages might be ignorable
> (during the work of copy/pasting or retyping lines).

The provided example is exactly that: an example, the admin should read,
understand and adopt it. If it would be an exact upgrade-path, it would
be a maintainer-script. The admin has to adopt it for his cluster-names
anyways. Making this in a && separated one-liner is harder than in a
normal list.

I am leaving this bug open for the real PostgreSQL maintainers, but I
guess it won't be fixed further.

Greets
Evgeni



More information about the Pkg-postgresql-public mailing list