You're making this much harder than it is. First, a relay is not needed, and in fact using a relay can cause a momentary power loss and some glitches as the contacts switch. Second, you do not need to use a 3V transformer. Using a 3.3V DC regulator will allow input of up to 25VDC to the regulator. This means a 5:1 step down transformer will suffice (assuming 120VAC). This transformer will be much more common, but you are still going to be hard pressed to find one that will fit into a 1 cubic inch gadget (was your size choice arbitrary?). Also, note that the battery does not have to "charge". In fact, trying to charge a lithium 2032 button cell, may cause it to explode. Besides, a nonchargeable backup battery is even easier to implement anyway.
Here is the basic circuit you are looking for. Note that a regulator can be chosen for battery backup circuits that prevents back flow from the battery thru the regulator. Diode D2 prevents the battery from charging while under power, but allows the circuit to instantly switch to battery power when AC is removed. Keep in mind that silicon diodes drop approx 0.7V so a 3V battery would supply 2.3V to the load. If this is insufficient then using more than 1 battery and different voltage regulator can be utilized. It depends on how voltage critical your circuit is and/or needs to be? Remember the design steps I outlined earlier. Voltages and dimensions are chosen based on real requirements, and not simply because you would like it to be that way.