About three months ago I went out to eat and paid for the meal with a combination of a gift card and my debit card, afterwards the portion that was paid via debit card was recorded properly and since then I have been waiting for the transaction to appear on my bank statement. The only difference between the balance that I have in my checkbook and the bank is the meal that has apparently not been cleared yet, how long should I leave the transaction on the books before I consider it to be null and void?
Typically I'll carry the charge for quite awhile, up to a year. If it hasn't cleared by then, I contact the institution that should have received the money to see what they want to do about it. If they tell me not to worry about it, then I change the payee to be "Overdraft Protection", and consider it as having been spent. That way I build up (slowly) a cushion in my checking account.
With a check, there are limits on cashing the stale check, but that is set by the banks involved. With a debit card transaction, it will be up the the debit card company and your bank.
Imagine a situation where a person finds an old check and tries to cash it at their bank. If the bank considers the check stale, they might reject it, or put a longer hold on the check. When the check writers bank gets the transaction, they will also decide what to do. If they reject it, the first bank will reverse the transaction.
You can't count on a 90 day, or 180 day limit; most banks will ask you to put a stop payment on an old check that you don't want cashed. This is especially important step if you write a replacement check.
Because there is no check number to put a stop payment on, in fact the temporary hold will fall off after a few days. There doesn't appear to be a way to stop an old transaction.
Be careful if you do contact the restaurant, you could end up double paying for the meal if they swipe your card again.
Your best option may be just to keep the transaction as pending.
Why would you consider it null and void? It might be that something went wrong and the business "lost" the transaction one way or another. It might be something else. It might never appear. It might appear.
In one of the questions a while ago someone posted a link of a story where an account was overdrawn because of a forgotten debit card charge that resurfaced months later. Can't find the link right now, but it can definitely happen.