You are not required to. If you wanted to play it safe, a 1 GB file should be more than sufficient and rarely used.
There is any sense to create 3 GB , 4GB SWAP for instance with 1 GB RAM . Any profits here ?(1% more better work is a profit )
You are better off investing in more physical RAM than a larger SWAP file.
Obviously you can create a swapfile any size you want. If it is not needed, it will just sit there merrily holding zeros. The disk space will simply be wasted.
So the trick is to size your swap large enough for the heaviest operation, which in Discourse should be the rebuild. Check memory usage on a rebuild to see how much is needed.
I think there are studies out there saying that very large swap files will not be useful because the CPU is gonna start thrashing way before that much swap is used.
EDIT: Searching on the net, it is recommended the swap to be no larger than 2 times physical RAM due to declining returns of adding more.
./discourse-setup will now create the swap file, so there is (usually) no reason to do it yourself. If you have a too-small swapfile you should delete it before running