  Near a quantum-critical point, a metal reveals two competing tendencies:
destruction of fermionic coherence and attraction in one or more pairing
channels. We analyze the competition within Eliashberg theory for a class of
quantum-critical models with an effective dynamical electron-electron
interaction $V(\Omega_m) \propto 1/|\Omega_m|^\gamma$ (the $\gamma$-model) for
$0 < \gamma <1$. We argue that the two tendencies are comparable in strength,
yet the one towards pairing is stronger, and the ground state is a
superconductor. We show, however, that there exist two distinct regimes of
system behavior below the onset temperature of the pairing $T_p$. In the range
$T_{cr} < T < T_p$ fermions remain incoherent and the density of states
$N(\omega)$ displays "gap filling" behavior in which the position of the
maximum in $N(\omega)$ is set by temperature rather than the pairing gap. At
lower $T < T_{cr}$, fermions acquire coherence, and $N(\omega)$ displays a
conventional "gap closing" behavior. We argue that the existence of the two
regimes comes about because of special behavior of fermions with frequencies
$\omega = \pm \pi T$ along the Matsubara axis. Specifically, for these
fermions, the component of the self-energy, which competes with the pairing,
vanishes in the normal state. We further argue that the crossover at $T \sim
T_{cr}$ comes about because Eliashberg equations allow an infinite number of
topologically distinct solutions for the onset temperature of the pairing
within the same gap symmetry. Only one solution, with the highest $T_p$,
actually emerges, but other solutions are generated and modify the form of the
gap function at $T \leq T_{cr}$. Finally, we argue that the actual $T_c$ is
comparable to $T_{cr}$, while at $T_{cr} < T < T_{p}$ phase fluctuations
destroy superconducting long-range order, and the system displays pseudogap
behavior.
