Mind your ps and qs!

Perhaps this has already been discussed, but I’m wondering about the origin of the phrase “Mind your ps and qs.” I’ve heard it has something to do with typesetting, but I think this is not right. Am I wrong?

It’s been discussed many times. Short answer is “origin unknown.” A few origins are suggested, all unproven, and most of them unlikely.
A few links:

http://www.word-detective.com/back-f.html

You can find literally thousands of sites saying the same thing.

World Wide Words only comes up with “I dunno.”

Cecil column

previous discussion including lots of (mostly discounted) hypotheses

Thanks for the responses. I guess I’m at least as right as the next guy on this one!