Greetings!

I just ran across one of the strangest pieces I have ever seen in a piece of 
software.

I was connected remotely to a test machine set up at a customer's site.  The 
machine is running Windows XP and PostgreSQL 8.1.  PGAdmin has a connection to 
the customer's production database, which resides on another machine.  The 
database has a simple 3-column table that I thought has 22 million records, 
until last week when I found that a backup of the table showed that it actually 
has no records.  A member of this list introduced me to the concept of 
inherited tables.  There are 2 rules on the feedback table.  One says that if 
the charge number is less than 7000, then data should be inserted into the 
feedback_backup table and the other says that if if the charge number is 
greater than 7000, data should be inserted into the feedback_active table.  The 
feedback_active table's definition includes "INHERIT (feedback)".  The 
feedback_backup table does not have an INHERIT clause.  

I was curious about how much data was in each of the other two tables.  I 
opened an SQL window and issued "select count(charge) from feedback_backup".  
In a separate window I ussied "select count(charge) from feedback_active".  The 
two queries were running simultaneously.  I already knew that "select count(*) 
from feedback" takes about twenty minutes.  I minimized my Remote Desktop 
window and moved on to other things.

Half an hour later I returned.  Neither query had finished, and the query timer 
in both windows had not been updated.  Task Manager showed me that every 
PGAdmin task was not responding.  Using Task Manager, I killed PGAdmin.

At the time I first issued the count queries, a Windows Explorer window was 
up.  It was showing the contents of a folder that had 4 filed: 
backup_feedback.bat, backup_in_pieces..bat, restore_pieces.bat and 
restore_feedback.bat.  After I killed PGAdmin, the names of the files were 
shown to be:
    backup_feedback.bat
    Ln 1 Col 31
    46250 ms
    46360 ms

With some idea of showing you what happened, I pressed Alt-PrtSc to get a 
screenshot of the strange file names.  On my machine, I started MS Word and 
pasted the contents of the clipboard into my document.  The file names were 
correct!  I tried using Ctrl-PrtSc on the remote machine, but the same thing 
happened when I pasted the image into my Word document: the file names were 
correct.  

I closed the Windows Explorer window and reopened it.  And the incorrect file 
names reappeared!

Can anybody explain this?  Should this be brought to anyone else's attention, 
and if so, whose?

RobR


      

Reply via email to