runtime queries...

Started by Nonameabout 24 years ago4 messagesgeneral
Jump to latest
#1Noname
David.Lofstrand@surgical-science.com

Hi,

I hope that this is the right forum for this question

I would like to retrieve some runtime information from the postgres server.
I would like to know if I can retrieve the database directory the server is
working with
(meaning: I would like to know what the server's $PGDATA or -D option was
set to on startup)

#2Noname
David.Lofstrand@surgical-science.com
In reply to: Noname (#1)
Re: runtime queries...

since the postgresql can be started without the -D option ($PGDATA)

Show quoted text

Why don't you just grep over the output of a ps command?

Regards,
Haroldo.

#3tomasz konefal
twkonefal@yahoo.ca
In reply to: Noname (#1)
transactions outside the database...

hello,

i'm hoping that someone can help me with a transaction problem i'm stuck
on. i have a little web site which allows (authorized) people to create user
accounts on a FreeBSD box via web interface. i keep track of these user
accounts via postgres database (things like activation
date/status/expiry/quota/billing/etc..) this is implemented in perl using
dbi. i also call a second secure script that creates the system accounts
using a call to 'pw'.

my problem is that i don't know how to guarantee that the account is
created/modified/erased in BOTH the system password database and the postgres
database. i figured that maybe i could reverse one transaction if the other
failed, but what if for some reason i can't reverse a modification to the
system password db? can anyone offer any advice, or pointers on handling
this problem?

thanks,
twkonefal

______________________________________________________________________
Web-hosting solutions for home and business! http://website.yahoo.ca

#4Keith G. Murphy
keithmur@mindspring.com
In reply to: tomasz konefal (#3)
Re: transactions outside the database...

tomasz konefal wrote:

hello,

i'm hoping that someone can help me with a transaction problem i'm stuck
on. i have a little web site which allows (authorized) people to create user
accounts on a FreeBSD box via web interface. i keep track of these user
accounts via postgres database (things like activation
date/status/expiry/quota/billing/etc..) this is implemented in perl using
dbi. i also call a second secure script that creates the system accounts
using a call to 'pw'.

my problem is that i don't know how to guarantee that the account is
created/modified/erased in BOTH the system password database and the postgres
database. i figured that maybe i could reverse one transaction if the other
failed, but what if for some reason i can't reverse a modification to the
system password db? can anyone offer any advice, or pointers on handling
this problem?

If possible, I'd make the database the master copy of all the
information, then check/modify/create the system database against that.
That should also probably be done at system startup, and periodically
after that. Because you can never make changes to both the database and
system password database atomic.