Re: transactions outside the database...

From: "Keith G(dot) Murphy" <keithmur(at)mindspring(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: transactions outside the database...
Date: 2002-01-31 17:36:21
Message-ID: 3C598095.92DADBF0@mindspring.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2002-01-31 18:29:28 Re: Altering metadata to add inheritance
Previous Message Jim Martinez 2002-01-31 17:35:52 Re: Function to Pivot data