can't re-start postgresql

Поиск
Список
Период
Сортировка
Искать

can't re-start postgresql

От:
mjbjr@beaudesign.com
Дата:
I had a system, that was running postgres-7.1-1, lockup, and I had to
reboot.  Since the reboot, I can't get postgresql restarted.

As user 'postgres':

[postgres@localhost postgres]$ date
Thu May 31 00:40:09 PDT 2001

((current date))

[postgres@localhost postgres]$ echo $PGDATA
/var/lib/pgsql/data

((dat dir is set))

[ ... postgres]$ /usr/bin/postmaster > /tmp/postgres_logfile 2>&1 &
[1] 12117

[postgres@localhost postgres]$ ps aux | grep 12117
postgres 12119  0.0  0.1  1332  512 pts/5    S    00:34   0:00 grep 12117

((hmm, no pid))

[postgres@localhost postgres]$ cat /tmp/postgres_logfile
Found a pre-existing shared memory block (ID 4224672) still in use.
If you're sure there are no old backends still running,
remove the shared memory block with ipcrm(1), or just
delete "/var/lib/pgsql/data/postmaster.pid".

[postgres@localhost postgres]$ cat /var/lib/pgsql/data/postmaster.pid
15058
/var/lib/pgsql/data
  5432001   4224672

[postgres@localhost postgres]$ ps aux | grep 15058
postgres 12123  0.0  0.1  1332  512 pts/5    S    00:37   0:00 grep 15058

[postgres@localhost postgres]$ ls -l /var/lib/pgsql/data/postmaster.pid
-rw-------   1 postgres postgres       46 May 13 00:37
/var/lib/pgsql/data/postmaster.pid

(( ah, that postmaster.pid is from the last running postmaster: ))

[postgres@localhost postgres]$ ipcrm shm 4224672
shmctl : Identifier removed

((**appears** to have worked))

[postgres@localhost postgres]$ ps aux | grep 12130
postgres 12132  0.0  0.1  1332  512 pts/5    S    00:45   0:00 grep 12130

((but no))

[postgres@localhost postgres]$ ipcs -m 4224672

((returns a ton of addr info))


*******

Anyhow, the gist of it appears to be...

postmaster can't get restarted because of a shared mem problem, and that
while it appears to be removed ('ipcrm'), i get the same postgresql
startup error(s).  So it appears it is not being removed.

Any ideas on how to rectify the situation?

Thank you

-- 
                            - Martin J. Brown, Jr. -
                            - mjbjr@beaudesign.com -

    PGP Public Key ID: 0xCED9BD8A  Key Server: http://www.keyserver.net/en/

[SOLVED] Re: can't re-start postgresql

От:
mjbjr@beaudesign.com
Дата:
Jeff Waugh, , clued me in...

I was mis-reading this:

> If you're sure there are no old backends still running,
> remove the shared memory block with ipcrm(1), or just
> delete "/var/lib/pgsql/data/postmaster.pid".

I was trying to delete the pid in the above file, it no longer existed,
instead of deleting the file itself.  Deleting the file
"/var/lib/pgsql/data/postmaster.pid" itself did the trick.

Thank you to Jeff.

-- 
                            - Martin J. Brown, Jr. -
                            - mjbjr@beaudesign.com -

    PGP Public Key ID: 0xCED9BD8A  Key Server: http://www.keyserver.net/en/

Re: can't re-start postgresql

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
mjbjr@beaudesign.com writes:
> [postgres@localhost postgres]$ ipcrm shm 4224672
> shmctl : Identifier removed

> [postgres@localhost postgres]$ ipcs -m 4224672

> ((returns a ton of addr info))

The old postmaster may be gone, but what about child backends?  I don't
think the shm segment will go away as long as any process holds it open.

Another theory is that you're misinvoking either ipcrm or ipcs.  I know
the syntaxes you illustrate above don't work on my system ...

			regards, tom lane

7.1.2 packaging

От:
"Tim Mickol" <tmickol@combimatrix.com>
Дата:

any word on 7.1.2 in RPM or SRPM form?

Re: 7.1.2 packaging

От:
Lamar Owen <lamar.owen@wgcr.org>
Дата:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Saturday 02 June 2001 19:26, Tim Mickol wrote:
> any word on 7.1.2 in RPM or SRPM form?

Yes.  Due to a day job computer barf, I have been delayed in getting these 
built.  I expect to be able to upload things Monday, possibly as early as 
tonight -- but don't hold your breath.

Suffice to say that a hard drive upgrade for our music-on-hard-drive system 
here didn't go very well.  Ends up I have a bad brand-new Maxtor 60GB drive.  
Bought two -- one works great, the other doesn't even identify.  But figuring 
out that it was the 60 and not a BIOS limitation, or compatibility problem 
with the twin 30GB drives already in the unit, wasn't easy. And the clamshell 
case design has my ire worked up -- which doesn't leave me with the best 
RPM-ing capacity.  Oh well, at least the other machine with its twin 30's and 
the new 60 copied across properly and is on the air -- after a motherboard 
upgrade, no less (Abit KT7Aw/ Athlon 1.2... :-)).

