Score:1

How do i get PostgreSQL on Open BSD 7.0 to run

pf flag

Trying to start postgresql on openbsd 7.0 but can't seem to get it to work. so far I tried this tutorial and looking around a bit on google. I'm new to OpenBSD.

# rcctl -df start postgresql 
doing _rc_parse_conf
doing _rc_quirks
postgresql_flags empty, using default >-D /var/postgresql/data -w -l /var/postgresql/logfile<
doing rc_check
pg_ctl: no server running
postgresql
doing rc_start
doing _rc_wait start
doing rc_check
pg_ctl: no server running
waiting for server to start.... stopped waiting
pg_ctl: could not start server
Examine the log output.
doing _rc_rm_runfile
(failed)
# ls -al /var/run
total 176
drwxr-xr-x   3 root  wheel      512 Jan 17 01:30 .
drwxr-xr-x  24 root  wheel      512 Jan 16 17:30 ..
srw-rw----   1 root  crontab      0 Jan 16 16:57 cron.sock
-rw-r--r--   1 root  wheel    49152 Jan 16 16:57 dev.db
-rw-r--r--   1 root  wheel     5945 Jan 16 16:57 dmesg.boot
-r--r--r--   1 root  wheel    14592 Jan 16 17:30 ld.so.hints
srw-rw----   1 root  wheel        0 Jan 16 16:57 ntpd.sock
drwxr-xr-x   2 root  wheel      512 Jan 16 18:48 rc.d
srw-rw-rw-   1 root  wheel        0 Jan 16 16:57 smtpd.sock
-rw-r--r--   1 root  wheel        6 Jan 16 16:57 sshd.pid
-rw-r--r--   1 root  wheel        6 Jan 16 16:57 syslog.pid
-rw-rw-r--   1 root  utmp      7296 Jan 18 19:26 utmp

Score:0
cn flag

You just need to complete the following steps in the tutorial to successfully start postgresql:

# mkdir /var/postgresql/data
# chown _postgresql:_postgresql /var/postgresql/data
# su -l _postgresql
$ initdb -D /var/postgresql/data
The files belonging to this database system will be owned by user "_postgresql".
This user must also own the server process.

The database cluster will be initialized with locale "C".
The default database encoding has accordingly been set to "SQL_ASCII".
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /var/postgresql/data ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 20
selecting default shared_buffers ... 128MB
selecting default time zone ... UTC
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok

initdb: warning: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.

Success. You can now start the database server using:

    pg_ctl -D /var/postgresql/data -l logfile start

You can start using the command printed by initdb, but better is to exit the user session and use what the tutorial recommends:

# rcctl start postgresql

Be sure to carefully follow the rest of the tutorial, or postgresql won't start after a reboot.

Score:0
fr flag

After you run pkg_add postgresql-server the system will point you to a package readme that you should read:

New and changed readme(s):
        /usr/local/share/doc/pkg-readmes/postgresql-server

This readme has the remainder of the instructions for getting postgresql up and running on an OpenBSD machine.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.