two instances of postgres on the same machine?

From: Martin Mueller <martinmueller(at)northwestern(dot)edu>
To: "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: two instances of postgres on the same machine?
Date: 2018-07-15 19:40:52
Message-ID: 541D3B36-E9C2-4010-BC07-6A134C63C5D4@northwestern.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I made a stupid mistake with a backup and would be grateful for some advice on how to extricate myself.

I created a dumpfile from a 10.3 postgres installation on a Mac and tried to restore it on another Mac 1,000 miles away, but forgot that that machine runs Postgres 9.6.

The command

/Applications/Postgres.app/Contents/Versions/9.6/bin/psql -U postgres earlyprint2 </volumes/"theseus 1"/earlyprint_backup.sq.tar

generated a long error list like this:

====

ERROR: syntax error at or near "toc"
LINE 1: toc.dat spelling character varying(150) NOT NULL,
^
ERROR: syntax error at or near ""
LINE 1: xmlid character varying(25),
^
ERROR: syntax error at or near ""
LINE 1: wordtuple character varying(300) NOT NULL,
^
ERROR: syntax error at or near ""
LINE 1: SELECT eebochrontuples.spelling,
^
ERROR: syntax error at or near ""
LINE 1: tuple character varying(150) NOT NULL,
^
ERROR: syntax error at or near ""
LINE 1: xmlid character varying(25),
^
ERROR: syntax error at or near ""
LINE 1: AS integer

...

invalid command \N {3,000 occurrences}

I can’t tell from the error list whether it’s a matter of a corrupted backup file or (more probably) a result of 9.6 not reading a 10.3 dump file. If the latter, what would be the safest way of cleaning up this mess? There is a side of me that would prefer installing a 10.3 on the same machine in addition, but I’m not sure whether I can do this in the environment of the Postgres App. I access the data via Aqua Studio that looks for the server on port 5432, which seems to be a standard port. Is there a safe way of installing a second server via a different port?

Another solution would be to upgrade the current 9.6 installation. But I could at a pinch work with the older data on that database, and since I don’t really know what I’m doing when it comes to server administration, I’m very reluctant to touch what is working.

With apologies for this very primitive question and thanks in advance for any advice

Martin Mueller
Professor emeritus of English and Classics
Northwestern University

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Chuck Davis 2018-07-15 19:41:47 Re: Do we need yet another IDE (SQL development assistant) for PostgreSQL?
Previous Message Raymond O'Donnell 2018-07-15 19:15:00 Re: Do we need yet another IDE (SQL development assistant) for PostgreSQL?