I suspect you have a cycle in your data and that query will never terminate. (Note that 52428800kB is 50TB, which is a ratherlarge temporary table.)
pgsql-admin by date:
Соглашаюсь с условиями обработки персональных данных