Germany allows it, but it's taxed in Germany unless a DTA is in place and covers the pensions. Then you could pay taxes on your pension in the country you live instead of Germany which could lead to a reduction in taxes. It's very specific but it could be that Germans who choose to be taxed under the new Thai taxation rule could save a lot of taxes.
Also Germany has like a 'base pension' system every German or immigrant and his family gets, it's around 500 EUR a month + apartment rent + health insurance. As a German you can only receive it if you are living Germany, if you are an immigrant, you just take it and live in your home country.