Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

When using COPY to restore a CSV file, phppgadmin shows that the real database size(4GB) but when I choose to browse the table it shows Estimated row count to 0. I did a VACUUM ANALYZE. simple SELECT queries returns 0 rows, but the database size is 4GB. Also:

SELECT count(*) FROM tbl_data

return 0. Can anyone help?

share|improve this question

2 Answers 2

Because the estimated row count is just that -- an estimate. IIRC, the stats aren't updated until after the copy, and perhaps not after that (you might have to do a VACUUM ANALYZE first).

share|improve this answer
up vote 1 down vote accepted

I asked this question on PostgreSQL. They told:

COPY runs inside a transaction, so it is not visible to outside.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.