Обсуждение: pgsql/src/backend/commands (command.c vacuum.c)

Поиск
Список
Период
Сортировка

pgsql/src/backend/commands (command.c vacuum.c)

От
Jan Wieck
Дата:
  Date: Wednesday, July  5, 2000 @ 12:17:41
Author: wieck

Update of /home/projects/pgsql/cvsroot/pgsql/src/backend/commands
     from hub.org:/tmp/cvs-serv21402/backend/commands

Modified Files:
    command.c vacuum.c

-----------------------------  Log Message  -----------------------------

Changed TOAST relations to have relkind RELKIND_TOASTVALUE.

Special handling of TOAST relations during VACUUM. TOAST relations
are vacuumed while the lock on the master table is still active.
The ANALYZE flag doesn't propagate to their vacuuming because the
toaster access routines allways use index access ignoring stats, so
why compute them at all.

Protection of TOAST relations against normal INSERT/UPDATE/DELETE
while offering SELECT for debugging purposes.

Jan


RE: pgsql/src/backend/commands (command.c vacuum.c)

От
"Hiroshi Inoue"
Дата:
> -----Original Message-----
> From: Jan Wieck
> Sent: Thursday, July 06, 2000 1:18 AM
> To: pgsql-committers@postgresql.org
> Subject: [COMMITTERS] pgsql/src/backend/commands (command.c vacuum.c)
>
>
>   Date: Wednesday, July  5, 2000 @ 12:17:41
> Author: wieck
>
> Update of /home/projects/pgsql/cvsroot/pgsql/src/backend/commands
>      from hub.org:/tmp/cvs-serv21402/backend/commands
>
> Modified Files:
>     command.c vacuum.c
>
> -----------------------------  Log Message  -----------------------------
>
> Changed TOAST relations to have relkind RELKIND_TOASTVALUE.
>
> Special handling of TOAST relations during VACUUM. TOAST relations
> are vacuumed while the lock on the master table is still active.
>

It seems very dangerous to me.
When VACUUM of a master table was finished, the transaction is
in already committed state in many cases.

Regards.
Hiroshi Inoue

Re: pgsql/src/backend/commands (command.c vacuum.c)

От
Tom Lane
Дата:
"Hiroshi Inoue" <Inoue@tpf.co.jp> writes:
>> Special handling of TOAST relations during VACUUM. TOAST relations
>> are vacuumed while the lock on the master table is still active.

> It seems very dangerous to me.
> When VACUUM of a master table was finished, the transaction is
> in already committed state in many cases.

I don't see the problem.  If the toast table doesn't get vacuumed,
no real harm is done other than failing to recover space.

            regards, tom lane