PostgreSQL error

I installed PostgreSQL over a month ago as a backend for Drupal 8 and it has been running unobtrusively since, until a couple of days ago when it stopped and now I can't restart it...
Code:
$ service postgresql start
pg_ctl: another server might be running; trying to start server anyway
LOG:  unrecognized configuration parameter "dynamic_shared_memory_type" in file "/usr/local/pgsql/data/postgresql.conf" line 132
FATAL:  configuration file "/usr/local/pgsql/data/postgresql.conf" contains errors
pg_ctl: could not start server
Examine the log output.

/usr/local/pgsql/data/postgresql.conf line 132:-

Code:
dynamic_shared_memory_type = posix      # the default is the first option
                                        # supported by the operating system:
                                        #   posix
                                        #   sysv
                                        #   windows
                                        #   mmap
                                        # use none to disable dynamic shared memory
This has not been changed since installation a month ago.

Unfortunately I can't locate the log. log destination is set to 'syslog' so am not sure where it gets sent.
 
Hi, you may try to set this parameter to sysv or just comment it out and check what will happen, think it's already pre-builded with something.
 
It was working with this parameter whe it was installed....

Ive just changed to sysv and then none and the same error occured.
 
Obvious question: is it possible that another copy of PostgeSQL is still running somewhere? Have you checked with both ps and pg_ctl?
 
What version of PostgreSQL (there are several available)? And is it running in a jail or not?
 
Hi again, make sure you have 1 instance of that variable in your config file and try to comment it out with a #. (last time you set it up to none).

Small update: can you please post config file.
 
I have commented out that line and tried a restart. Now I get this weird error:-

Code:
pg_ctl: another server might be running; trying to start server anyway
FATAL:  database files are incompatible with server
DETAIL:  The data directory was initialized by PostgreSQL version 9.4, which is not compatible with this version 9.3.12.
pg_ctl: could not start server
Examine the log output.

I installed postgresql using pkg install. It took very little setting up and I don't recall changing the config.file.

It worked straight away so I can't understand this version incompatibility.

I would reinstall, but am worried that I might lose the database I have already created.
 
Well, now everything getting clear, somehow PostreSQL was updated to a new version (9.4). You may deinstall this version and install 9.3.xx, hope that trick will work with your current database files, as PostgreSQL 9.4 don't want to touch it, without it get updated. Or you may try to update database files to a new version and make it work this way.
 
Is there some pkg info option which will tell me what was installed and when?

I can't imagine how PostgreSQL got updated.
 
Well, now everything getting clear, somehow PostreSQL was updated to a new version (9.4). You may deinstall this version and install 9.3.xx, hope that trick will work with your current database files, as PostgreSQL 9.4 don't want to touch it, without it get updated. Or you may try to update database files to a new version and make it work this way.

I've been unable to sort out these problems because of lack of access to the server until now, but wondered if upgrading to a later version of PostgreSQL would be one way of getting things fixed...
 
Back
Top