My apologies -- it was my intention to build and release RPMs today while the 
contents of the older 27 GB Maxtor copied to the new 60.  Even with ATA-66 on 
the motherboard, 26+GB of wav files take awhile to copy!
- --
Lamar Owen
WGCR Internet Radio
1 Peter 4:11
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE7GYEW5kGGI8vV9eERAmUYAKCa8f31DtHAojOMO9XE8brqoCBCegCg26H8
dU0J8qmf+GV/o+1xdrtb+AE=
=GSsO
-----END PGP SIGNATURE-----

Re: 7.1.2 packaging

От:
teg@redhat.com (Trond Eivind Glomsrød)
Дата:
"Tim Mickol"  writes:

> any word on 7.1.2 in RPM or SRPM form?

An SRPM can be found at http://people.redhat.com/teg/pg/

-- 
Trond Eivind Glomsrød
Red Hat, Inc.

PostgreSQL: Elephant book TOC

От:
<pgsql-general@commandprompt.com>
Дата:
Hello,

I have released a preliminary TOC for everyone. It is not complete, but
what you see in the TOC is what has been written to date. There is a link
on the front page of http://www.opendocspublishing.com/

Joshua Drake

Re: 7.1.2 packaging

От:
Lamar Owen <lamar.owen@wgcr.org>
Дата:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sunday 03 June 2001 13:05, Trond Eivind Glomsrød wrote:
> "Tim Mickol"  writes:
> > any word on 7.1.2 in RPM or SRPM form?

> An SRPM can be found at http://people.redhat.com/teg/pg/

NOTE:
While Trond's SRPM is very good (and will be used for pieces in the PGDG SRPM 
release), do note that Trond's scripts and spec file both use features of 
latest RedHat releases, which my RPM's may or may not use.

IOW, Trond's RPMset is in actuality _Red_Hat's_ Official RPM set -- just a 
note in case you have an older Red Hat box (6.x, for instance), or an older 
version of RPM (less than 4.0.2, or maybe .3), or a non-Red Hat distribution.

Note also that Trond and I synchronize our sets periodically.

My set is more generic, and will work on older distributions.

But if you have Red Hat 7.x, this set should work very well indeed.
- --
Lamar Owen
WGCR Internet Radio
1 Peter 4:11
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE7G6Bb5kGGI8vV9eERAs8JAKCG5kWwXYj2HPY5kUbStjbT9UjBNgCgp9Kg
zGBwnzLcPWpEMUwzA7sp3As=
=hJC4
-----END PGP SIGNATURE-----

Re: 7.1.2 packaging

От:
teg@redhat.com (Trond Eivind Glomsrød)
Дата:
Lamar Owen  writes:

> On Sunday 03 June 2001 13:05, Trond Eivind Glomsrød wrote:
> > "Tim Mickol"  writes:
> > > any word on 7.1.2 in RPM or SRPM form?
> 
> > An SRPM can be found at http://people.redhat.com/teg/pg/
> 
> NOTE:
> While Trond's SRPM is very good (and will be used for pieces in the PGDG SRPM 
> release), do note that Trond's scripts and spec file both use features of 
> latest RedHat releases, which my RPM's may or may not use.

There shouldn't bee much there which is Red Hat specific...
There is comments on the top of the file which break some early
versions of rpm v3 (newer versions of RPM should be run on all
supported versions of Red Hat Linux anyway). Other than that,
reference to Red Hat specific files (like /etc/sysconfig/i18n) are
conditional. 


-- 
Trond Eivind Glomsrød
Red Hat, Inc.

Re: 7.1.2 packaging

От:
Lamar Owen <lamar.owen@wgcr.org>
Дата:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Monday 04 June 2001 10:56, Trond Eivind Glomsrød wrote:
> Lamar Owen  writes:
> > On Sunday 03 June 2001 13:05, Trond Eivind Glomsrød wrote:
> > > "Tim Mickol"  writes:
> > > > any word on 7.1.2 in RPM or SRPM form?
> > > An SRPM can be found at http://people.redhat.com/teg/pg/

> > NOTE:
> > While Trond's SRPM is very good (and will be used for pieces in the PGDG
> > SRPM release), do note that Trond's scripts and spec file both use
> > features of latest RedHat releases, which my RPM's may or may not use.

> There shouldn't bee much there which is Red Hat specific...
> There is comments on the top of the file which break some early
> versions of rpm v3 (newer versions of RPM should be run on all
> supported versions of Red Hat Linux anyway). Other than that,
> reference to Red Hat specific files (like /etc/sysconfig/i18n) are
> conditional.

In the initscript the use of gettext()?  The use of the Red Hat init 
functions success and kin?  (I _know_ some versions of TurboLinux don't 
support those functions -- yet the RPM will build and run successfully on 
TurboLinux otherwise.) 

