To prepare the pickling brine, combine the vinegar and sugar in a saucepan, stirring to dissolve the sugar. Add the turmeric, mustard seeds, celery seeds, and ginger and bring to a boil. Lower the heat to a simmer and cook for 8 to 10 minutes. Remove the ginger and pour the brine over the pickles and onions. Place a plate on top of them to keep them submerged. Allow the pickles to sit in the brine for 24 hours before using. Keep refrigerated.