Re: Additional message in pg_terminate_backend - Mailing list pgsql-hackers

From Roman Khapov
Subject Re: Additional message in pg_terminate_backend
Date
Msg-id AE8B7287-51F4-498D-8466-183EC582634B@yandex-team.ru
Whole thread Raw
In response to Re: Additional message in pg_terminate_backend  (Jim Jones <jim.jones@uni-muenster.de>)
Responses Re: Additional message in pg_terminate_backend
Re: Additional message in pg_terminate_backend
List pgsql-hackers
Hi Jim!
Thanks for your review and rebase!

> Since the message's size is limited to BACKEND_MSG_MAX_LEN, shouldn't
> you use it to limit msg at pg_terminate_backend[_msg]()? Something like:
> 

The message is truncated inside BackendMsgSet function, so I see a little
point in truncating it at pg_terminate_backend..

Also, changing the stpncpy() to strlcpy() breaks the logic
of returning result length of the message and NOTICE message about it,
so I reverted this change. But this note make me think about adding test
to truncation logic, so I added it in v4.

--
Best regards,
Roman Khapov


Attachment

pgsql-hackers by date:

Previous
From: Imran Zaheer
Date:
Subject: Re: [WIP] Pipelined Recovery
Next
From: Peter Eisentraut
Date:
Subject: Re: rename and move AssertVariableIsOfType