At one point the spec file wouldn't build to completion on Red Hat 6.1 -- 
which, at the time, I was supporting, due to the use of a libtool fileset 
that didn't exist in 6.1. While I know, understand, and agree that you don't 
need to support older Red Hat releases in the RPMset, I feel rather strongly 
that the 'generic' RPMset should support as many RPM-based platforms as is 
possible -- that is, if PostgreSQL builds and runs, then the RPMset should 
build and run.  At least that is my goal -- which means I may very well have 
cruft in there that the latest RPM fixes -- and I may have to deal with older 
RPM versions.  This is one area our goals differ -- and that's OK.

If I still had a development platform running Red Hat 5.2, I'd be making sure 
that is built there as well.
- --
Lamar Owen
WGCR Internet Radio
1 Peter 4:11
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE7G6RJ5kGGI8vV9eERAtUQAJ47SI1H+S/uHi2jVpgHmBGnbiU1vwCfZBUO
SwV+MfpI+aux+cm960bZA84=
=pUZo
-----END PGP SIGNATURE-----

use of Function

От:
Uro Gruber <uros@sir-mag.com>
Дата:
Hi!

Here is my problem.

I  have  one  table  with  some data and i want to make some
function.

This  function  must  do  some  data  reordering  and delete
something and then return some data.

I make almost everything exept returning data. I want return
five filelds of row and not just text.

I call this function like

SELECT myfunction(argument)

and  when  i call this it delete some data, then i calculate
some  values  and  update  it.  And  then  i  want  outpu to
something like this.

Id      |   date    |  name    | status
00304   |  24.06.01 | mike     |  new

CREATE function myfunction(string) RETURNS text
                                           ^^^^
                                           how  can  i  tell
here  to  return  like  int,datetime,varchar,varchar.  Is it
possible to use return SET or something.

Now  i  have  solution like function return me id and then i
use normal select to get this data. But i would like to have
only one function to do this.

Any sugestions.


thanks, Uros

Re: 7.1.2 packaging

От:
teg@redhat.com (Trond Eivind Glomsrød)
Дата:
Lamar Owen  writes:

> On Monday 04 June 2001 10:56, Trond Eivind Glomsrød wrote:
> > Lamar Owen  writes:
> > > On Sunday 03 June 2001 13:05, Trond Eivind Glomsrød wrote:
> > > > "Tim Mickol"  writes:
> > > > > any word on 7.1.2 in RPM or SRPM form?
> > > > An SRPM can be found at http://people.redhat.com/teg/pg/
> 
> > > NOTE:
> > > While Trond's SRPM is very good (and will be used for pieces in the PGDG
> > > SRPM release), do note that Trond's scripts and spec file both use
> > > features of latest RedHat releases, which my RPM's may or may not use.
> 
> > There shouldn't bee much there which is Red Hat specific...
> > There is comments on the top of the file which break some early
> > versions of rpm v3 (newer versions of RPM should be run on all
> > supported versions of Red Hat Linux anyway). Other than that,
> > reference to Red Hat specific files (like /etc/sysconfig/i18n) are
> > conditional.
> 
> In the initscript the use of gettext()?  

This isn't called directly.

> The use of the Red Hat init functions success and kin? 

OK, these can be found on more than Red Hat Linux. There are also some
attempts at workarounds for other distributions.

> At one point the spec file wouldn't build to completion on Red Hat 6.1 -- 
> which, at the time, I was supporting, due to the use of a libtool fileset 
> that didn't exist in 6.1.

This has been fixed...

-- 
Trond Eivind Glomsrød
Red Hat, Inc.

Re: 7.1.2 packaging

От:
Lamar Owen <lamar.owen@wgcr.org>
Дата:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Monday 04 June 2001 11:27, Trond Eivind Glomsrød wrote:
> Lamar Owen  writes:
> > The use of the Red Hat init functions success and kin?

> OK, these can be found on more than Red Hat Linux. There are also some
> attempts at workarounds for other distributions.

Which I wrote :-)

In any case, it's not my intent to make your set look negative -- on the 
contrary -- you are specifically building for the latest-greatest Red Hat, 
which is a Good Thing.  But, it is possible for your excellent late-model set 
to not plugin so easy on older-model Linux, Red Hat or not.  And I try to be 
agnostic regarding the dist my set is plugged in to.  You have the 'luxury' 
of only targeting one distribution :-). Not to belittle your work, as you 
take care of more than just PostgreSQL in the dist.
- --
Lamar Owen
WGCR Internet Radio
1 Peter 4:11
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE7G7sn5kGGI8vV9eERAvawAKDAS8641OEoNgX+KNDQfNaVFTddPACfXZFW
6hjAkG9EFUObuYNfWhW3rQM=
=UI6W
-----END PGP SIGNATURE-----

Re: can't re-start postgresql

От:
Rene Pijlman <rpijlman@spamcop.net>
Дата:
mjbjr@beaudesign.com schreef:
>i get the same postgresql startup error(s).

What are the startup errors?

-- 
Vriendelijke groet,
René Pijlman 

Wat wil jij leren?
http://www.leren.nl/
FAQ