pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
error I don't understand
8+ messages / 5 participants
[nested] [flat]

* error I don't understand
@ 2022-07-27 15:35  Scott Ribe <scott_ribe@elevated-dev.com>
  0 siblings, 2 replies; 8+ messages in thread

From: Scott Ribe @ 2022-07-27 15:35 UTC (permalink / raw)
  To: Pgsql-admin <pgsql-admin@lists.postgresql.org>

could not open shared memory segment "/PostgreSQL.3631378696": No such file or directory

Context is in parallel workers. Does this just mean that I don't have enough shmem allocated for the PG config that I set up?

--
Scott Ribe
scott_ribe@elevated-dev.com
https://www.linkedin.com/in/scottribe/








^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: error I don't understand
@ 2022-07-27 16:05  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Scott Ribe <scott_ribe@elevated-dev.com>
  1 sibling, 0 replies; 8+ messages in thread

From: Tom Lane @ 2022-07-27 16:05 UTC (permalink / raw)
  To: Scott Ribe <scott_ribe@elevated-dev.com>; +Cc: Pgsql-admin <pgsql-admin@lists.postgresql.org>

Scott Ribe <scott_ribe@elevated-dev.com> writes:
> could not open shared memory segment "/PostgreSQL.3631378696": No such file or directory

That looks like cascading failure from some earlier problem.  Is there
really no other nearby complaint in your log?

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: error I don't understand
@ 2022-07-27 17:30  Ian Lawrence Barwick <barwick@gmail.com>
  parent: Scott Ribe <scott_ribe@elevated-dev.com>
  1 sibling, 2 replies; 8+ messages in thread

From: Ian Lawrence Barwick @ 2022-07-27 17:30 UTC (permalink / raw)
  To: Scott Ribe <scott_ribe@elevated-dev.com>; +Cc: Pgsql-admin <pgsql-admin@lists.postgresql.org>

2022年7月28日(木) 0:35 Scott Ribe <scott_ribe@elevated-dev.com>:
>
> could not open shared memory segment "/PostgreSQL.3631378696": No such file or directory
>
> Context is in parallel workers. Does this just mean that I don't have enough shmem allocated for the PG config that I set up?

If you are using a Systemd-enabled Linux, check that  "RemoveIPC" is
set to "no".

See: https://wiki.postgresql.org/wiki/Systemd

Regards

Ian Barwick


> --
> Scott Ribe
> scott_ribe@elevated-dev.com
> https://www.linkedin.com/in/scottribe/
>
>
>
>
>





^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: error I don't understand
@ 2022-07-27 19:45  MichaelDBA Vitale <michaeldba@sqlexec.com>
  parent: Ian Lawrence Barwick <barwick@gmail.com>
  1 sibling, 0 replies; 8+ messages in thread

From: MichaelDBA Vitale @ 2022-07-27 19:45 UTC (permalink / raw)
  To: Ian Lawrence Barwick <barwick@gmail.com>; Scott Ribe <scott_ribe@elevated-dev.com>; +Cc: Pgsql-admin <pgsql-admin@lists.postgresql.org>

