How long is the longest I can slow cook pork shoulder?
According to Modernist Cooking Made Easy (emphasis added):


  For medium rare cooked pork shoulder, the meat should be held at 135°F
  or 57.2°C, while medium cooked meat is done at 145°F or 62.8°C. If a
  traditional well done shoulder is desired, it should be cooked at
  155°F or 68.3°C. No matter what temperature range is used, the pork
  shoulder should be cooked for 1 to 2 days. For a crisp or well done
  outer part, sous vide pork shoulder may be finished by searing,
  grilling or torching.


Note that to safely maintain and control temperatures this low for the sustained period of time, you must have a proper sous-vide setup, with a means of maintaining the temperature of the water bath.

Even at 135 F, over several hours, the method is safe because the killing of pathogens is a function of both time and temperature.

Similarly, the conversion of gelatin to collagen which gives slow cooked pork its unctuous texture is also a function of both time and temperature.  While in more traditional cooking methods (oven or barbecue), reaching internal temperatures of about 180 F is necessary to get collagen conversion in a reasonable period of time, it can be done in the truly extended time periods sous-vide cooking makes possible.



For more traditional cooking methods, about 225 F is about as low as you want to go

See also:


Why would a pressure cooker shorten a braise time? which looks at this question from the other end, making the conversion more rapid, and describes collagen to gelatin conversion in more detail.