Re: PostgreSQL 15 minor fixes in protocol.sgml
On Tue, Aug 2, 2022 at 4:28 PM Michael Paquier wrote: > > On Mon, Aug 01, 2022 at 11:00:20PM +0300, Ekaterina Kiryanova wrote: > > > Another point worth mentioning is that only this file contains the phrase > > "two-phase transaction". I believe that "two-phase commit transaction" or > > "transaction prepared for two-phase commit" depending on the situation would > > be better wording. > > "Prepare for two-phase commit" may be clearer? > I think we can use just "Prepared transaction" instead. So, the message "The user defined GID of the two-phase transaction." can be changed to "The user defined GID of the prepared transaction.". Similarly, the message "Identifies the message as a two-phase prepared transaction message." could be changed to: "Identifies the message as a prepared transaction message." > > And finally, could you please clarify this part? > > -- The end LSN of the prepare transaction. > > Is it a typo of "prepared transaction"? I think in this case it should be a "prepared transaction". Thanks for the report and Thanks Michael for including me. I am just redirecting it to -hackers so that others involved in this feature also can share their views. -- With Regards, Amit Kapila.
Re: PostgreSQL 15 minor fixes in protocol.sgml
On Wed, Aug 3, 2022 at 1:58 PM Amit Kapila wrote: > > On Tue, Aug 2, 2022 at 4:28 PM Michael Paquier wrote: > > > > On Mon, Aug 01, 2022 at 11:00:20PM +0300, Ekaterina Kiryanova wrote: > > > > > Another point worth mentioning is that only this file contains the phrase > > > "two-phase transaction". I believe that "two-phase commit transaction" or > > > "transaction prepared for two-phase commit" depending on the situation > > > would > > > be better wording. > > > > "Prepare for two-phase commit" may be clearer? > > > > I think we can use just "Prepared transaction" instead. So, the > message "The user defined GID of the two-phase transaction." can be > changed to "The user defined GID of the prepared transaction.". > Similarly, the message "Identifies the message as a two-phase prepared > transaction message." could be changed to: "Identifies the message as > a prepared transaction message." > > > > And finally, could you please clarify this part? > > > -- The end LSN of the prepare transaction. > > > Is it a typo of "prepared transaction"? > > I think in this case it should be a "prepared transaction". > > > Thanks for the report and Thanks Michael for including me. I am just > redirecting it to -hackers so that others involved in this feature > also can share their views. > PSA a patch to modify the descriptions as suggested by Amit. -- Kind Regards, Peter Smith. Fujitsu Australia v1-0001-modify-protocol-message-descriptions-for-2PC.patch Description: Binary data
The sample FDW table: pglog not work in https://www.postgresql.org/docs/14/file-fdw.html
The following documentation comment has been logged on the website: Page: https://www.postgresql.org/docs/14/appendixes.html Description: Dear All, CREATE FOREIGN TABLE pglog ( log_time timestamp(3) with time zone, user_name text, database_name text, process_id integer, connection_from text, session_id text, session_line_num bigint, command_tag text, session_start_time timestamp with time zone, virtual_transaction_id text, transaction_id bigint, error_severity text, sql_state_code text, message text, detail text, hint text, internal_query text, internal_query_pos integer, context text, query text, query_pos integer, location text, application_name text, backend_type text, leader_pid integer, query_id bigint ) SERVER pglog OPTIONS ( filename 'log/pglog.csv', format 'csv' ); If we use pg14 as the server, this example will not work. I just tried adding 2 extra columns, finally it can work. see below: CREATE FOREIGN TABLE pglog ( log_time timestamp(3) with time zone, user_name text, database_name text, process_id integer, connection_from text, session_id text, session_line_num bigint, command_tag text, session_start_time timestamp with time zone, virtual_transaction_id text, transaction_id bigint, error_severity text, sql_state_code text, message text, detail text, hint text, internal_query text, internal_query_pos integer, context text, query text, bbb text, query_pos integer, location text, application_name text, backend_type text, ccc integer ) SERVER pglog_server OPTIONS ( filename 'log/pglog.csv', format 'csv' ); There is a "bbb" and "ccc" to by pass the error. In fact, it need dev of PG to provide the valid meaningful column names there. Just suggest update this page to reflect the change. Otherwise the user will be confused why it can't work and will try to find which columns are missing there.
Re: PostgreSQL 15 minor fixes in protocol.sgml
On Wed, Aug 3, 2022 at 10:56 AM Peter Smith wrote: > > PSA a patch to modify the descriptions as suggested by Amit. > * - The end LSN of the commit prepared transaction. + The end LSN of the commit of the prepared transaction. ... ... - Identifies the message as the commit of a two-phase transaction message. + Identifies the message as the commit of a prepared transaction message. In the above messages, we can even directly say "commit prepared transaction" but as you have written appears clear to me. * For timestamp, related messages, we have three different messages: Commit timestamp of the transaction. The value is in number of microseconds since PostgreSQL epoch (2000-01-01). Prepare timestamp of the transaction. The value is in number of microseconds since PostgreSQL epoch (2000-01-01). Rollback timestamp of the transaction. The value is in number of microseconds since PostgreSQL epoch (2000-01-01). We can improve by saying "Timestamp of prepared transaction" for the second one but it will make it bit inconsistent with others, so not sure if changing it makes sense or if there is a better way to change all the three messages. Thoughts? -- With Regards, Amit Kapila.