stripe-archive / mosql

MongoDB → PostgreSQL streaming replication
MIT License
1.63k stars 224 forks source link

Can't connect to Amazon Redshift: `unrecognized configuration parameter "standard_conforming_strings"` #38

Open jkleint opened 10 years ago

jkleint commented 10 years ago

Not sure if this is a Sequel issue. Also tried https://github.com/remind101/sequel-redshift with same issue.

/var/lib/gems/1.9.1/gems/sequel-4.8.0/lib/sequel/adapters/postgres.rb:161:in `async_exec': PG::UndefinedObject: ERROR:  unrecognized configuration parameter "standard_conforming_strings" (Sequel::DatabaseConnectionError)
    from /var/lib/gems/1.9.1/gems/sequel-4.8.0/lib/sequel/adapters/postgres.rb:161:in `block in execute_query'
    from /var/lib/gems/1.9.1/gems/sequel-4.8.0/lib/sequel/database/logging.rb:33:in `log_yield'
    from /var/lib/gems/1.9.1/gems/sequel-4.8.0/lib/sequel/adapters/postgres.rb:161:in `execute_query'
    from /var/lib/gems/1.9.1/gems/sequel-4.8.0/lib/sequel/adapters/postgres.rb:148:in `block in execute'
    from /var/lib/gems/1.9.1/gems/sequel-4.8.0/lib/sequel/adapters/postgres.rb:124:in `check_disconnect_errors'
    from /var/lib/gems/1.9.1/gems/sequel-4.8.0/lib/sequel/adapters/postgres.rb:148:in `execute'
    from /var/lib/gems/1.9.1/gems/sequel-4.8.0/lib/sequel/adapters/postgres.rb:236:in `block in connect'
    from /var/lib/gems/1.9.1/gems/sequel-4.8.0/lib/sequel/adapters/postgres.rb:236:in `each'
    from /var/lib/gems/1.9.1/gems/sequel-4.8.0/lib/sequel/adapters/postgres.rb:236:in `connect'
    from /var/lib/gems/1.9.1/gems/sequel-4.8.0/lib/sequel/connection_pool.rb:96:in `make_new'
    from /var/lib/gems/1.9.1/gems/sequel-4.8.0/lib/sequel/connection_pool/threaded.rb:158:in `make_new'
    from /var/lib/gems/1.9.1/gems/sequel-4.8.0/lib/sequel/connection_pool/threaded.rb:137:in `available'
    from /var/lib/gems/1.9.1/gems/sequel-4.8.0/lib/sequel/connection_pool/threaded.rb:127:in `block in acquire'
    from /var/lib/gems/1.9.1/gems/sequel-4.8.0/lib/sequel/connection_pool/threaded.rb:194:in `block in sync'
    from <internal:prelude>:10:in `synchronize'
    from /var/lib/gems/1.9.1/gems/sequel-4.8.0/lib/sequel/connection_pool/threaded.rb:194:in `sync'
    from /var/lib/gems/1.9.1/gems/sequel-4.8.0/lib/sequel/connection_pool/threaded.rb:126:in `acquire'
    from /var/lib/gems/1.9.1/gems/sequel-4.8.0/lib/sequel/connection_pool/threaded.rb:94:in `hold'
    from /var/lib/gems/1.9.1/gems/sequel-4.8.0/lib/sequel/database/connecting.rb:229:in `synchronize'
    from /var/lib/gems/1.9.1/gems/sequel-4.8.0/lib/sequel/adapters/shared/postgres.rb:442:in `server_version'
    from /var/lib/gems/1.9.1/gems/sequel-4.8.0/lib/sequel/adapters/shared/postgres.rb:458:in `supports_create_table_if_not_exists?'
    from /var/lib/gems/1.9.1/gems/sequel-4.8.0/lib/sequel/database/schema_methods.rb:196:in `create_table?'
    from /var/lib/gems/1.9.1/gems/mosql-0.3.1/lib/mosql/tailer.rb:4:in `create_table'
    from /var/lib/gems/1.9.1/gems/mosql-0.3.1/lib/mosql/cli.rb:147:in `run'
    from /var/lib/gems/1.9.1/gems/mosql-0.3.1/lib/mosql/cli.rb:16:in `run'
    from /var/lib/gems/1.9.1/gems/mosql-0.3.1/bin/mosql:5:in `<top (required)>'
    from /usr/local/bin/mosql:23:in `load'
    from /usr/local/bin/mosql:23:in `<main>'
toothrot commented 10 years ago

@jkleint Any luck here?

jkleint commented 10 years ago

Haven't pursued it, sorry.

toothrot commented 10 years ago

Ended up getting this working by using a different Sequel, but it's really not worth it. You want to do a COPY as Redshift recommends. Inserts are unusably slow.

yiwang commented 10 years ago

@toothrot which version of Sequel you use to get it work? can you share how you did it? thanks!

toothrot commented 10 years ago

@yiwang You actually really don't want to use Redshift like this! It has around 500ms per insert performance, so moped is a bad fit. I'll post our script we use for an ETL from our mosql postgres instance sometime in the next month.

ColmHally commented 10 years ago

Hi @toothrot, @yiwang, any updates here? Struggling with this same issue at the moment..

anacrolix commented 8 years ago

:+1: