I have run
heroku pg:psql -a appname -c "\copy (SELECT * FROM listings) TO listings.csv CSV DELIMITER ',' HEADER"
expecting a dump of the listings table.
Instead, the file keeps growing and growing, and is (somewhat illogically) larger than the entire app database obtained through
heroku pg:backups:capture
heroku pg:backups:download
Which is confusing.
I am trying to simply make a csv copy of a table from a rails app in heroku.