R Fatal error with RPostgreSQL + R + macOS Monterey

562 Views Asked by At

I am trying to connect to redshift database using R. Since I upgraded my mac to Monterey I receive a message in R as " R Session Aborted -R encountered a fatal error - the session was terminated" here is the code that produces the error sourcing it from here

Any advice on how to fix this error?

Connecting to RPostgreSQL

library("RPostgreSQL")
drv <- dbDriver('PostgreSQL')  
db <- 'myDatabase'  
host_db <- 'aws-us-east-1-portal.234.dblayer.com'  
db_port <- '98939'  
db_user <- 'henryviii'  
db_password <- ‘happydays’
conn <- dbConnect(drv, dbname=db, host=host_db, port=db_port, user=db_user, password=db_password)

I receive the following error when trying on terminal:

 *** caught segfault ***
address 0x8247a800, cause 'memory not mapped'

Traceback:
 1: postgresqlNewConnection(drv, ...)
 2: dbConnect(drv, dbname = db, host = host_db, port = db_port, user = db_user,     password = db_password)
 3: dbConnect(drv, dbname = db, host = host_db, port = db_port, user = db_user,     password = db_password)

Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace

and here is an output of sessionInfo()

R version 4.1.2 (2021-11-01)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Monterey 12.0.1

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.7           rstudioapi_0.13      magrittr_2.0.1       hms_1.1.1            tidyselect_1.1.1     bit_4.0.4           
 [7] R6_2.5.1             rlang_0.4.12         fansi_0.5.0          blob_1.2.2           dplyr_1.0.7          tools_4.1.2         
[13] RPostgres_1.4.3.9000 sessioninfo_1.2.2    utf8_1.2.2           cli_3.1.0            DBI_1.1.2            ellipsis_0.3.2      
[19] bit64_4.0.5          assertthat_0.2.1     tibble_3.1.6         lifecycle_1.0.1      crayon_1.4.2         purrr_0.3.4         
[25] vctrs_0.3.8          glue_1.6.0           compiler_4.1.2       pillar_1.6.4         generics_0.1.1       pkgconfig_2.0.3     ```
0

There are 0 best solutions below