mirror of
https://github.com/postgres/postgres.git
synced 2025-11-07 19:06:32 +03:00
Use PqMsg_* macros in more places.
Commit f4b54e1ed9, which introduced macros for protocol characters,
missed updating a few places. It also did not introduce macros for
messages sent from parallel workers to their leader processes.
This commit adds a new section in protocol.h for those.
Author: Aleksander Alekseev
Discussion: https://postgr.es/m/CAJ7c6TNTd09AZq8tGaHS3LDyH_CCnpv0oOz2wN1dGe8zekxrdQ%40mail.gmail.com
Backpatch-through: 17
This commit is contained in:
@@ -92,7 +92,7 @@ void
|
||||
pgstat_progress_parallel_incr_param(int index, int64 incr)
|
||||
{
|
||||
/*
|
||||
* Parallel workers notify a leader through a 'P' protocol message to
|
||||
* Parallel workers notify a leader through a PqMsg_Progress message to
|
||||
* update progress, passing the progress index and incremented value.
|
||||
* Leaders can just call pgstat_progress_incr_param directly.
|
||||
*/
|
||||
@@ -102,7 +102,7 @@ pgstat_progress_parallel_incr_param(int index, int64 incr)
|
||||
|
||||
initStringInfo(&progress_message);
|
||||
|
||||
pq_beginmessage(&progress_message, 'P');
|
||||
pq_beginmessage(&progress_message, PqMsg_Progress);
|
||||
pq_sendint32(&progress_message, index);
|
||||
pq_sendint64(&progress_message, incr);
|
||||
pq_endmessage(&progress_message);
|
||||
|
||||
Reference in New Issue
Block a user