How do I install with PostgreSQL using Docksal?
It should be noted that you need postgres 10+ when using Drupal 9.
The steps that you are following in are for Drupal 8 and they will install postgres 9.
Recently a services has been added to Docksal that installs a postgres database that matches your Drupal version (8 or 9).
See the Docksal documentation on adding a postgres service.
Add this service and outcomment the default db image in docksal.env:
#DB_IMAGE='docksal/mysql:5.7-1.4'

When this services is added check that it works correctly by checking the docksal status:
~/S/mysite ❯❯❯ fin status
   Name                  Command                 State                         Ports                   
-------------------------------------------------------------------------------------------------------
d9geo_cli_1   /opt/startup.sh supervisord     Up (healthy)   22/tcp, 3000/tcp, 9000/tcp                
d9geo_db_1    docker-entrypoint.sh postgres   Up             0.0.0.0:49174-&gt;5432/tcp,:::49174-&gt;5432/tcp
d9geo_web_1   httpd-foreground                Up (healthy)   443/tcp, 80/tcp                           

Your Drupal settings should look as follows (note that the driver should be pgsql)
$databases['default']['default'] = [
    'database' =&gt; 'default',
    'username' =&gt; 'user',
    'password' =&gt; 'user',
    'host' =&gt; 'db',
    'driver' =&gt; 'pgsql',
];

User, password etc. can be changed using environment variables.
Now you should be able to install the website.