pg_upgrade bug in Windows on PG 9.2
От | Bruce Momjian |
---|---|
Тема | pg_upgrade bug in Windows on PG 9.2 |
Дата | |
Msg-id | 20120807171051.GA20040@momjian.us обсуждение исходный текст |
Список | pgsql-hackers |
I just got a bug report from EnterpriseDB saying pg_upgrade generates a file share violation on PG 9.2. I was initially confused because I know we fixed this in a May commit. Well, it turns out that this commit re-added the same failure: commit 4741e9afb93f0d769655b2d18c2b73b86f281010 Author: Alvaro Herrera <alvherre@alvh.no-ip.org> Date: Thu Jun 28 23:27:00 2012 -0400 Make the pg_upgrade log files contain actual commands Now the log file not only contains the output from commands executed by system(), but also what command it was in the first place. This arrangement makes debugging a lot simpler. The commit was certainly a good idea, but exec_prog's log_file specification was designed as for use in an error string, meaning that the creation on an error string at one call sight would cause pg_upgrade to erroneously create a log file named "file1 or file2" on Windows. The bigger problem is that the log file was opened at the start of the function (with no error return check), and kept open until the end, causing the file to be opened while the command string was run --- this was causing the share violation. I have applied the attached patch to head and 9.2 to fix all these issues. -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. +
Вложения
В списке pgsql-hackers по дате отправления: