Re: [PATCH] Refactor pqformat.{c,h} and protocol.h

2024-07-17 Thread Nathan Bossart
On Tue, Jul 16, 2024 at 04:38:06PM -0500, Nathan Bossart wrote: > Alright. Well, I guess I'll flip a coin tomorrow unless someone else > chimes in with an opinion. Committed and back-patched to v17. I left it as PqMsg_Progress. -- nathan

Re: [PATCH] Refactor pqformat.{c,h} and protocol.h

2024-07-16 Thread Nathan Bossart
On Tue, Jul 16, 2024 at 10:58:37PM +0300, Aleksander Alekseev wrote: >> Thanks. The only thing that stands out to me is the name of the parallel >> leader/worker protocol message. In the original thread for protocol >> characters, some early versions of the patch called it a "parallel >> progress

Re: [PATCH] Refactor pqformat.{c,h} and protocol.h

2024-07-16 Thread Aleksander Alekseev
Hi, > Thanks. The only thing that stands out to me is the name of the parallel > leader/worker protocol message. In the original thread for protocol > characters, some early versions of the patch called it a "parallel > progress" message, but this new one just calls it PqMsg_Progress. I guess >

Re: [PATCH] Refactor pqformat.{c,h} and protocol.h

2024-07-16 Thread Nathan Bossart
On Tue, Jul 16, 2024 at 09:14:35PM +0300, Aleksander Alekseev wrote: >> As discussed elsewhere [0], we can add the leader/worker protocol >> characters to protocol.h, but they should probably go in a separate >> section. I'd recommend breaking that part out to a separate patch, too. > > OK, here

Re: [PATCH] Refactor pqformat.{c,h} and protocol.h

2024-07-16 Thread Aleksander Alekseev
Hi, > As discussed elsewhere [0], we can add the leader/worker protocol > characters to protocol.h, but they should probably go in a separate > section. I'd recommend breaking that part out to a separate patch, too. OK, here is the updated patchset. This time I chose not to include this patch:

Re: [PATCH] Refactor pqformat.{c,h} and protocol.h

2024-07-16 Thread Nathan Bossart
I took a closer look at 0001. diff --git a/src/include/libpq/protocol.h b/src/include/libpq/protocol.h index 4b8d440365..8c0f095edf 100644 --- a/src/include/libpq/protocol.h +++ b/src/include/libpq/protocol.h @@ -47,6 +47,7 @@ #define PqMsg_EmptyQueryResponse 'I' #define PqMsg_BackendKeyDa

Re: [PATCH] Refactor pqformat.{c,h} and protocol.h

2024-07-16 Thread Aleksander Alekseev
Hi, > > This was briefly brought up in the discussion that ultimately led to > > protocol.h [0]. I don't have a particularly strong opinion on the matter, > > but I will note that protocol.h was intended to be easily usable in > > third-party code, and changing it from characters to an enum from

Re: [PATCH] Refactor pqformat.{c,h} and protocol.h

2024-07-16 Thread Tom Lane
Nathan Bossart writes: > This was briefly brought up in the discussion that ultimately led to > protocol.h [0]. I don't have a particularly strong opinion on the matter, > but I will note that protocol.h was intended to be easily usable in > third-party code, and changing it from characters to an

Re: [PATCH] Refactor pqformat.{c,h} and protocol.h

2024-07-16 Thread Nathan Bossart
On Tue, Jul 16, 2024 at 04:09:44PM +0300, Aleksander Alekseev wrote: > - Patch 1 replaces all the char's with PqMsg's Thanks. I'll look into committing this one in the near future. > - Patch 2 makes PqMsg an enum. This ensures that the problem will not > appear again in the future and also gives

Re: [PATCH] Refactor pqformat.{c,h} and protocol.h

2024-07-16 Thread Aleksander Alekseev
Hi, > The proposed patchset fixes this. In v1 I mistakenly named the enum PgMsg while it should have been PqMsg. Here is the corrected patchset. -- Best regards, Aleksander Alekseev v2-0002-Introduce-PqMsg-enum.patch Description: Binary data v2-0001-Always-pass-PqMsg_-to-pq_beginmessage-_re