Hi Charlie
The basic principle is that you should not pay so much AVCs that the total projected benefit on retirement at Normal Retirement Age (NRA) from all sources (employer's pension plan, AVCs, any previous pensions) does not exceed certain limits set out by the Revenue.
In broad terms, the maximum pension at NRA is 2/3rds of total pay. The State pension can be ignored. On early retirement, the maximum pension is scaled back on a proportionate basis. For very short service (less than 10 years) a sliding scale applies.
If you retire (whether early or at NRA) and your AVCs are such that Revenue limits are breached, the Revenue can insist that the benefit from your employer's pension plan must be reduced to keep overall benefits within Revenue limits or they can permit a refund of part of your AVC fund, subject to income tax and PRSI. As Alan says, there are no hard and fast rules on when they will permit a refund and each case will be considered on its merits.
Regards
Homer