Should I reinstall over current installation?

Started by Chris Charleyabout 6 years ago13 messagesgeneral
Jump to latest
#1Chris Charley
charleyc2718@gmail.com

I just got my Windows 10 computer in Nov 2019 and installed PostgreSQL Jan
this year.

I had a problem with Windows update and when I contacted Microsoft, they
installed a fresh operating system. After that, I was unable to run
postgres from pgAdmin 4 or from a perl program that accessed the database.

The message I got was:

could not connect to server: Connection refused (0x0000274D/10061) Is the
server running on host "localhost" (127.0.0.1) and accepting TCP/IP
connections on port 5432? at pg_01.pl line 8.

I was considering 2 options:

!) Reinstall postgres over the current without removing the current
postgres first.
2) uninstall the current postgres and then install postgres again.

The tables I created in my database are not many and if I lose them doing a
reinstall, I could recreate my database and the tables. I was considering
option (1) as I was wondering if that choice would keep the database and
tables I created this January.

(The database and contained tables are from 'Practical SQL' by Anthony
DeBarros.)

A second question is: When I try to edit anything in pgAdmin, sometimes it
won't let me edit the code. I then refresh the database in the left pane
and then it allows me to edit the SQL in the query pane.

Thank you for any help you may provide.

Chris

#2Adrian Klaver
adrian.klaver@aklaver.com
In reply to: Chris Charley (#1)
Re: Should I reinstall over current installation?

On 2/3/20 12:20 PM, Chris Charley wrote:

I just got my Windows 10 computer in Nov 2019 and installed PostgreSQL
Jan this year.

I had a problem with Windows update and when I contacted Microsoft, they
installed a fresh operating system. After that, I was unable to run
postgres from pgAdmin 4 or from a perl program that accessed the database.

The message I got was:

could not connect to server: Connection refused (0x0000274D/10061) Is
the server running on host "localhost" (127.0.0.1) and accepting TCP/IP
connections on port 5432? at pg_01.pl <http://pg_01.pl&gt; line 8.
**//___^

Does Postgres still exist on the system?

If it does have you started the service?

I  was considering 2 options:

!) Reinstall postgres over the current without removing the current
postgres first.
2) uninstall the current postgres and then install postgres again.

The tables I created in my database are not many and if I lose them
doing a reinstall, I could recreate my database and the tables. I was
considering option (1) as I was wondering if that choice would keep the
database and tables I created this January.

(The database and contained tables are from 'Practical SQL' by Anthony
DeBarros.)

A second question is: When I try to edit anything in pgAdmin, sometimes
it won't let me edit the code. I then refresh the database in the left
pane and then it allows me to edit the SQL in the query pane.

Thank you for any help you may provide.

Chris

--
Adrian Klaver
adrian.klaver@aklaver.com

#3Adrian Klaver
adrian.klaver@aklaver.com
In reply to: Chris Charley (#1)
Re: Should I reinstall over current installation?

On 2/3/20 12:44 PM, Chris Charley wrote:
Please reply to list also.
Ccing list.

Adrian

/Does Postgres still exist on the system?

If it does have you started the service?/

PostgreSQL-x64-12 is list as 'stopped' in the task manger services tab.
When I try to 'start', it doesn't change to 'running'.

What does the Windows system log show when you do this?

On Mon, Feb 3, 2020 at 3:26 PM Adrian Klaver <adrian.klaver@aklaver.com
<mailto:adrian.klaver@aklaver.com>> wrote:

On 2/3/20 12:20 PM, Chris Charley wrote:

I just got my Windows 10 computer in Nov 2019 and installed

PostgreSQL

Jan this year.

I had a problem with Windows update and when I contacted

Microsoft, they

installed a fresh operating system. After that, I was unable to run
postgres from pgAdmin 4 or from a perl program that accessed the

database.

The message I got was:

could not connect to server: Connection refused

(0x0000274D/10061) Is

the server running on host "localhost" (127.0.0.1) and accepting

TCP/IP

connections on port 5432? at pg_01.pl <http://pg_01.pl&gt;

<http://pg_01.pl&gt; line 8.

**//___^

Does Postgres still exist on the system?

If it does have you started the service?

I  was considering 2 options:

!) Reinstall postgres over the current without removing the current
postgres first.
2) uninstall the current postgres and then install postgres again.

The tables I created in my database are not many and if I lose them
doing a reinstall, I could recreate my database and the tables. I

was

considering option (1) as I was wondering if that choice would

keep the

database and tables I created this January.

(The database and contained tables are from 'Practical SQL' by

Anthony

DeBarros.)

A second question is: When I try to edit anything in pgAdmin,

sometimes

it won't let me edit the code. I then refresh the database in the

