From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
Cc: | The Hermit Hacker <scrappy(at)hub(dot)org>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: pg_group_name_index corrupt? |
Date: | 2000-05-05 04:52:50 |
Message-ID: | 5086.957502370@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
>> After further looking, I notice that users.c is one of the few places
>> that will drop AccessExclusiveLock at heap_close time rather than
>> holding it till xact commit. I wonder whether this is a bug...
>> it could allow another backend to get in and start vacuuming the file
>> before our updates have committed. I am not sure that vacuum would do
>> the wrong thing in that case, but maybe so. Comments anyone (Vadim?)
>>
>> I also notice that there definitely is a glaring bug there:
>> write_password_file() leaks one kernel file descriptor each time it runs
>> (note the creat() call). Alter enough pg_shadow entries in one session
>> and your backend stops working. I think this is a "must fix" problem
>> --- any objections?
> Please fix both, I think.
I fixed the file descriptor leak, which was pretty simple and easily
checked. After looking at VACUUM I think it will behave reasonably
with a not-yet-committed tuple, so I left that issue alone for now.
My current thought on releasing locks at heap_close time is that it's
probably best to release the lock if and only if your use of the table
was strictly read-only. If you modified the table then your lock
should be held till xact commit. I'm not sure about that rule however.
Any comments?
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2000-05-05 04:55:50 | Re: pg_group_name_index corrupt? |
Previous Message | Bruce Momjian | 2000-05-05 04:51:05 | Re: pg_group_name_index corrupt? |