Invalid psql command when using sqitch on Windows

513 views
Skip to first unread message

rkil...@meta-comm.com

unread,
Apr 10, 2018, 8:57:24 AM4/10/18
to Sqitch Users
I'm following the PostgreSQL tutorial on Windows.  The postgres service is running and `psql` is in my `PATH`, and I'm at the step where I want to deploy to my new flipr_test database.

It appears that sqitch is creating an invalid call to psql, here are some examples:

C:\flipr>sqitch deploy db:pg:flipr_test
Adding registry tables to db:pg:flipr_test
psql
: warning: extra command-line argument "--no-psqlrc" ignored
psql
: warning: extra command-line argument "--no-align" ignored
psql
: warning: extra command-line argument "--tuples-only" ignored
psql
: warning: extra command-line argument "--set" ignored
psql
: warning: extra command-line argument "ON_ERROR_STOP=1" ignored
psql
: warning: extra command-line argument "--set" ignored
psql
: warning: extra command-line argument "registry=sqitch" ignored
psql
: warning: extra command-line argument "-c" ignored
psql
: warning: extra command-line argument "SHOW" ignored
psql
: warning: extra command-line argument "server_version_num" ignored
psql
: FATAL:  role "--quiet" does not exist
"psql.exe" unexpectedly returned exit value 2

C:\flipr>sqitch deploy db:pg://postgres@localhost/flipr_test
Adding registry tables to db:pg://postgres@localhost/flipr_test
psql: warning: extra command-line argument "host=localhost" ignored
psql: warning: extra command-line argument "--quiet" ignored
psql: warning: extra command-line argument "--no-psqlrc" ignored
psql: warning: extra command-line argument "--no-align" ignored
psql: warning: extra command-line argument "--tuples-only" ignored
psql: warning: extra command-line argument "--set" ignored
psql: warning: extra command-line argument "ON_ERROR_STOP=1" ignored
psql: warning: extra command-line argument "--set" ignored
psql: warning: extra command-line argument "registry=sqitch" ignored
psql: warning: extra command-line argument "-c" ignored
psql: warning: extra command-line argument "SHOW" ignored
psql: warning: extra command-line argument "server_version_num" ignored

This second example hangs (I'm assuming because it's hiding a psql shell).  Looking at my process manager, the running command appears to be:
psql.exe user=postgres dbname=flipr_test host=localhost --quiet --no-psqlrc --no-align --tuples-only --set ON_ERROR_STOP=1 --set registry=sqitch -c SHOW server_version_num
so it appears the -- is missing from the user, dbname, and host arguments.

Am I doing something wrong, or have I potentially discovered some bug?

Thanks for your help!

nic...@lanehoney.com

unread,
Apr 17, 2018, 11:41:47 AM4/17/18
to Sqitch Users
I am having EXACTLY the same issue and error message! Windows 10, both from powershell or command prompt. Same errors.
I tried everything I can think of and followed the tutorial and anything pertinent I could find online. I am absolutely sure the configuration is pointing to the correct psql.exe, because when I rename it I get a different error message such as file not found.
I need this to work for my job, has anybody found a solution?

nic...@lanehoney.com

unread,
Apr 23, 2018, 1:20:08 PM4/23/18
to Sqitch Users
Still stuck here, is anybody successfully using sqitch in Windows willing to trow a tip or two?


On Tuesday, April 10, 2018 at 8:57:24 AM UTC-4, rkil...@meta-comm.com wrote:

dou...@replicon.com

unread,
Oct 19, 2018, 3:50:40 PM10/19/18
to Sqitch Users
Anybody?  Any luck? Add another name to the 'stuck' list.  

Linux works fine, but I need to get things working on Windows for the rest of the teams as that is their main development platform.

David E. Wheeler

unread,
Oct 20, 2018, 4:46:08 PM10/20/18
to dou...@replicon.com, Sqitch Users
On Oct 19, 2018, at 15:50, dou...@replicon.com wrote:

> Anybody? Any luck? Add another name to the 'stuck' list.
>
> Linux works fine, but I need to get things working on Windows for the rest of the teams as that is their main development platform.

Yes, there were two problems, discussed in https://github.com/sqitchers/sqitch/issues/384. One is fixed in v0.9998:

https://github.com/sqitchers/sqitch/commit/3e8975f

The other is a pull request I’ve submitted for IPC::System::Simple, which sadly has stalled:

https://github.com/pjf/ipc-system-simple/pull/29

If you could patch your copy of IPC::System::Simple with this change (or install it from Git, if you’re comfortable with that), I’d love confirmation that it fixes the issue on Windows.

Thanks,

David



Reply all
Reply to author
Forward
0 new messages