pgsql: Fix bogus time printout in walreceiver's debug log messages.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Fix bogus time printout in walreceiver's debug log messages.
Дата
Msg-id E1WW6I5-0002mk-Ue@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix bogus time printout in walreceiver's debug log messages.

The displayed sendtime and receipttime were always exactly equal, because
somebody forgot that timestamptz_to_str returns a static buffer (thereby
simplifying life for most callers, at the cost of complicating it for those
who need two results concurrently).  Apply the same pstrdup solution used
by the other call sites with this issue.  Back-patch to 9.2 where the
faulty code was introduced.  Per bug #9849 from Haruka Takatsuka, though
this is not exactly his patch.

Possibly we should change timestamptz_to_str's API, but I wouldn't want
to do so in the back branches.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/8120c7452a51a773ad7a249b55557439f39d41ef

Modified Files
--------------
src/backend/replication/walreceiver.c |   14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: pgsql: Fix some compiler warnings that clang emits with -pedantic.
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix bogus time printout in walreceiver's debug log messages.