I TRUNCATEd a table. How do I get the data back?
问题 In my postgesql database, unfortunately I truncate this table mail_group , and the table is delete from the database, how to I get back this table. Kindly help me, waiting for reply. Thanks 回答1: Anyone else in the same situation: immediately stop your database with pg_ctl stop -m immediate (the immediate is important, you need to simulate a crash and prevent a checkpoint) then do not restart it. . If you had concurrent transactions still in progress you might be really lucky and PostgreSQL