[PATCH v2 2/3] Default dev settings, set host to empty (unix socket) on postgresql

Daniel Black daniel at linux.ibm.com
Fri Aug 10 08:29:39 AEST 2018


On Fri, 10 Aug 2018 01:08:48 +1000
Daniel Axtens <dja at axtens.net> wrote:

> Daniel Black <daniel at linux.ibm.com> writes:
> 
> > An empty environment variable resulted in localhost, meaning
> > posgresql connecting to domain sockets wasn't available.  
> 
> It took me a long time to understand how this works (e.g. that PGPORT
> is still required to be set for psql to find the correct domain
> socket.) But I think I'm now a bit clearer.
> 
> > Signed-off-by: Daniel Black <daniel at linux.ibm.com>
> > ---
> >  .travis.yml               | 3 +++
> >  patchwork/settings/dev.py | 1 +
> >  2 files changed, 4 insertions(+)
> >
> > diff --git a/.travis.yml b/.travis.yml
> > index 58e0b08..0c6e79d 100644
> > --- a/.travis.yml
> > +++ b/.travis.yml
> > @@ -22,6 +22,7 @@ env:
> >      - PW_TEST_DB_TYPE=mysql PW_TEST_DB_USER=root
> >    global:
> >      - PW_TEST_DB_PASS=""
> > +    - PW_TEST_DB_HOST="localhost"  
> 
> I tried setting this
> to "" globally and it seemed to work; is there
> any reason to treat postgres 10 and 11 specially?

I was preserving PW_TEST_DB_HOST=localhost so the previous 9.6 test was
run the same way as it did previously.

> More fundamentally, is there any reason we particuarly want to do
> things this way on Travis?

No idea which "things" you're exactly referring to.

> 
> Regards,
> Daniel
> 



More information about the Patchwork mailing list