Re: [GENERAL] Can't restart Postgres - Mailing list pgsql-general

From Shawn Thomas
Subject Re: [GENERAL] Can't restart Postgres
Date
Msg-id FE9CF085-2518-4CEA-A4B6-D020DD354585@u.washington.edu
Whole thread Raw
In response to Re: [GENERAL] Can't restart Postgres  (Adrian Klaver <adrian.klaver@aklaver.com>)
Responses Re: [GENERAL] Can't restart Postgres  ("Joshua D. Drake" <jd@commandprompt.com>)
List pgsql-general
Just wanted to follow up that re-installing Postgres worked (well almost—I did have to reset the permissions and
ownershipon the key and pem file).   

Thanks so much for all the help.

-Shawn

> On Feb 15, 2017, at 9:49 AM, Adrian Klaver <adrian.klaver@aklaver.com> wrote:
>
> On 02/15/2017 09:45 AM, Shawn Thomas wrote:
>> Which would you recommend?  Leave the data directory in place and
>> re-install PG or copy it to somewhere else, delete it and then
>> re-install PG?
>
> I would copy the data directory somewhere else for safe keeping leaving the original in place. Then reinstall
Postgres,the install should leave the original directory alone and you will be ready to go. Should there be an oops you
willhave the copy as backup. 
>
>>
>> -Shawn
>>
>>> On Feb 15, 2017, at 9:36 AM, Magnus Hagander <magnus@hagander.net
>>> <mailto:magnus@hagander.net>> wrote:
>>>
>>> On Wed, Feb 15, 2017 at 6:28 PM, Shawn Thomas
>>> <thomassd@u.washington.edu <mailto:thomassd@u.washington.edu>> wrote:
>>>
>>>    Well that would make more sense of things.  I had removed and
>>>    re-installed the postresql-common package:
>>>
>>>    https://packages.debian.org/jessie/postgresql-common
>>>    <https://packages.debian.org/jessie/postgresql-common>
>>>
>>>    and thought that it would leave the main PG package in place.  But
>>>    perhaps I was wrong.  I’ll follow Tom’s advice and just re-install
>>>    everything (saving the old data directory) and hope the new
>>>    installation can use the old data data directory.
>>>
>>>
>>> If you removed it and then installed it, then the removal would remove
>>> all dependent packages and if you then only intalled that one and not
>>> the dependencies that would explain it.
>>>
>>> If you had run a reinstall on it, then it would've kept them around.
>>>
>>>
>>>
>>>    One question about this approach though:  the Debian package
>>>    installation automatically initializes the new data directory and
>>>    starts PG.  If I shut it down and copy the old data directory into
>>>    the newly installed one, will there be an xlog issue?
>>>
>>>
>>> You have to copy the xlog along with the database.
>>>
>>> Or if you leave it in place where it is, the packages won't initialize
>>> a new data directory.
>>>
>>> --
>>> Magnus Hagander
>>> Me: http://www.hagander.net/
>>> Work: http://www.redpill-linpro.com/
>>
>
>
> --
> Adrian Klaver
> adrian.klaver@aklaver.com



pgsql-general by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: [GENERAL] Autovacuum stuck for hours, blocking queries
Next
From: "David O'Mahony"
Date:
Subject: [GENERAL] Potential Bug: Frequent Unnecessary Degeneration