lando / lando/postgres

Appserver Postgres Client mismatch

Open
#2 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
JavaScript
Stars
1
Forks
3
PR merge metrics
No merged PRs in 30d

Description

When creating a Drupal project with Lando and the following yml file:

name: testproject
recipe: drupal9
config:
  webroot: web
  php: '7.4'
  composer_version: '1.10.22'
  xdebug: false
  database: postgres:13

The DB version is 13 while the client bin versions (psql and pg_dump on appserver) are still on version 10.
If I define another Postgres version in the config, I'd expect that the recipe automatically uses the right version also for the client commands (psql, pg_dump).

I guess this is related to lando/lando#1680. I found a workaround also there.
I added following lines to get the client bins with the right version:

    build_as_root:
      - "apt -y update && apt-get install -y gnupg2 && echo 'deb https://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main' >> /etc/apt/sources.list.d/pgdg.list && wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - && apt -y update && apt-get install -y postgresql-client-13"

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file or test is named. Reproduce the Drupal 9 configuration with PostgreSQL 13, then inspect the Postgres service configuration that selects the database version and the appserver client binaries. Done means psql and pg_dump use the configured PostgreSQL version without the issue's manual build workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgres
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.