The Great Wall completely surrounds the Agatean Empire. In Mort we are told that patrolling it is the responsibility of the Heavenly Guard. And Interesting Times tells us that it even extends (metaphorically) to subject islands like Bhangbhangduc and Tingling.
Its main function is not, as claimed, to protect against barbarian invaders. Any barbarian attacker, as Cohen notes, would just make a ladder out of the nearby trees on the beach. No, the Great Wall is to keep people in. It helps the Agatean Empire to keep people under control, for they also claim that all those outside the wall are blood-sucking vampire ghosts...
The wall parodies Roundworld's Great Wall of China, however the Great Wall of China was not designed to keep the Chinese in- it was designed to keep northern attackers out. The Western parallel are the Limes of the Western Roman Empire - a line, but not a continuous one, of forts and fortifications delineating where Rome ended and the barbarian world began. Hadrian's Wall and the lesser-known Antonine Wall in Scotland are a part of this system. It had always been known, or suspected, that any thoughtful Scottish tribesmen would not seek a frontal assault - they'd simply build boats and bypass it, sailing round the ends. (As indeed they did on the collapse of Empire). No, the Roman Limes (think Limits, as in City Limits) served several purposes. They were a visual deterrent to invasion and a strategic system for deploying troops. To people who could think out the implications, they announced to the world that the Empire was done conquering and was now on the defensive, guarding what it had. And crucially, the Limes served to monitor the flow of people and goods seeking to legitimately enter and leave the Empire - it was a system designed for effective control and taxation. Hadrian's Wall might be a better model than the Great Wall?