Shared Memory explanation/little bug?

From: Oli Sennhauser <oli(dot)sennhauser(at)bluewin(dot)ch>
To: pgsql-admin(at)postgresql(dot)org
Subject: Shared Memory explanation/little bug?
Date: 2003-12-19 09:23:48
Message-ID: 3FE2C3A4.3060007@bluewin.ch
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hello admins

To days ago I saw that one of my database clusters crashed. I was
looking into the log file and found the following:

2003-12-17 17:42:19 FATAL: pre-existing shared memory block (key
5432001, ID 797966336) is still in use
HINT: If you're sure there are no old server processes still running,
remove the shared memory block with the command "ipcrm", or just delete
the file "/u00/app/pgsql/admin/CLUSTER2/postmaster.pid".

Because I am courious I wanted to know a little more about shared
memories. And I was looking for the problem. I did not find the problem
causing block (see below, probably it was already removed) but two
things were remarkable:

1.) ipcs shows the keys in hex but the alert log in dec:
key 5432001 --> 0x0052E2C1

2.) The ID looked a little strange:
797966336 --> 0x2F900000 (0x2F90 = 12176)

Before I post an enhancment request/bug I would like to know you opinion:

1.) Would it be worth to have the output in hex (also).
2.) Is item 2 a bug or did I not understand something?

Thanks for feedback
Oli

------------------------------------------------------------

postgres(at)master:/u00/app/pgsql - rdbms740/template0> ipcs

------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x0052e6a9 262144 postgres 600 10436608 1
0x0052fa31 294913 postgres 600 10436608 1
0x0052f649 327682 postgres 600 1466368 1
0x0052ee79 360451 postgres 600 1466368 3
0x0052f261 393220 postgres 600 1466368 3

------ Semaphore Arrays --------
key semid owner perms nsems
0x0052e6a9 0 postgres 600 17
0x0052e6aa 32769 postgres 600 17
0x0052e6ab 65538 postgres 600 17
0x0052e6ac 98307 postgres 600 17
0x0052e6ad 131076 postgres 600 17
0x0052e6ae 163845 postgres 600 17
0x0052e6af 196614 postgres 600 17
0x0052fa31 229383 postgres 600 17
0x0052fa32 262152 postgres 600 17
0x0052fa33 294921 postgres 600 17
0x0052fa34 327690 postgres 600 17
0x0052fa35 360459 postgres 600 17
0x0052fa36 393228 postgres 600 17
0x0052fa37 425997 postgres 600 17
0x0052f649 458766 postgres 600 17
0x0052f64a 491535 postgres 600 17
0x0052f64b 524304 postgres 600 17
0x0052ee79 557073 postgres 600 17
0x0052ee7a 589842 postgres 600 17
0x0052ee7b 622611 postgres 600 17
0x0052f261 655380 postgres 600 17
0x0052f262 688149 postgres 600 17
0x0052f263 720918 postgres 600 17

------ Message Queues --------
key msqid owner perms used-bytes messages

-------------------------------------------------------

Oli Sennhauser
Database-Engineer (Oracle & PostgreSQL)
Rebenweg 6
CH - 8610 Uster / Switzerland

Phone (+41) 1 940 24 82 or Mobile (+41) 79 450 49 14
e-Mail oli(dot)sennhauser(at)bluewin(dot)ch
Website http://mypage.bluewin.ch/shinguz/PostgreSQL/

Secure (signed/encrypted) e-Mail with a Free Personal SwissSign ID: http://www.swisssign.ch

Import the SwissSign Root Certificate: http://swisssign.net/cgi-bin/trust/import

Browse pgsql-admin by date

  From Date Subject
Next Message scott.marlowe 2003-12-19 17:10:27 Re: Help needed Please !!!!!incremental backups possible in
Previous Message Terry Hampton 2003-12-18 21:47:55 Re: [Fwd: Quick Question Please]