Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top


Excuse me very much, the error was highly stupid: I modified start.conf and changed it to manual. I thought that it was related to the start of the service at init, not to the start of the cluster at the service start...


I gave up and reset completely postgres, as suggested in this thread. Even after this reset I was not able to use the "main" cluster, I had to remove and reinstall it. Now it works, but I don't understand what happened.

I think that @Pjack was on the right track, the problem was probably be that postgres thought the clusters were already running, or the ports were already used. If the problem comes up again I'll investigate more deeply.

*** UPDATE ***

I tried also to remove and reinstall postgres and postgis but it doesn't work. This is what I've done

sudo apt-get remove postgis libarmadillo3 libdap11 libdapclient3 libepsilon0 libfreexl1 libgdal1 libgeos-3.3.8 libgeos-c1 libgfortran3 libhdf4-0-alt libhdf5-7 liblapack3 libnetcdfc7 libodbc1 libpq5 libproj0 libspatialite5 libxerces-c28 odbcinst odbcinst1debian2 postgresql-9.1 postgresql-9.1-postgis postgresql-client-9.1 postgresql-client-common postgresql-common proj-bin proj-data

A strange message was showed up during uninstall:

Removing postgresql-common ...
 * No PostgreSQL clusters exist; see "man pg_createcluster"

Of course I have created a cluster when I installed postgres. I tried to install a new cluster 'test' and it works, but I obviously I can't access any database of the other clusters.

I can't connect anymore to my Postgres databases. Trying to access it gives me the usual error:

psql: could not connect to server: No such file or directory
    Is the server running locally and accepting
    connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5433"?

Starting the postgres service gives me no error, and there's no error in var/log/postgresql/ , but checking the status gives me:

9.1/main (port 5432): down
9.1/postgres (port 5433): down

while usually I have port 5433 up, and netstat -l | grep postg gives me no result.

From the last time it worked and now, I tried to dump OpenStreetMap data inside a postgis db. The only "dangerous" things that I could have done was changing these postgres settings:

shared_buffers = 944MB
checkpoint_segments = 20
maintenance_work_mem = 256MB
effective_cache_size = 1889MB
checkpoint_completion_target = 0.9

and adding in /etc/sysctl.conf


as suggested on postgres documentation for tuning-up the db performance. Anyway I reverted all the changes, using the default values or commenting added lines.

The second thing I've done was that I executed osm2pgsql to dump the data, using:

sudo stop lightdm
osm2pgsql -r pbf -C 3200 --slim -G --tablespace-main-data main-data --tablespace-main-index main-index --tablespace-slim-data slim-data --tablespace-slim-index slim-index toscana.pbf

I don't know if osm2pgsql did something dangerous, but I don't think so... What could have happened?

I'm using Postgres 9.1 + Postgis 2 on Lubuntu 13.04 32 bit on local, using a peer authentication and a Unix socket.


migration rejected from Jul 1 '13 at 16:29

This question came from our site for professional and enthusiast programmers. Votes, comments, and answers are locked due to the question being closed here, but it may be eligible for editing and reopening on the site where it originated.

closed as off-topic by Mark Storey-Smith, Paul White, ypercubeᵀᴹ, dezso, RolandoMySQLDBA Jul 1 '13 at 16:29

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Too localized - this could be because your code has a typo, basic error, or is not relevant to most of our audience. Consider revising your question so that it appeals to a broader audience. As it stands, the question is unlikely to help other users (regarding typo questions, see this meta question for background)." – Mark Storey-Smith, Paul White, ypercubeᵀᴹ, dezso, RolandoMySQLDBA
If this question can be reworded to fit the rules in the help center, please edit the question.

Where or how are you trying to connect from it? From where to where? – Pjack Jun 29 '13 at 12:59
@Glenn: There's a Stack site for everything... :D How can I move the question? Must I ask to moderators? – Lucas Malor Jun 29 '13 at 13:00
@Pjack: locally using a Unix socket. PS: I updated the question :) – Lucas Malor Jun 29 '13 at 13:01
@LucasMalor: If you're using a socket why are you worried that the port is down? And what is the error message you get while you try to connect? – Jakub Kania Jun 29 '13 at 13:50
@JakubKania: the unix socket does not work as well, and anyway previously the port was opened correctly at postgres start... The error is the usual psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5433"? – Lucas Malor Jun 29 '13 at 14:36