| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | "Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)jp> |
| Cc: | Vadim Mikheev <vadim(at)krs(dot)ru>, pgsql-hackers(at)postgreSQL(dot)org |
| Subject: | Re: [HACKERS] DROP TABLE inside transaction block |
| Date: | 1999-09-07 03:00:55 |
| Message-ID: | 26413.936673255@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
"Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)jp> writes:
>> That's a good point --- we acquire exclusive lock anyway on a table
>> about to be deleted, so just holding that lock till end of transaction
>> should prevent other backends from trying to touch the table.
> That reminds me.
> DROP TABLE doesn't hold exlusive lock till end of transaction.
> UnlockRelation() seems too early.
I wondered about that too --- but I didn't change it because I wasn't
sure it was wrong. Vadim, what do you think?
> Seems ALTER TABLE doesn't acquire any lock for the target
> relation. It's OK ?
None? Yipes. Seems to me it should *definitely* be grabbing
AccessExclusiveLock.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Vadim Mikheev | 1999-09-07 03:09:40 | Re: [HACKERS] DROP TABLE inside transaction block |
| Previous Message | Bruce Momjian | 1999-09-07 02:53:29 | Re: [HACKERS] DROP TABLE inside transaction block |