left

pane and then it allows me to edit the SQL in the query pane.

Thank you for any help you may provide.

Chris

--
Adrian Klaver
adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>

--
Adrian Klaver
adrian.klaver@aklaver.com

#4Chris Charley
charleyc2718@gmail.com
In reply to: Adrian Klaver (#3)
Re: Should I reinstall over current installation?

*What does the Windows system log show when you do this?*

I don't know where to find this log (for Windows 10)

On Mon, Feb 3, 2020 at 3:47 PM Adrian Klaver <adrian.klaver@aklaver.com>
wrote:

Show quoted text

On 2/3/20 12:44 PM, Chris Charley wrote:
Please reply to list also.
Ccing list.

Adrian

/Does Postgres still exist on the system?

If it does have you started the service?/

PostgreSQL-x64-12 is list as 'stopped' in the task manger services tab.
When I try to 'start', it doesn't change to 'running'.

What does the Windows system log show when you do this?

On Mon, Feb 3, 2020 at 3:26 PM Adrian Klaver <adrian.klaver@aklaver.com
<mailto:adrian.klaver@aklaver.com>> wrote:

On 2/3/20 12:20 PM, Chris Charley wrote:

I just got my Windows 10 computer in Nov 2019 and installed

PostgreSQL

Jan this year.

I had a problem with Windows update and when I contacted

Microsoft, they

installed a fresh operating system. After that, I was unable to

run

postgres from pgAdmin 4 or from a perl program that accessed the

database.

The message I got was:

could not connect to server: Connection refused

(0x0000274D/10061) Is

the server running on host "localhost" (127.0.0.1) and accepting

TCP/IP

connections on port 5432? at pg_01.pl <http://pg_01.pl&gt;

<http://pg_01.pl&gt; line 8.

**//___^

Does Postgres still exist on the system?

If it does have you started the service?

I was considering 2 options:

!) Reinstall postgres over the current without removing the

current

postgres first.
2) uninstall the current postgres and then install postgres again.

The tables I created in my database are not many and if I lose

them

doing a reinstall, I could recreate my database and the tables. I

was

considering option (1) as I was wondering if that choice would

keep the

database and tables I created this January.

(The database and contained tables are from 'Practical SQL' by

Anthony

DeBarros.)

A second question is: When I try to edit anything in pgAdmin,

sometimes

it won't let me edit the code. I then refresh the database in the

left

pane and then it allows me to edit the SQL in the query pane.

Thank you for any help you may provide.

Chris

--
Adrian Klaver
adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>

--
Adrian Klaver
adrian.klaver@aklaver.com

#5Adrian Klaver
adrian.klaver@aklaver.com
In reply to: Chris Charley (#4)
Re: Should I reinstall over current installation?

On 2/3/20 12:54 PM, Chris Charley wrote:

/What does the Windows system log show when you do this?/

I don't know where to find this log (for Windows 10)

I'm not a Windows user, what I can do is point you at:

https://www.howtogeek.com/123646/htg-explains-what-the-windows-event-viewer-is-and-how-you-can-use-it/

--
Adrian Klaver
adrian.klaver@aklaver.com

#6Chris Charley
charleyc2718@gmail.com
In reply to: Adrian Klaver (#5)
Re: Should I reinstall over current installation?

Hi

The link you provided (
https://www.howtogeek.com/123646/htg-explains-what-the-windows-event-viewer-is-and-how-you-can-use-it/
)

Points me to Event Viewer but I'm kinda lost there trying to find anything
pertaining to postgreql.

On Mon, Feb 3, 2020 at 4:02 PM Adrian Klaver <adrian.klaver@aklaver.com>
wrote:

Show quoted text

On 2/3/20 12:54 PM, Chris Charley wrote:

/What does the Windows system log show when you do this?/

I don't know where to find this log (for Windows 10)

I'm not a Windows user, what I can do is point you at:

https://www.howtogeek.com/123646/htg-explains-what-the-windows-event-viewer-is-and-how-you-can-use-it/

--
Adrian Klaver
adrian.klaver@aklaver.com

#7Adrian Klaver
adrian.klaver@aklaver.com
In reply to: Chris Charley (#6)
Re: Should I reinstall over current installation?

On 2/3/20 1:11 PM, Chris Charley wrote:

Hi

The link you provided
(https://www.howtogeek.com/123646/htg-explains-what-the-windows-event-viewer-is-and-how-you-can-use-it/)

Points me to Event Viewer but I'm kinda lost there trying to find
anything pertaining to postgreql.

I cranked up a Windows 7 instance, which should be close enough. What I
found:

1) Open Event Viewer

2) Click on Windows Logs

3) Click on Application

4) The center section will show logs. The application name is under Source.

