greenplum-db / PivotalR-archive

An convenient R tool for manipulating tables in PostgreSQL type databases and a wrapper of Apache MADlib.
https://pivotalsoftware.github.io/gp-r/
125 stars 53 forks source link

Postgresql 12 doesn't have a 'panic' level any more #58

Open IulianD opened 4 years ago

IulianD commented 4 years ago

Hi,

Quick test case : `# connected already to a postgres 12 db

x <- as.db.data.frame(abalone) Error in postgresqlExecStatement(conn, statement, ...) : RS-DBI driver: (could not Retrieve the result : ERROR: invalid value for parameter "client_min_messages": "panic" HINT: Available values: debug5, debug4, debug3, debug2, debug1, log, notice, warning, error. )`

Now, looking in the code I can see this in utilities.R: .suppress.warnings <- function (conn.id, level = "panic") { msg.level <- .set.msg.level(level, conn.id = conn.id) warn.r <- getOption("warn") options(warn = -1) list(msg.level = msg.level, warn.r = warn.r, conn.id = conn.id) }

(Sorry, can't get the hang of code formatting on this thing). Anwyay, my postgresql.conf shows this: `#client_min_messages = notice # values in order of decreasing detail:

debug5

                                    #   debug4
                                    #   debug3
                                    #   debug2
                                    #   debug1
                                    #   log
                                    #   notice
                                    #   warning
                                    #   error` 

So no more 'panic'. This is just a mild annoyance, the commands get executed, it's just that the screen fills up with warnings. Cheers, Iulian