<!doctype html>
<html>
 <head> 
  <meta charset="UTF-8"> 
 </head>
 <body>
  <div>
   I think if the linux user is defined as a system user, then you are OK.&nbsp; It's only when the user is not defined as a system user that these bad side-effects can happen.
  </div> 
  <div class="default-style">
   &nbsp;
  </div> 
  <div class="default-style">
   When creating linux users that work with Postgres, do it like this:
  </div> 
  <div class="default-style">
   adduser -r myuser
  </div> 
  <div class="default-style">
   or
  </div> 
  <div class="default-style">
   useradd -m --system myuser
  </div> 
  <div class="default-style">
   &nbsp;
  </div> 
  <div class="default-style">
   See "systemd RemoveIPC" section in&nbsp;
  </div> 
  <div class="default-style">
   <a href="https://www.postgresql.org/docs/current/kernel-resources.html">https://www.postgresql.org/doc...;
  </div> 
  <div class="default-style">
   &nbsp;
  </div> 
  <div class="default-style">
   &nbsp;
  </div> 
  <div class="default-style">
   Regards,
  </div> 
  <div class="default-style">
   Michael Vitale
  </div> 
  <div class="default-style">
   &nbsp;
  </div> 
  <blockquote type="cite"> 
   <div>
    On 07/27/2022 1:30 PM EDT Ian Lawrence Barwick &lt;<a href="mailto:barwick@gmail.com">barwick@gmail.com</a>&gt; wrote:
   </div> 
   <div>
    &nbsp;
   </div> 
   <div>
    &nbsp;
   </div> 
   <div>
    2022年7月28日(木) 0:35 Scott Ribe &lt;<a href="mailto:scott_ribe@elevated-dev.com">scott_ribe@elevated-dev.com</a>&gt;:
   </div> 
   <div>
    &gt;
   </div> 
   <blockquote type="cite"> 
    <div>
     could not open shared memory segment "/PostgreSQL.3631378696": No such file or directory
    </div> 
   </blockquote> 
   <blockquote type="cite"> 
    <div>
     Context is in parallel workers. Does this just mean that I don't have enough shmem allocated for the PG config that I set up?
    </div> 
   </blockquote> 
   <div>
    If you are using a Systemd-enabled Linux, check that "RemoveIPC" is
   </div> 
   <div>
    set to "no".
   </div> 
   <div>
    &nbsp;
   </div> 
   <div>
    See: <a href="https://wiki.postgresql.org/wiki/Systemd"; target="_blank" rel="noopener">https://wiki.postgresql.org/wiki/Systemd</a;
   </div> 
   <div>
    &nbsp;
   </div> 
   <div>
    Regards
   </div> 
   <div>
    &nbsp;
   </div> 
   <div>
    Ian Barwick
   </div> 
   <div>
    &nbsp;
   </div> 
   <div>
    &nbsp;
   </div> 
   <blockquote type="cite"> 
    <div>
     --
    </div> 
    <div>
     Scott Ribe
    </div> 
    <div>
     <a href="mailto:scott_ribe@elevated-dev.com">scott_ribe@elevated-dev.com</a>
    </div> 
    <div>
     <a href="https://www.linkedin.com/in/scottribe/"; target="_blank" rel="noopener">https://www.linkedin.com/in/scottribe/</a;
    </div> 
   </blockquote> 
   <div>
    &gt;
   </div> 
   <div>
    &gt;
   </div> 
   <div>
    &gt;
   </div> 
   <div>
    &gt;
   </div> 
  </blockquote>
 </body>
</html>





^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: error I don't understand
@ 2022-07-28 03:12  Scott Ribe <scott_ribe@elevated-dev.com>
  parent: Ian Lawrence Barwick <barwick@gmail.com>
  1 sibling, 1 reply; 8+ messages in thread

From: Scott Ribe @ 2022-07-28 03:12 UTC (permalink / raw)
  To: Ian Lawrence Barwick <barwick@gmail.com>; +Cc: Pgsql-admin <pgsql-admin@lists.postgresql.org>

> On Jul 27, 2022, at 11:30 AM, Ian Lawrence Barwick <barwick@gmail.com> wrote:
> 
> If you are using a Systemd-enabled Linux, check that "RemoveIPC" is
> set to "no".

That was the answer. I checked other servers, they had it set. But they are much older OSs (overdue for updates, RSN), different installers.

I have step-by-step notes documenting their installs, no mention of RemoveIPC. So sometime ~6 years ago I ran installers that set that to "no". Then we come to today, Ubuntu 22, and I needed to set it, or use a system user.

Thanks!






^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: error I don't understand
@ 2022-07-28 03:26  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Scott Ribe <scott_ribe@elevated-dev.com>
  0 siblings, 2 replies; 8+ messages in thread