5) If you want to search, then Ctrl+f and enter Postgres

On Mon, Feb 3, 2020 at 4:02 PM Adrian Klaver <adrian.klaver@aklaver.com
<mailto:adrian.klaver@aklaver.com>> wrote:

On 2/3/20 12:54 PM, Chris Charley wrote:

/What does the Windows system log show when you do this?/

I don't know where to find this log (for Windows 10)

I'm not a Windows user, what I can do is point you at:

https://www.howtogeek.com/123646/htg-explains-what-the-windows-event-viewer-is-and-how-you-can-use-it/

--
Adrian Klaver
adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>

--
Adrian Klaver
adrian.klaver@aklaver.com

#8Chris Charley
charleyc2718@gmail.com
In reply to: Adrian Klaver (#7)
Re: Should I reinstall over current installation?

I tried items you suggested (1-5), but could find no helpful info.

Thanks for your help and going the extra mile!

On Mon, Feb 3, 2020 at 4:23 PM Adrian Klaver <adrian.klaver@aklaver.com>
wrote:

Show quoted text

On 2/3/20 1:11 PM, Chris Charley wrote:

Hi

The link you provided
(

https://www.howtogeek.com/123646/htg-explains-what-the-windows-event-viewer-is-and-how-you-can-use-it/
)

Points me to Event Viewer but I'm kinda lost there trying to find
anything pertaining to postgreql.

I cranked up a Windows 7 instance, which should be close enough. What I
found:

1) Open Event Viewer

2) Click on Windows Logs

3) Click on Application

4) The center section will show logs. The application name is under Source.

5) If you want to search, then Ctrl+f and enter Postgres

On Mon, Feb 3, 2020 at 4:02 PM Adrian Klaver <adrian.klaver@aklaver.com
<mailto:adrian.klaver@aklaver.com>> wrote:

On 2/3/20 12:54 PM, Chris Charley wrote:

/What does the Windows system log show when you do this?/

I don't know where to find this log (for Windows 10)

I'm not a Windows user, what I can do is point you at:

https://www.howtogeek.com/123646/htg-explains-what-the-windows-event-viewer-is-and-how-you-can-use-it/

--
Adrian Klaver
adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>

--
Adrian Klaver
adrian.klaver@aklaver.com

#9Adrian Klaver
adrian.klaver@aklaver.com
In reply to: Chris Charley (#8)
Re: Should I reinstall over current installation?

On 2/3/20 3:16 PM, Chris Charley wrote:

I tried items you suggested (1-5), but could find no helpful info.

Well in that case I would try a reinstall.

Thanks for your help and going the extra mile!

On Mon, Feb 3, 2020 at 4:23 PM Adrian Klaver <adrian.klaver@aklaver.com
<mailto:adrian.klaver@aklaver.com>> wrote:

On 2/3/20 1:11 PM, Chris Charley wrote:

Hi

The link you provided

(https://www.howtogeek.com/123646/htg-explains-what-the-windows-event-viewer-is-and-how-you-can-use-it/)

Points me to Event Viewer but I'm kinda lost there trying to find
anything pertaining to postgreql.

I cranked up a Windows 7 instance, which should be close enough. What I
found:

1) Open Event Viewer

2) Click on Windows Logs

3) Click on Application

4) The center section will show logs. The application name is under
Source.

5) If you want to search, then Ctrl+f and enter Postgres

On Mon, Feb 3, 2020 at 4:02 PM Adrian Klaver

<adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>

<mailto:adrian.klaver@aklaver.com

<mailto:adrian.klaver@aklaver.com>>> wrote:

     On 2/3/20 12:54 PM, Chris Charley wrote:
      > /What does the Windows system log show when you do this?/
      >
      > I don't know where to find this log (for Windows 10)
      >

     I'm not a Windows user, what I can do is point you at:

https://www.howtogeek.com/123646/htg-explains-what-the-windows-event-viewer-is-and-how-you-can-use-it/

     --
     Adrian Klaver
adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>

<mailto:adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>>

--
Adrian Klaver
adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>

--
Adrian Klaver
adrian.klaver@aklaver.com

