I had one of the most memorable dreams of my life a few nights ago.

I was in Aitchie’s Ale House, a pub in Aberdeen that I visited last summer, and I was propping up the bar with my father, uncle and what were evidently half a dozen of our ancestors.

The conversation turned, as it invariably does in my family, to football, and my dad was holding forth, regaling all and sundry with tales of our beloved Heart of Midlothian Football Club and their 1950s glory days.

He was recounting how wonderful they had been back then, and intermittently breaking off to tell our forefathers what football was and how it had risen to become such a popular pastime.

It was an enchanting dream and not at all difficult to explain, as I have spent much of the past few months trying to trace my family history.

I’ve been scouring around online and digging about in libraries, checking out old birth, death, marriage and census records, and with much success.

I never knew my paternal grandfather and nor did my father know his, and until recently our knowledge of the family line petered out around 1900.

But with just a little bit of digging we’ve managed to go back a further three generations and have learned a lot more about our heritage.

If I’m being totally honest, I went into the whole exercise with something of an ulterior motive. For some years I have had on my key-ring an Aitchison’s Ales bottle opener, an old relic from an Edinburgh brewery that shut down in the 1960s. I picked it up online and had often hoped that I, now a keen beer-drinker and part-time pub columnist, might be related to the brewery’s founders.

The story fitted my dream, but apparently not the reality. Those Aitchisons were of noble stock and from Edinburgh itself. Mine were not. The census records show my forefathers to have been farmhands and labourers in myriad villages east of Edinburgh trying, like many at that time, to feed large families on what must have been volatile and humble incomes.

My great great grandfather, James, looks to have had it particularly tough.

Census records from 1891 show he was a widower trying to support not only his two motherless daughters but one fatherless grandson.

It evidently wasn’t easy: four years later he died a pauper’s death in the poorhouse.

He was 61, but the perfunctory death certificate recorded his age as 50.

More recently it transpires that his son and my great-grandfather, one of many Thomases in the family, died in the street, just a few yards from the nursery that I and one of my sisters would attend half a century later. I’m glad I didn’t know that when I was playing on the see-saw and climbing frame.

Until now, I’d never really got the ancestral obsession, seemingly fuelled in recent years by a spate of TV programmes. I was uneasy about what it said for our society that so many people wanted to look to the past rather than the future for meaning and purpose.

But when you get down to tracing your own line, it can be really quite humbling and moving.

People always say you can’t choose your family and I’m glad that’s true. My forefathers may not have been the brewers I thought I wanted them to be, but it’s the truth I now cling to.

And thanks to a few intangible, electronic records on my laptop, and that most endearing of dreams, a few strands of that past now seem a bit closer to home.