0

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?

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).

1

I asked this question on PostgreSQL. They told:

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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