From: Tom Lane @ 2022-07-28 03:26 UTC (permalink / raw)
  To: Scott Ribe <scott_ribe@elevated-dev.com>; +Cc: Ian Lawrence Barwick <barwick@gmail.com>; Pgsql-admin <pgsql-admin@lists.postgresql.org>

Scott Ribe <scott_ribe@elevated-dev.com> writes:
> On Jul 27, 2022, at 11:30 AM, Ian Lawrence Barwick <barwick@gmail.com> wrote:
>> If you are using a Systemd-enabled Linux, check that "RemoveIPC" is
>> set to "no".

> That was the answer. I checked other servers, they had it set. But they are much older OSs (overdue for updates, RSN), different installers.

I looked at this on my own machines and was interested to find that
RHEL8 defaults it to "no", although the upstream default is evidently
"yes" and Fedora follows that.  Not sure what to make of that,
except that OS-vendor opinion isn't universal that this is a great
idea.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: error I don't understand
@ 2022-07-28 03:29  Scott Ribe <scott_ribe@elevated-dev.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 0 replies; 8+ messages in thread

From: Scott Ribe @ 2022-07-28 03:29 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Ian Lawrence Barwick <barwick@gmail.com>; Pgsql-admin <pgsql-admin@lists.postgresql.org>

> On Jul 27, 2022, at 9:26 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> 
> ...OS-vendor opinion isn't universal that this is a great
> idea.

And I think that Canonical's opinion changed somewhere along the line





^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: error I don't understand
@ 2022-07-28 09:26  raf <raf@raf.org>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 0 replies; 8+ messages in thread

From: raf @ 2022-07-28 09:26 UTC (permalink / raw)
  To: pgsql-admin@lists.postgresql.org

On Wed, Jul 27, 2022 at 11:26:44PM -0400, Tom Lane <tgl@sss.pgh.pa.us> wrote:

> Scott Ribe <scott_ribe@elevated-dev.com> writes:
> > On Jul 27, 2022, at 11:30 AM, Ian Lawrence Barwick <barwick@gmail.com> wrote:
> >> If you are using a Systemd-enabled Linux, check that "RemoveIPC" is
> >> set to "no".
> 
> > That was the answer. I checked other servers, they had it set. But they are much older OSs (overdue for updates, RSN), different installers.
> 
> I looked at this on my own machines and was interested to find that
> RHEL8 defaults it to "no", although the upstream default is evidently
> "yes" and Fedora follows that.  Not sure what to make of that,
> except that OS-vendor opinion isn't universal that this is a great
> idea.
> 
> 			regards, tom lane

It is not a great idea. On Debian, I had a postgres user cronjob,
and occasionally, systemd in its infinite wisdom would decide
that the end of the cronjob meant that the postgres user had
logged out and needed to have its IPC resources deleted, even
though the IPC resources in question were created by a different
long-running postgres user "session" that was still running
(i.e., the database server). The consequence was error messages
from the database claiming that the database was corrupt. Very
scary. It wasn't corrupt. It just needed systemd to stop deleting
its stuff.

cheers,
raf






^ permalink  raw  reply  [nested|flat] 8+ messages in thread


end of thread, other threads:[~2022-07-28 09:26 UTC | newest]

Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-07-27 15:35 error I don't understand Scott Ribe <scott_ribe@elevated-dev.com>
2022-07-27 16:05 ` Tom Lane <tgl@sss.pgh.pa.us>
2022-07-27 17:30 ` Ian Lawrence Barwick <barwick@gmail.com>
2022-07-27 19:45   ` MichaelDBA Vitale <michaeldba@sqlexec.com>
2022-07-28 03:12   ` Scott Ribe <scott_ribe@elevated-dev.com>
2022-07-28 03:26     ` Tom Lane <tgl@sss.pgh.pa.us>
2022-07-28 03:29       ` Scott Ribe <scott_ribe@elevated-dev.com>
2022-07-28 09:26       ` raf <raf@raf.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox