1

It occured only once - pgpool (newest version) allowed application to write to a slave machine. The only error message I have is like that: "cannot execute UPDATE in a read-only transaction", nothing more in postgres logs or anywhere. Anyone had a problem like this?

Chris Travers
  • 25,424
  • 6
  • 65
  • 182
Marek M.
  • 3,799
  • 9
  • 43
  • 93

2 Answers2

1

This once happened to me when SELECT ... statement contains a function that changes data. Using black_function_list fixed it.

Ochko
  • 121
  • 1
  • 5
0

In replication mode (replication_mode = on),the SELECT is load balanced and only one of the PostgreSQL servers receives the command. Solution would be:

1) Add "/REPLICATION/" comment in front of the SELECT.

2) Add func1 to the black_function_list.

The seconed chance is if master is down the slave will act as master , since slave is set as read only, it will show error

Priyesh Karatha
  • 604
  • 5
  • 18