Abstract: I will review how the five term relation for the Fadeev-Kashaev's quantum dilogarithm arises in the Hall algebra context, and sketch a simple proof. Then I will explain how this proof can be transported to the elliptic Hall algebra situation, where the five term relation implies identities between Macdonald polynomials conjectured by Bergeron and Haiman. This is a joint work with Adriano Garsia.