Goldfish (Carassius auratus) are freshwater fish species, and as many other teleosts they have an indeterminate growth. This means that they grow throughout their lives until they die. As a freshwater species they actually do not live in the sea, however they can be introduced into estuaries and recent studies have shown that they can be found in coastal rivers with salinities as high as 17 psu:
Their growth in tanks and other enclosures is more related to water quality that to space, but as their size increases maintaining good water quality becomes problematic in small spaces so indirectly space does have an effect. Here is a recent paper that suggests that in some teleosts space may actually be a factor of its own: