|
8 | 8 | *
|
9 | 9 | *
|
10 | 10 | * IDENTIFICATION
|
11 |
| - * $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipc.c,v 1.70 2001/10/0118:16:26 tgl Exp $ |
| 11 | + * $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipc.c,v 1.71 2001/10/0123:26:55 tgl Exp $ |
12 | 12 | *
|
13 | 13 | * NOTES
|
14 | 14 | *
|
@@ -299,12 +299,18 @@ InternalIpcSemaphoreCreate(IpcSemaphoreKey semKey,
|
299 | 299 |
|
300 | 300 | if (errno==ENOSPC)
|
301 | 301 | fprintf(stderr,
|
302 |
| -"\nThis error does *not* mean that you have run out of disk space.\n\n" |
303 |
| -"It occurs because either the system limit for the maximum number of\n" |
| 302 | +"\nThis error does *not* mean that you have run out of disk space.\n" |
| 303 | +"\n" |
| 304 | +"It occurs when either the system limit for the maximum number of\n" |
304 | 305 | "semaphore sets (SEMMNI), or the system wide maximum number of\n"
|
305 | 306 | "semaphores (SEMMNS), would be exceeded. You need to raise the\n"
|
306 |
| -"respective kernel parameter. Look into the PostgreSQL documentation\n" |
307 |
| -"for details.\n\n"); |
| 307 | +"respective kernel parameter. Alternatively, reduce PostgreSQL's\n" |
| 308 | +"consumption of semaphores by reducing its max_connections parameter\n" |
| 309 | +"(currently %d).\n" |
| 310 | +"\n" |
| 311 | +"The PostgreSQL Administrator's Guide contains more information about\n" |
| 312 | +"configuring your system for PostgreSQL.\n\n", |
| 313 | +MaxBackends); |
308 | 314 |
|
309 | 315 | proc_exit(1);
|
310 | 316 | }
|
@@ -583,27 +589,48 @@ InternalIpcMemoryCreate(IpcMemoryKey memKey, uint32 size, int permission)
|
583 | 589 |
|
584 | 590 | if (errno==EINVAL)
|
585 | 591 | fprintf(stderr,
|
586 |
| -"\nThis error can be caused by one of three things:\n\n" |
587 |
| -"1. The maximum size for shared memory segments on your system was\n" |
588 |
| -" exceeded. You need to raise the SHMMAX parameter in your kernel\n" |
589 |
| -" to be at least %u bytes.\n\n" |
590 |
| -"2. The requested shared memory segment was too small for your system.\n" |
591 |
| -" You need to lower the SHMMIN parameter in your kernel.\n\n" |
592 |
| -"3. The requested shared memory segment already exists but is of the\n" |
593 |
| -" wrong size. This can occur if some other application on your system\n" |
594 |
| -" is also using shared memory.\n\n" |
| 592 | +"\nThis error usually means that PostgreSQL's request for a shared memory\n" |
| 593 | +"segment exceeded your kernel's SHMMAX parameter. You can either\n" |
| 594 | +"reduce the request size or reconfigure the kernel with larger SHMMAX.\n" |
| 595 | +"To reduce the request size (currently %u bytes), reduce\n" |
| 596 | +"PostgreSQL's shared_buffers parameter (currently %d) and/or\n" |
| 597 | +"its max_connections parameter (currently %d).\n" |
| 598 | +"\n" |
| 599 | +"If the request size is already small, it's possible that it is less than\n" |
| 600 | +"your kernel's SHMMIN parameter, in which case raising the request size or\n" |
| 601 | +"reconfiguring SHMMIN is called for.\n" |
| 602 | +"\n" |
595 | 603 | "The PostgreSQL Administrator's Guide contains more information about\n"
|
596 | 604 | "shared memory configuration.\n\n",
|
597 |
| -size); |
| 605 | +size,NBuffers,MaxBackends); |
| 606 | + |
| 607 | +elseif (errno==ENOMEM) |
| 608 | +fprintf(stderr, |
| 609 | +"\nThis error usually means that PostgreSQL's request for a shared\n" |
| 610 | +"memory segment exceeded available memory or swap space.\n" |
| 611 | +"To reduce the request size (currently %u bytes), reduce\n" |
| 612 | +"PostgreSQL's shared_buffers parameter (currently %d) and/or\n" |
| 613 | +"its max_connections parameter (currently %d).\n" |
| 614 | +"\n" |
| 615 | +"The PostgreSQL Administrator's Guide contains more information about\n" |
| 616 | +"shared memory configuration.\n\n", |
| 617 | +size,NBuffers,MaxBackends); |
598 | 618 |
|
599 | 619 | elseif (errno==ENOSPC)
|
600 | 620 | fprintf(stderr,
|
601 |
| -"\nThis error does *not* mean that you have run out of disk space.\n\n" |
602 |
| -"It occurs either if all available shared memory ids have been taken,\n" |
| 621 | +"\nThis error does *not* mean that you have run out of disk space.\n" |
| 622 | +"\n" |
| 623 | +"It occurs either if all available shared memory IDs have been taken,\n" |
603 | 624 | "in which case you need to raise the SHMMNI parameter in your kernel,\n"
|
604 | 625 | "or because the system's overall limit for shared memory has been\n"
|
605 |
| -"reached. The PostgreSQL Administrator's Guide contains more\n" |
606 |
| -"information about shared memory configuration.\n\n"); |
| 626 | +"reached. If you cannot increase the shared memory limit,\n" |
| 627 | +"reduce PostgreSQL's shared memory request (currently %u bytes),\n" |
| 628 | +"by reducing its shared_buffers parameter (currently %d) and/or\n" |
| 629 | +"its max_connections parameter (currently %d).\n" |
| 630 | +"\n" |
| 631 | +"The PostgreSQL Administrator's Guide contains more information about\n" |
| 632 | +"shared memory configuration.\n\n", |
| 633 | +size,NBuffers,MaxBackends); |
607 | 634 |
|
608 | 635 | proc_exit(1);
|
609 | 636 | }
|
|