[OpenIndiana-discuss] Moving PG_DATA to nonstandard location?
Alexander Pyhalov
alp at rsu.ru
Sat May 3 08:05:37 UTC 2014
Hi.
I know it can be of little help, but I've checked that these issues
doesn't affect /hipster.
$ pfexec cp -a /var/postgres/9.3/data_64 /var/data_64
$ pfexec svccfg -s svc:/application/database/postgresql_93:default_64bit
svc:/application/database/postgresql_93:default_64bit> setprop
postgresql_93/data = astring: /var/data_64
$ pfexec svcadm refresh
svc:/application/database/postgresql_93:default_64bit
$ svcprop svc:/application/database/postgresql_93:default_64bit |grep
postgresql_93/data
postgresql_93/data astring /var/data_64
$ pfexec svcadm enable
svc:/application/database/postgresql_93:default_64bit
$ svcs svc:/application/database/postgresql_93:default_64bit
STATE STIME FMRI
online 12:00:09
svc:/application/database/postgresql_93:default_64bit
$ ps ax |grep post
25578 ? S 0:00 /usr/postgres/9.3/bin/amd64/postgres -D
/var/data_64
25580 ? S 0:00 /usr/postgres/9.3/bin/amd64/postgres -D
/var/data_64
25581 ? S 0:00 /usr/postgres/9.3/bin/amd64/postgres -D
/var/data_64
25582 ? S 0:00 /usr/postgres/9.3/bin/amd64/postgres -D
/var/data_64
25583 ? S 0:00 /usr/postgres/9.3/bin/amd64/postgres -D
/var/data_64
25584 ? S 0:00 /usr/postgres/9.3/bin/amd64/postgres -D
/var/data_64
25585 ? S 0:00 /usr/postgres/9.3/bin/amd64/postgres -D
/var/data_64
shared buffers is set to 1GB:
template1=# select name,unit,setting from pg_settings where
name='shared_buffers';
name | unit | setting
----------------+------+---------
shared_buffers | 8kB | 131072
template1=# select 8*131072/1024;
?column?
----------
1024
Where is your PostgreSQL coming from ? SFE?
It seems the latest PostgreSQL available from OpenIndiana /dev
repository is 8.4.
Bryan N Iotti писал 03.05.2014 02:37:
> Hi all,
>
> I'm experimenting with Postgres on OI 151a9 and I ran into a curious
> issue.
>
> I'm using the version from the OI pkg repo, 9.2
>
> It works fine as long as I don't try to move the PG_DATA directory
> somewhere else.
>
> Basically, I'd like to move it to another ZFS filesystem to see the
> effects of logbias=latency and take advantage of more IOPS on that
> pool.
>
> I create a zfs filesystem called tank/postgres.
> I change the ownership of the directory to postgres:postgres.
> As the postgres user I run initdb with that dir as target.
> I change the SMF property for postgresql_92/data to that dir.
> I can start the DB manually as postgres, but via SMF it will kill the
> service as 'restarting too quickly'.
> I did a svcadm disable/refresh/enable, tried a reboot... nothing. As
> soon as I change that dir it freaks out and I can't start the service.
>
> Any pointers on that?
>
> Also, I'm using the 64 bit version, but I can't set the shared_memory
> config to more than 512MB or it complains that it overflows size_t,
> even with the default 100 connections.
>
> The machine has 32GB of RAM and I have 18GB at least free.
>
> What could I do to affect that limit?
---
System Administrator of Southern Federal University Computer Center
More information about the OpenIndiana-discuss
mailing list