It depends on what is to be pasteurized. If one aims for pasteurizing the surface only, then the shape is more or less unimportant. If however one wants to pasteurize the core, then the shape will affect the times.
To be on the safe size, measure the thickness where the meat is thickest.
Myhrwold writes in http://forums.egullet.org/index.php?/topic/116617-sous-vide-recipes-techniques-equipment-2004-2010/page_st_120_p_982720#entry982720 about cooking times (not pasteurization times):
This is true for any kind of cooking actually. Most of what we are
taught about cooking is actually wrong. For example, anytime somebody
tells you it is “10 minutes per pound” they are saying something that
cannot possibly be accurate, because this would imply that cooking
time is proportional to the weight. If you take something like a whole
bird and scale it up you will find that cooking time is actually
proportional to something like (weight)^(2/3) – weight to the 2/3
power. This is because increasing the weight scales up the thickness
by the cube root. Since most people are not accustomed to taking
things to fractional powers, people substitute a linear relationship.
That might work out OK in practice over a small range, but it can’t be
accurate over a large range. For example, if you double the weight,
the linear relationship would tell you that you double the cooking
time. The 2/3 power would tell you to increase it by 59% - that is a
pretty big difference.
As a general rule of thumb heat diffusion times go as the square of
the thickness increase. So, doubling the thickness results in FOUR
TIMES the cooking time. That is a rough general rule of thumb, which
is not perfect but it illustrates the nonlinearity of the system. I
don’t know why this isn’t taught to chefs more often because it is a
fairly easy thing to grasp and use.
A side note:
If you have an iPad or iPhone then I can recommend SousVideDash. One must enter meat type, shape and size, initial and final temparature. Then graphs are drawn that shows pasteurization times for both surface and core (or more precisely graphs of the reduction of salmonella and listeria).
See the website:
http://www.sousvidedash.com/
This article may be a good starting place for some advice. They consider a lot of the common microbes, not just Salmonella. Assuming you get somewhere close to the 140F range for an extended period of time, you'll kill off most things. Other things might only survive in spore form, so you might be okay eating the food while it's hot.
But care should be taken if you wanted to cool the food and heat at a later time, since a lot of spores means that they could become active again and multiply significantly if left in the so-called "danger zone" for very long. Also, note that during the initial cooking, lots of bacteria will be competing, and the really bad stuff may not have a chance to grow much. But after most are killed at higher temperatures, any cooling phase of the food will allow remaining spores to reactivate in an environment where they don't have to compete as much and thus often grow faster. In many cases, it can sometimes be more dangerous to let cooked food sit at room temperature than to take a long initial time to cook.
Anyhow, the spores are not your concern for a long initial cooking time if you're planning to eat the food right away. In that case, you need to worry about things that will generate persistent toxins. The linked article mentions a couple: C. perfringens and S. aureus.
As the article points out, Clostridium perfringens will be killed in slow cooking by the time you reach 140F. However, they don't seem to explicitly mention the enterotoxin produced by C. perfringens. That toxin can be inactivated by further heating up to 165F, but that may not be desirable for all foods. (That may be the reason why they don't mention the toxin -- they are assuming the turkey and stuffing will be at a minimum of 165F by the end of the roast.) In any case, the article implies that you'd need to cook for roughly 10 hours to produce enough to be dangerous for "normal" C. perfringens. (For the special quick-growing type mentioned in their source, it would grow twice as fast.)
Staphylococcus aureus, on the other hand, clearly would take a long time to grow. They estimate even in ideal conditions, it would take about 15 hours to produce enough toxin to worry about. Also, in raw food, they state that S. aureus typically does not grow much, since it doesn't do well competing against other spoilage microbes (e.g., Salmonella) that grow better but won't produce the same levels of persistent toxins.
For some reason, Bacillus cereus doesn't get a mention in this article (it's more common on grains but small amounts are usually found in meats too), and I think it's a potential concern with some foods. My guess is that again B. cereus usually doesn't compete well against things like Salmonella and Campylobacter. Looking up typical growth rates, it may not be an issue unless you had a high concentration to begin with.
As with other microbes (e.g., C. perfringens, C. botulinum) the more typical cause of food poisoning with B. cereus is the spores that survive after cooking. When food is held for a long time in the "danger zone" (e.g., in buffets below 140F, at room temperature before refrigeration), these bacteria have a chance to revive from their spore form and produce persistent toxins. The particular problem with B. cereus is that normal heating below boiling will not destroy that toxin, making even normal reheated foods a potential danger.
I only mention the spore issue because a higher population of these bacteria (grown during longer cooking) will produce more spores, which can potentially make cooling food down and reheating more dangerous. These bacteria typically don't grow fast when in the presence of things like Salmonella, but in the more sterile growth medium post-cooking, they can really get going. If you slow-cook for a long time, be really sure to handle leftovers properly.
But getting back to the main issue: what if you just plan to eat the food right after slow-cooking? In that case, I think the original article I linked above implies that you're almost certainly safe even if you take up to 10 hours or so with the food between 50F and 130F. Since most of the bacteria that produce persistent toxins don't grow well when competing against things like Salmonella, you're probably safe for even longer. As they point out at the end of the article, food kept even as high as 55-60F will generally "spoil safe," partly due to competition among spoiling agents. However, as you get into the range around 100F in cooking, you hit ideal growth temperatures for some of the more nasty stuff.
Personally, after I researched this stuff a while back, I'm willing to extend the limit to about 10 hours between 50F and 130F for my own cooking, as long as the food is ultimately held above 130F for a significant amount of time. So, slow-roasting a chicken or turkey at 250F should be fine, and even 200F may be okay. With such a slow heating process, though, I'd generally want the final temperature of the food to get to about 165F at a minimum -- to further reduce bacteria count and destroy some toxins. If I intended a lower final temperature (e.g., 140F), I would tend to use a cooking method that gets the food up above 130F more quickly. (Sous vide should do the trick in most cases.)
But I'd really start to get concerned when you go much beyond 10 hours in the "danger zone." Chances are that you might even be okay taking 12-24 hours to get up to temperature in many foods, but it could be very risky for some foods/ingredients. And then, the food must hit a higher temperature standard (at least 165F), which will destroy some potential toxins. Go much more than a day in your cooking in the "danger zone," and you could even be growing significant amounts of botulism toxin, so your safe temp would have to go even higher to destroy that toxin. Also, by that point, you may be growing all sorts of nasty stuff.
Whatever you do, don't follow the advice of self-proclaimed experts like the authors of Modernist Cuisine, who want to throw out all of the USDA regulations and rebuild a theory of food safety from scratch, apparently based on the authors' reading of only a couple papers on Salmonella death curves. Salmonella death curves may be a good guideline for normal cooking methods and sous vide, but with extended slow cooking that allows a long time below 130F, you can grow all sorts of stuff that leaves behind persistent toxins.
In sum, I think the 4 hour "danger zone" thing is a rough guideline with a built-in safety margin (for people who leave the meat in the car for 45 minutes, etc.). With proper food handling otherwise, in most cases, you should be able to push it to 8 or 10 hours with little chance of harm. But the longer you go, the more potential hazards. Do it at your own risk.
(Please note that although I have a lot of scientific training, I'm not a microbiologist, so there may be things I'm overlooking here.)
Best Answer
Specifically for custard, you pretty much want the known good time from your recipe, but cooking longer will be fine.
In general, there are two major things:
The time to reach the desired temperature is pretty much just determined by size/shape. If there's a point in the middle that's 5cm from the closest surface, whether it's a 10cm diameter sphere or a 10cm thick slab, it's going to take longer. (The two aren't exactly the same in terms of heat propagation, but it's a good rough way to think about it.) I'm guessing liquids like your custard base also cook a little faster than solids, since there can be a little bit of convection flow inside the bag, not enough to be well-mixed, but better heat transfer than a solid.
The time at the target temperature depends greatly on what you're cooking. With many things, you just have to reach the temperature and then you're done. Holding at the target temperature after that might make no difference, or it might result in slow loss of quality. For example, you can hold steak quite a while at temperature, with not much change. On the other hand, you don't want to hold fish forever, because it'll tend to lose texture. And with something like pork shoulder or brisket, you actually need the long cooking time in order to slowly break down connective tissue and get it tender.
So, if you already have a time you know works:
For custard, the former is obviously bad (you want it to actually set), but the latter is not really an issue (it's not going to rapidly un-set).
As a footnote, there are some sous vide recipes designed to not actually reach equilibrium temperature. For example, you can cook eggs at a temperature high enough to set the whites, but for a shorter time to avoid firmly setting the yolks. Those are more like "normal" cooking in terms of over- and under-cooking, e.g. for the eggs, too long and you set the yolk, too short and you don't set the whites.