Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Heroku not listing pg_search_documents table. #81

Closed
dtuite opened this Issue · 2 comments

3 participants

@dtuite

This is pretty weird but for some reason, heroku doesn't seem to show the pg_search_documents table when when I list tables using the heroku-sql-console.

>> heroku sql

SQL> show tables
+------------------------+
|       table_name       |
+------------------------+
| activity_notifications |
| attachments            |
| businesses             |
| color_modes            |
| comments               |
| counties               |
| customer_employees     |
| customers              |
| delayed_jobs           |
| file_imports           |
| invitations            |
| invoices               |
| jobs                   |
| paper_stocks           |
| paper_weights          |
| quotes                 |
| rails_admin_histories  |
| schema_migrations      |
| tax_rates              |
| users                  |
+------------------------+

As you can see, no mention of pg_search.

Then, in the same session,

SQL> select * from pg_search_documents;
+---------------------------------------------------------------------------------------------------------------------+
| id |       content       | searchable_id | searchable_type  |        created_at         |        updated_at         |
+---------------------------------------------------------------------------------------------------------------------+
|  3 | Energy Centre       |             3 | Customer         | 2012-12-03 19:33:55 -0800 | 2012-12-03 19:33:55 -0800 |

+---------------------------------------------------------------------------------------------------------------------+

It's also interesting that the show tables command lists only 20 tables whereas heroku pg:info says there are 21.

The reason this is a problem rather than a curiosity is because I can't get heroku db:pull to pull down the pg_search_documents table (everything else pulls fine) and I can't test migrations on production data.

I'm using PG Version: 9.1.6 on heroku and PostgreSQL 9.2.1 locally. Also PgSearch 0.5.7.

Any ideas what the issue is?

@stevenharman
Collaborator

herkou-sql-console is now deprecated in favor of heroku pg:psql. I'm running PostgreSQL 9.2 and I see the following for one of my applications:

$ heroku pg:psql
psql (9.2.4)

someDBidHere=> \d

                       List of relations
 Schema |            Name            |   Type   |     Owner
--------+----------------------------+----------+----------------
 public | availabilities             | table    | yourownerid
 public | availabilities_id_seq      | sequence | yourownerid
# ...
 public | pg_search_documents        | table    | yourownerid
 public | pg_search_documents_id_seq | sequence | yourownerid
 public | pg_stat_statements         | view     | yourownerid
# ...
(22 rows)

Naturally your table names and total row count will be different, but please try the pg:psql console and Postgres' \d command to see your tables.

@ajb ajb closed this
@ajb
Collaborator
ajb commented

Closing, feel free to reopen if this issue is still valid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.