F.15. fasttrun

The fasttrun module provides transaction unsafe function to truncate temporary tables without growing pg_class size.

This module is required for 1C Enterprise support.

Fast truncate operation is not transactional, so its results cannot be rolled back and become immediately visible in all sessions regardless of isolation level.

F.15.1. Function

There is a function call example:

        select fasttruncate('TABLE_NAME');

F.15.2. Test example

For tests you can use this example:

create or replace function f() returns void as $$
  for i in 1..1000
      PERFORM fasttruncate('tt1');
    end loop;
$$ language plpgsql;

F.15.3. Authors

      Teodor Sigaev