What was the relationship between Whitebeard and Roger?
They're just friendly rivals. Similar in vein to Shanks and Mihawk.
Knowing Roger (he had a similar personality as Luffy, noted by Rayleigh and Shanks himself) he was free spirited. If there was a Yonko at that time that would be Roger, Whitebeard, and Shiki. The only difference was Roger rose to the top and became Pirate King before his execution.

Being the top dogs during their era, it's without question that they would engage each other in fights against each other but end up settling it with a laugh after the fight. Roger trusts WB and likewise, WB trusts Roger hence the drinking scene.