#10Moreno Andreo
moreno.andreo@evolu-s.it
In reply to: Chris Charley (#8)
Re: Should I reinstall over current installation?

Attachments:

gkdddhipgpnmkhnj.pngimage/png; name=gkdddhipgpnmkhnj.pngDownload
afhdhandimlajeoc.pngimage/png; name=afhdhandimlajeoc.pngDownload
#11Chris Charley
charleyc2718@gmail.com
In reply to: Moreno Andreo (#10)
Re: Should I reinstall over current installation?

Hello Moreno

Thanks for the reply!

I ran Services and it reported postsql as Disabled.

[image: services.png]

I also ran Event Viewer and found no mention of postgresql there in errors.

Then I ran Task Manager and the services tab and it showed postgresql as
stopped.

[image: image.png]

I am considering reinstall because I couldn't find any helpful info from
these services.
Thanks again for your help.
I suspect when Windows was reinstalled, the firewall was reconfigured and
PostgreSQL wasn't allowed to access the port?

Chris

On Tue, Feb 4, 2020 at 7:40 AM Moreno Andreo <moreno.andreo@evolu-s.it>
wrote:

Show quoted text

Il 04/02/2020 00:16, Chris Charley ha scritto:

I tried items you suggested (1-5), but could find no helpful info.

Thanks for your help and going the extra mile!

Hope I'm in time to try to save you from reinstall :-)

How to check if PostgreSQL is running
---------------------------------------------------
- Run Services.msc
- In the console you should have an entry with your postgres version (I
have 9.1 and 9.5 on this host)
- Check it's automatically started and running (It's in Italian, "In
esecuzione" means "running" and "Automatico", well.... :-)))))).
- If it's not, try to start it (right click on the service and select
start)
- If you get an error, check the error message

How to check the error message
-------------------------------------------
You have 2 choices

1 - Postgres Logs)
of all, you should check PostgreSQL logs under <Postgres install
folder>\data\pg_log. Here you should find some files showing you most of
the errors you would find in Event Viewer.
Check error messages and, if still needed, post them

2 - Windows Event Log)

- Enter Event Viewer
- Sort Events by date descending
- First entries should reveal why your postgres server is not running
(I captured the first error I got on this host just for example)
- On the lower pane, check what's the error message (in my case, "FATAL:
The database system is starting up").

If you need further help, post the error message and we'll try to help you.

Hope this help
Moreno.-

Attachments:

gkdddhipgpnmkhnj.pngimage/png; name=gkdddhipgpnmkhnj.pngDownload
afhdhandimlajeoc.pngimage/png; name=afhdhandimlajeoc.pngDownload
services.pngimage/png; name=services.pngDownload+3-0
image.pngimage/png; name=image.pngDownload+0-2
#12Moreno Andreo
moreno.andreo@evolu-s.it
In reply to: Chris Charley (#11)
Re: Should I reinstall over current installation?

Il 04/02/2020 21:18, Chris Charley ha scritto:

Hello Moreno

Thanks for the reply!

I ran Services and it reported postsql as Disabled.

A disabled service will never run nor leave error messages anywhere

Right click on the Postgresql service, select properties.
In the next window, choose startup type (the combo under the executable
path) and select Automatic, then click on the Start button below
Click OK and close the window.

Now something should happen. If everything goes well, You'll see
"Started" and "Automatic" in the two columns next to the service
description, and you can start your application
If there is an error message, then it should log something. See my last
mail to extract log informations and post them here

I am considering reinstall because I couldn't find any helpful info
from these services.

You got no helpful info because service does not start, andd so does not
log.... :-)

Thanks again for your help.
 I suspect when Windows was reinstalled, the firewall was reconfigured
and PostgreSQL wasn't allowed to access the port?

ATM there's a service start issue to be resolved, if there's also
something about the firewall, we'll think about it later.

Moreno.-

#13Chris Charley
charleyc2718@gmail.com
In reply to: Moreno Andreo (#12)
Re: Should I reinstall over current installation?

Moreno, thank you for all your help.

Following your instructions, I was able to recover my databases. All is
good.

Chris

On Wed, Feb 5, 2020 at 6:45 AM Moreno Andreo <moreno.andreo@evolu-s.it>
wrote:

Show quoted text

Il 04/02/2020 21:18, Chris Charley ha scritto:

Hello Moreno

Thanks for the reply!

I ran Services and it reported postsql as Disabled.

A disabled service will never run nor leave error messages anywhere

Right click on the Postgresql service, select properties.
In the next window, choose startup type (the combo under the executable
path) and select Automatic, then click on the Start button below
Click OK and close the window.

Now something should happen. If everything goes well, You'll see
"Started" and "Automatic" in the two columns next to the service
description, and you can start your application
If there is an error message, then it should log something. See my last
mail to extract log informations and post them here

I am considering reinstall because I couldn't find any helpful info
from these services.

You got no helpful info because service does not start, andd so does not
log.... :-)

Thanks again for your help.
I suspect when Windows was reinstalled, the firewall was reconfigured
and PostgreSQL wasn't allowed to access the port?

ATM there's a service start issue to be resolved, if there's also
something about the firewall, we'll think about it later.

Moreno.-