Even among non-vegetarian, non-Muslims, Indians seem to eat goat, chicken, fish but much less commonly pork among them.
Does this date to the period when India was ruled by Islamic dynasties or were pigs never a major source of domesticated animal for meat in the Indian subcontinent from the start?
I can not speak to India specifically, but raising pigs generally can involve issues of resourse allocation. Cows can eat grass, humans can't, so we don't compete directly for food. Pigs however, while they can and do graze for a portion of their feed, have a digestive system very similar to humans, and eat many of the same foods we do. This can lead to questions of resource allocation- do I feed this load of veggies to my family right now, or to my pigs, so that several months from now, we can eat pork. Usually the answer is feed the family and give the pigs the undesirable scraps. This is a far smaller volume of food, the pigs develop slowly, they are not seen as a thrifty investment compared to the grass eating cows. It's old, but Marvin Harris's Cows, Pigs, Wars, and Witches explores this topic quite well.
India is a big place. Can you clarify which area you're talking about?
I only as because in my time in Northeast India pork wasn't really rare, only expensive (compared to beef which at the time was much cheaper and therefore more common). Every household in the village raises pigs as a way of making some extra money, and when people could afford it, pork was served.
So it may be that the sense you have about consumption is more limited in geography which might in turn help in answering the question.