Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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


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.