Opened 2 years ago

Last modified 2 years ago

#5164 closed defect

"Server closed the connection unexpectedly" when installing PostGis on OS X with M1 chip — at Initial Version

Reported by: chrisneve Owned by: pramsey
Priority: medium Milestone: PostGIS 3.2.2
Component: postgis Version: 3.2.x
Keywords: Cc: chrisneve

Description

I am attempting to install Postgis on my newly created Postgresql DB and am running into issues doing so.

Environment

  • OS X (Big Sur, 11.2.3 with a M1 chip)
  • Postgresql version: stable 14.3, installed with homebrew (more precisely, with the following syntax: arch -arm64 brew install postgresql)
  • Postgis version: stable 3.2.1, installed with homebrew (same)

What I'm trying to do

I want to install postgis on my postgresql database as such.

Christophers-MacBook-Air:postgres root# psql -U chrisneve -d mydbname psql (14.3) Type "help" for help.

mydbname=# create extension postgis;

The problem

The above snippet generates this error.

mydbname=# create extension postgis; server closed the connection unexpectedly

This probably means the server terminated abnormally before or while processing the request.

The connection to the server was lost. Attempting reset: Failed. !?>

Before trying with psql directly, I executed the same command using DataGrip, which generated this error. (I also tried with the "cascade" mode: create extension postgis cascade, which generated the same result).

mydbname.public> create extension postgis [2022-05-28 10:55:30] An I/O error occurred while sending to the backend. [2022-05-28 10:55:30] Unrecoverable error received, the connection is spoiled

DataGrip also displayed a popup-style error saying this.

Error [57P03]: FATAL: the database system is in recovery mode

What I tried

I initially didn't know exactly where the error lied, so I started by asserting that the problem wasn't with the creation of extensions (for whatever reason).

select * from mydbname.pg_catalog.pg_extension

drop extension plpgsql

create extension plpgsql

This worked just fine; other extensions load fine.

Realising the issue seemed to come from Postgis, I tried removing and reinstalling Postgis, and even Postgresql, with homebrew, multiple times. It changed nothing.

I then wanted to install Postgis from a different location of https://postgis.net/install/#binary-installers for OS X, but all other install mechanisms (other than homebrew) told me not to mix with other installations, so I didn't try them.

FWIW, I installed Postgis in the past on an identical DB on a Windows machine, so although I'm no Postgis expert I do know the install process.

It would be much appreciated if a Postgis maintainer could help me out with this. Is this a new bug with the M1 chips? I can provide logs if it helps.

Many thanks, Chris

Change History (0)

Note: See TracTickets for help on using tickets.