On Thu, Mar 02, 2006 at 06:16:00AM -0800, [EMAIL PROTECTED] wrote:
> > TRUNCATE is another command that takes an access exclusive lock.
>
> The whole SP takes about 10 seconds to run total. The TRUNCATE command
> only takes less than a second. However, the access exclusive lock is
> held through
First of all, thank you very much. I changed TRUNCATE to DELETE FROM
and my problem as been fixed.
Is there any way to override that behavior? I know you can explicitly
lock tables, can you explicitly unlock tables?
Just to be clear, once I run a TRUNCATE command inside an SP, that
table that it
> TRUNCATE is another command that takes an access exclusive lock.
The whole SP takes about 10 seconds to run total. The TRUNCATE command
only takes less than a second. However, the access exclusive lock is
held throughout the entire SP, not just during the execution of the
TRUNCATE command. Sho
No. Here is the offending SP:
CREATE OR REPLACE FUNCTION update_my_cache() RETURNS void AS '
BEGIN
TRUNCATE TABLE my_cache_table;
INSERT INTO my_cache_table SELECT * FROM
get_my_stuff_to_fill_cache_table();
RETURN;
END
' LANGUAGE plpgsql;
I've checked the SP get_my_stuff_to_fill_cache_t
On Fri, Mar 03, 2006 at 08:47:41PM -0600, Jim C. Nasby wrote:
> You have a URL for where in the docs it says that? Sounds like it needs
> to be updated to include TRUNCATE.
http://www.postgresql.org/docs/7.4/static/explicit-locking.html#LOCKING-TABLES
It doesn't say that only the listed commands
You have a URL for where in the docs it says that? Sounds like it needs
to be updated to include TRUNCATE.
On Wed, Mar 01, 2006 at 03:55:26PM -0800, [EMAIL PROTECTED] wrote:
> This may be a newbie question, but according to the 7.4 docs, an ACCESS
> EXCLUSIVE lock is only acquired by the ALTER TAB
On 2006-03-02, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> First of all, thank you very much. I changed TRUNCATE to DELETE FROM
> and my problem as been fixed.
>
> Is there any way to override that behavior? I know you can explicitly
> lock tables, can you explicitly unlock tables?
No.
> Just
On 2006-03-02, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>> TRUNCATE is another command that takes an access exclusive lock.
>
> The whole SP takes about 10 seconds to run total. The TRUNCATE command
> only takes less than a second. However, the access exclusive lock is
> held throughout the e
On 2006-03-02, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> No. Here is the offending SP:
>
> CREATE OR REPLACE FUNCTION update_my_cache() RETURNS void AS '
> BEGIN
>
> TRUNCATE TABLE my_cache_table;
TRUNCATE is another command that takes an access exclusive lock.
--
Andrew, Supernews
http:
[EMAIL PROTECTED] wrote:
> This may be a newbie question, but according to the 7.4 docs, an ACCESS
> EXCLUSIVE lock is only acquired by the ALTER TABLE, DROP TABLE,
> REINDEX, CLUSTER, and VACUUM FULL commands.
>
> However, when viewing pg_locks during the execution of a stored
> procedure that do
This may be a newbie question, but according to the 7.4 docs, an ACCESS
EXCLUSIVE lock is only acquired by the ALTER TABLE, DROP TABLE,
REINDEX, CLUSTER, and VACUUM FULL commands.
However, when viewing pg_locks during the execution of a stored
procedure that does not perform any of the above comma
11 matches
Mail list logo