Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8392019
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T19:24:36+00:00 2026-06-09T19:24:36+00:00

There is a problem when I init a PostgreSQL database in a FreeBSD jail.

  • 0

There is a problem when I init a PostgreSQL database in a FreeBSD jail.

I found an article about the problem. I tried its advice but I didn’t have any luck and I don’t know why.
There is the link: PostgreSQL in jail .

I also read the PostgreSQL documentation on kernel resources:

If running in FreeBSD jails by enabling sysctl‘s
security.jail.sysvipc_allowed, postmasters running in different
jails should be run by different operating system users. This improves
security because it prevents non-root users from interfering with
shared memory or semaphores in different jails, and it allows the
PostgreSQL IPC cleanup code to function properly. (In FreeBSD 6.0 and
later the IPC cleanup code does not properly detect processes in
other jails, preventing the running of postmasters on the same port
in different jails.)

What I’ve done:

  • I edited /etc/rc.conf (on the host machine) and added the line jail_sysvipc_allow="YES"
  • In the jail machine’s /etc/sysctl.conf, I add line security.jail.sysvipc_allowed=1

I restarted the jail machine multiple times. I haven’t restarted the host machine and don’t want to.

Hope someone can give me a solution or some advice. Thanks so much.

This is the message when I restart the jail:

 /etc/rc.d/sysctl: WARNING: unable to set security.jail.sysvipc_allowed=1

Or when I run sysctl manually: (on jail)

 root@xxxxx:/home/xxxx# sysctl security.jail.sysvipc_allowed=1
 security.jail.sysvipc_allowed: 0
 sysctl: security.jail.sysvipc_allowed: Operation not permitted

Freebsd version: FreeBSD xxxxxxx 9.1-PRERELEASE FreeBSD 9.1-PRERELEASE

postgreSQL version: postgresql-server-9.1.4

Error Message:

 root@xxxxxx:/home/xxx # /usr/local/etc/rc.d/postgresql initdb
 The files belonging to this database system will be owned by user "pgsql".
 This user must also own the server process.

 The database cluster will be initialized with locale C.
 The default text search configuration will be set to "english".

 creating directory /usr/local/pgsql/data ... ok
 creating subdirectories ... ok
 selecting default max_connections ... 10
 selecting default shared_buffers ... 400kB
 creating configuration files ... ok
 creating template1 database in /usr/local/pgsql/data/base/1 ... FATAL:  could not create      
 shared memory segment: Function not implemented
 DETAIL:  Failed system call was shmget(key=1, size=2146304, 03600).
 child process exited with exit code 1
 initdb: removing data directory "/usr/local/pgsql/data"

Update:

in host machine,
/etc/sysctl.conf: security.jail.sysvipc_allowed=1
/etc/rc.conf : jail_sysvipc_allow=”YES”

In Jail server, there is no extra jail_sysvipc configuration.

sysctl value in host machine:

   root@xxxxx:/home/xxxx# sysctl -a | grep 'sysvipc'
   security.jail.param.allow.sysvipc: 0
   security.jail.sysvipc_allowed: 1

I still get the same error message as I got before.

In additional, I am wondering if there is anything with security.jail.param.allow.sysvipc?
Because, in host machine, I was not allowed to set it. (security.jail.param.allow.sysvipc 0-> 0)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T19:24:38+00:00Added an answer on June 9, 2026 at 7:24 pm

    I found the problem after my teammate’s help.

    Because I use /etc/jail.conf, I have to add a line “allow.sysvipc” to enable system share memory.

    in host machine,

      /etc/sysctl.conf
      security.jail.sysvipc_allowed=1
    
      /etc/rc.conf 
      jail_sysvipc_allow="YES" (DO NOT have to do this, remove it) 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

what's the problem there, I have uploaded this video to server, but now its
Problem: There should be a bunch of rows being inserted into the database via
Okay so I've setup an app which works fine but there's one problem when
I am trying to fire below query... Is there any problem in it? delete
Problem There are data gaps that need to be filled. Would like to avoid
Problem: There are a lot of different databases, which is populated by many different
Is there any problem with my code ? std::vector<int[2]> weights; int weight[2] = {1,2};
is there any problem to install different oracle 11g versions. I mean if I
Is there a problem with this type of implementation to wait for a batch
Is there a problem to using javascript for styling content? My website requires javascript.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.