Skip site navigation (1) Skip section navigation (2)

Re: Contrib -- PostgreSQL shared variables

From: pgsql(at)mohawksoft(dot)com
To: "Rick Gigger" <rick(at)alpinenetworking(dot)com>
Cc: pgsql-patches(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Contrib -- PostgreSQL shared variables
Date: 2004-08-25 21:47:28
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackerspgsql-patches
> LockShared('name');

Hmmm, I thought about that, but it is *WAY* more complicated than it
looks. What if after a "Lock" the process crashes before it can call
"Unlock?" It is this problem that inspired the "add" and "sub" calls.

> pgsql(at)mohawksoft(dot)com wrote:
>> This is a first pass on a simple shared memory variable system for
>> PostgreSQL. I would appriciate anyone interested in this functionality
>> to
>> rip it apart.
>> It basically adds this functionality:
>> SetShared('name', value);
>> GetSharedInt('name');
>> SetSharedText('name);
>> RemovedShared('name');
>> I also added two extra functions that are sort of a kludge, but could be
>> very helpful.
>> AddSharedInt('name', value);
>> SubSharedInt('name', value);
>> These add or subtect the 'value' from the variable and return the
>> result.
>> ------------------------------------------------------------------------
>> ---------------------------(end of broadcast)---------------------------
>> TIP 9: the planner will ignore your desire to choose an index scan if
>> your
>>       joining column's datatypes do not match

In response to

pgsql-hackers by date

Next:From: Greg StarkDate: 2004-08-25 22:18:26
Subject: Re: [COMMITTERS] pgsql-server: Rearrange pg_subtrans
Previous:From: Alvaro HerreraDate: 2004-08-25 21:44:22
Subject: Re: [COMMITTERS] pgsql-server: Rearrange pg_subtrans handling

pgsql-patches by date

Next:From: Ed L.Date: 2004-08-25 22:07:51
Subject: Re: log_line_prefix additions
Previous:From: Thomas HallgrenDate: 2004-08-25 21:42:01
Subject: Re: Contrib -- PostgreSQL shared variables

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group