From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Rod Taylor <rbt(at)rbt(dot)ca> |
Cc: | PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: [HACKERS] Anyone want to assist with the translation of the |
Date: | 2002-10-03 03:32:40 |
Message-ID: | 1239.1033615960@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-announce pgsql-general pgsql-hackers pgsql-patches |
Rod Taylor <rbt(at)rbt(dot)ca> writes:
> /* Call CreateComments() to create/drop the comments */
> CreateComments(ruleoid, classoid, 0, comment);
> +
> + heap_close(relation, AccessShareLock);
> }
>
> /*
Ooops.
I think though that this should read
+ heap_close(relation, NoLock);
In general, we hold locks on user relations we are modifying until end
of transaction. This is different from the rule for system catalogs
(eg, it's okay to drop the AccessShareLock on pg_rewrite a few lines
above this). The reason for the distinction is that we want to be
sure that the user relation won't get DROPped by someone else before
we've committed our changes. (If someone else did try to drop it in
that interval, they'd not delete the pg_description row we just added,
because they couldn't see it.) On the other hand, system catalogs such
as pg_rewrite are not going to go away, by definition, and so it's okay
to drop their locks early. The only reason we lock system catalogs at
all is to allow VACUUM FULL to nail down exclusive access to a catalog
while it vacuums it.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Francois Suter | 2002-10-03 07:42:38 | Re: Anyone want to assist with the translation of the Advocacy |
Previous Message | Justin Clift | 2002-10-03 01:09:18 | Re: Anyone want to assist with the translation of the Advocacy |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2002-10-03 04:11:48 | Re: Oracle SGA like feature??? |
Previous Message | Jeff Davis | 2002-10-03 03:06:30 | Re: Oracle SGA like feature??? |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2002-10-03 03:52:35 | Re: v7.2.3 - tag'd, packaged ... need it checked ... |
Previous Message | Jeff Davis | 2002-10-03 03:24:13 | Re: FW: Advice: Where could I be of help? |
From | Date | Subject | |
---|---|---|---|
Next Message | Francois Suter | 2002-10-03 07:42:38 | Re: Anyone want to assist with the translation of the Advocacy |
Previous Message | Justin Clift | 2002-10-03 01:09:18 | Re: Anyone want to assist with the translation of the Advocacy |