I grew up on 2E and DM'ed one campaign to the point where most of the characters were levels 7 and 8. I felt like once they reached that point however the XP required to get to level 9 was just a massive amount and prohibitive.
Yes, a rather large amount, but no, not prohibitive. It just took a rather long time.
In 1e and 2e, roughly when you hit 10th level the game was considered more or less over. You'd won, and earned a prolonged and honorable retirement. Sure, you could keep at it until you hit 12th or 13th level, but by that point the challenges that the game could offer you were diminishing. Additionally, the increased power of gaining another level diminished for many classes. You stopped gaining full HD, for example. Fighters capped off most of their abilities around 15th level. After 17th level, most classes saves stopped improved. The game slowed down precisely because there would be increasingly less interesting things to do at very high level. The game was designed to keep you in the sweet spot. Keep in mind that in 1e, monsters were rated on a scale of 1 to 10, with each increased level of a monster corresponding to a deeper level of the dungeon and a higher level PC. Once you hit 10th level, if you had decent equipment most everything in the game was toast. Balrogs just had 8HD, for example. There was a bit of a sliding scale amongst level 10 monsters, and a careful DM could probably keep it going to 15th level or beyond, but after 10th level you were in the Epic tier.
Now, if you wanted to though, you could power level characters up to higher levels just by dumping far more treasure on the party than the treasure types in the Monster Manual called for.
I don't really approve of that approach, because by the time you get to 10th level legitimately, you've probably seen enough dungeons that you are in need of a break from them, and there is so much more you can do in D&D than dungeons. Also, you are powering your way out of the sweet spot, which makes no sense. But, it's there if you want it.
A good example of this is the GDQ adventure path, which is just stuffed to the gills with mounds and mountains of treasure to ensure that by the time you finish a module the party has been power leveled up to deal with the next one. But, again, if you look at GDQ, the initial three 'G' modules were as tough as anything in the rest of the series, and by the time the party got to the Demonweb Pits to kill Lolth(!!!), Lolth and everything else in the dungeon was pretty much a cakewalk for such powerful and well equipped parties - particularly compared to what had come before.
If I remember correctly a PC had to collect something like all the XP he had gained to that point just to get to level 9 or 8.
This was true of every level up till name level. To get to 8th level, you had to collect as much XP again as you had accumulated getting to 7th. It wouldn't generally take quite as long, because you'd earn more XP per fight, but yes, going from 7th to 8th took nearly as much time as getting to 7th and getting to 9th took about as much time as that.
I was just curious how other DMs handled/handle XP and leveling up in 2E when it takes such enormous amounts of XP to level up. Aside from doing automatic level ups after adventures or just giving the PCs tons and tons of treasure or giving them huge mission complete XP rewards how did other DMs handle this?
I joined a group playing a 1e/2e AD&D hybrid, rolled up a 7th level character with just enough XP to hit 7th, and like five years later playing 8 hour sessions 25-30 times a year I hit 12th. It wasn't about the leveling up. Leveling up was great, but it barely happened once a year. You played for the story.