However, there are 'ghost columns' that I remember I used before, but not now.
select column_name::text from information_schema.columns where table_name=a_table
keeps listing columns that I can not see in the current table.
Why does this happen?
What is the solution?
I'm going to assume some kind of operator error until you can prove the observation with actual queries and output. Hopefully putting that information together will cause you to realize where you are wrong. If not we at least get something that is debuggable.