From: | "Joel Burton" <jburton(at)scw(dot)org> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Cc: | pgsql-general(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)com |
Subject: | Re: Warning: Don't delete those /tmp/.PGSQL.* files |
Date: | 2000-11-28 18:14:21 |
Message-ID: | 3A23AFAD.13643.6225C2DE@localhost |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
On 25 Nov 2000, at 17:35, Tom Lane wrote:
> > So, I began restarting pgsql w/a line like
>
> > rm -f /tmp/.PGSQL.* && postmaster -i >log 2>log &
>
> > Which works great. Except that I *kept* using this for two weeks
> > after the view problem (damn that bash up-arrow laziness!), and
> > yesterday, used it to restart PostgreSQL except (oops!) it was
> > already running.
>
> > Results: no database at all. All classes (tables/views/etc) returned
> > 0 records (meaning that no tables showed up in psql's \d, since
> > pg_class returned nothing.)
>
> Ugh. The reason that removing the socket file allowed a second
> postmaster to start up is that we use an advisory lock on the socket
> file as the interlock that prevents two PMs on the same port number.
> Remove the socket file, poof no interlock.
>
> *However*, there is a second line of defense to prevent two
> postmasters in the same directory, and I don't understand why that
> didn't trigger. Unless you are running a version old enough to not
> have it. What PG version is this, anyway?
7.1devel, from about 1 week ago.
> Assuming you got past both interlocks, the second postmaster would
> have reinitialized Postgres' shared memory block for that database,
> which would have been a Bad Thing(tm) ... but it would not have led to
> any immediate damage to your on-disk files, AFAICS. Was the database
> still hosed after you stopped both postmasters and started a fresh
> one? (Did you even try that?)
Yes, I stopped both, rebooted machine, restarted postmaster.
Rebooted machine, used just postgres, tried to vacuum, tried to
dump, etc. Always the same story.
--
Joel Burton, Director of Information Systems -*- jburton(at)scw(dot)org
Support Center of Washington (www.scw.org)
From | Date | Subject | |
---|---|---|---|
Next Message | Kenneth Been | 2000-11-28 18:36:11 | Re: large tuple |
Previous Message | Bernie Huang | 2000-11-28 17:53:55 | Re: a script that queries db periodically |
From | Date | Subject | |
---|---|---|---|
Next Message | mlw | 2000-11-28 18:20:34 | [Fwd: Re: 8192 BLCKSZ ?] |
Previous Message | Mitch Vincent | 2000-11-28 18:12:27 | Re: beta testing version |