Re: URGENET: ALTER statement exectuation hangs when it is executed multiple time on a table
В списке pgsql-interfaces по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: URGENET: ALTER statement exectuation hangs when it is executed multiple time on a table |
| Дата | |
| Msg-id | 20042.1200013798@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | URGENET: ALTER statement exectuation hangs when it is executed multiple time on a table (Dennis Wang <dennis_02_2002@hotmail.com>) |
| Список | pgsql-interfaces |
Dennis Wang <dennis_02_2002@hotmail.com> writes:
> The actual PostgreSQL commands are:
> ALTER TABLE warngrid ALTER COLUMN id SET DEFAULT (nextval('warngrid_seq')* 10)+1;
> COPY warngrid FROM 'warngrid.csv' CSV HEADER;
> ALTER TABLE warngrid ALTER COLUMN id DROP DEFAULT;
> For the first time, these operation execute fine. Then I do these steps:
> 4. delete all the records in the table
> 5. rerun the shell script to copy records.
> Then, the ALTER statement in step 1 hanging there.
Did you do all this in one database session, or more than one? If the
latter, maybe you haven't committed the transaction that did the DELETE?
> I did check the lock state of the warngrid table, it says the process created by the ALTER statement hold an
"AccessExclusiveLock"on the table.
Did it actually *have* that lock, or was it waiting for it (granted = f
in pg_locks)?
regards, tom lane
В списке pgsql-interfaces по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера