×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Hello All My database recently shu

Hello All My database recently shu

Hello All My database recently shu

(OP)
Hello All
My database recently shutdown with the foll error. Whats the remedy..I am totally new to PostgreSQL.

NOTICE:  Message from PostgreSQL backend:NOTICE:  Message from PostgreSQL backend:
        The Postmaster has informed me that some other backendThe Postmaster has informed me that some other backend
NOTICE:  Message from PostgreSQL backend:died abnormally and possibly died abnormally and possibly corrupted shared memory.
I have rolled back the current transaction and am going to terminate your database system connection and exit.
Please reconnect to the database system and repeat your query.

DEBUG:  all server processes terminated; reinitializing shared memory and semaphores
IpcMemoryCreate: shmget(key=5432001, size=1441792, 03600) failed: Not enough core

This error usually means that PostgreSQL's request for a shared memory segment exceeded available memory or swap space.To reduce the request size (currently 1441792 bytes), reducePostgreSQL's shared_buffers parameter (currently 64) and/or its max_connections parameter (currently 32).

RE: Hello All My database recently shu

You need to modify the main postgresql.conf file, which is usually at /usr/local/pgsql/data/postgresql.conf.  Just change the parameters mentioned in the error message. If any parameter is not in there, or if it is commented out, that means it is using the default value. Just place or uncomment the parameter in there as "shared_buffers = 32", etc...

What are the specs on your server, by the way?

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

Big Brother: "War is Peace" -- Big Business: "Trust is Suspicion"
(http://www.cl.cam.ac.uk/~rja14/tcpa-faq.html)

RE: Hello All My database recently shu

(OP)
part of my conf file looks like this.

#    Connection Parameters
#
#tcpip_socket = false
#ssl = false

#max_connections = 32

#port = 5432
#hostname_lookup = false
#show_source_port = false

#unix_socket_directory = ''
#unix_socket_group = ''
#unix_socket_permissions = 0777

#virtual_host = ''

#krb_server_keyfile = ''


#
#    Shared Memory Size
#
#shared_buffers = 64        # 2*max_connections, min 16
#max_fsm_relations = 100    # min 10, fsm is free space map
#max_fsm_pages = 10000      # min 1000, fsm is free space map
#max_locks_per_transaction = 64 # min 10
#wal_buffers = 8            # min 4

RE: Hello All My database recently shu

Sorry, I meant RAM, processor, hard drive speed, etc...

Anyway, I will explain the conf file a little more, in case you are unfamiliar with this: Notice that shared_buffers = 64 is commented out with a # at the beginning. When this file is first built by Postgres, it creates each line of configuration, to show you the default values, but leaves them commented out, because defaults don't need a configuration line. Also, there is some more information in an additional comment after many of these directives. You only need an uncommented line if you are changing from the default.

It's always a good idea to preserve the default setting for future reference, so don't uncomment that line; just place another line underneath it:

ΓΏ#shared_buffers = 64        # 2*max_connections, min 16
shared_buffers = 32

Now, the comment afterwards mentions max_connections, saying that shared_buffers should be approx two times that number. So, you might want to add your max_connections line, setting it at 16.

This should take care of your immediate problem, unless there is really some sort of hardware problem on your system.

The reason I am asking for your machine specs is that PostgreSQL defaults to a fairly conservative configuration, so to be forced to reduce these settings even further indicates that you are using a fairly low-powered machine, or that the kernel configuration is not right. PostgreSQL should work fine, even with lower settings than this, but don't expect to run a serious production system with these settings.

Spend some time at http://techdocs.postgresql.org/, which is a treasure trove of information. There are several articles here about performance tuning, which is critical with PostgreSQL, if you really want to use it seriously. (not important for a dev/testing box, but for production). Also, you can get some great info by searching through 5 years of mail support at http://archives.postgresql.org/ or the newsgroups at http://groups.google.com/groups?hl=en&group=comp.databases.postgresql

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

Big Brother: "War is Peace" -- Big Business: "Trust is Suspicion"
(http://www.cl.cam.ac.uk/~rja14/tcpa-faq.html)

RE: Hello All My database recently shu

(OP)
Hello Rycamor
Thanks for the timely help and I have modified my conf file.
My system specs are

windows 2000 service pack3
1GB RAM
2 CPU 1.80GHz
2 33 Gig Hard Disk

Thanks
MP

RE: Hello All My database recently shu

(OP)
Also I run cygwin and could you explain me how to setup a cron job daily at aroound 11.00 PM to take a backup of my database.
pg_dump testdb > backup.dmp

Thanks
MP

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close