From: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: pgsql: Document XLOG_INCLUDE_XID a little better |
Date: | 2021-10-01 04:51:16 |
Message-ID: | CAA4eK1JgEZKdVYJnaQ-3QJpYgvf+L_zcT5eSPRBcfwfzfzaK0g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
On Fri, Oct 1, 2021 at 12:32 AM Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>
> On Thu, Sep 30, 2021 at 6:08 AM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> > I think we can do better than using XLOG_INCLUDE_XID flag in the
> > record being inserted. We need this flag so that we can mark
> > SubTransaction assigned after XLogInsertRecord() is successful. We
> > can instead output a flag (say sub_xact_assigned) from
> > XLogRecordAssemble() and pass it to XLogInsertRecord(). Then in
> > XLogInsertRecord(), we can mark SubTransactionAssigned once the record
> > is inserted (after or before calling
> > MarkCurrentTransactionIdLoggedIfAny()).
>
> Isn't there other communication between these routines that just uses
> global variables?
>
AFAICS, there are two possibilities w.r.t global variables: (a) use
curinsert_flags which we are doing now, (b) another is to introduce a
new global variable, set it after we make the association, and then
reset it after we mark SubTransaction assigned and on error. I have
also thought of passing it via XLogCtlInsert but as that is shared by
different processes, it can be set by one process and be read by
another process which we don't want here.
I am not sure if any of these is better than doing this communication
via local variable. Do you have something specific in mind?
--
With Regards,
Amit Kapila.
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2021-10-01 12:53:48 | Re: pgsql: Document XLOG_INCLUDE_XID a little better |
Previous Message | Amit Kapila | 2021-10-01 03:07:19 | pgsql: Doc: Move pg_stat_replication_slots view to "Collected Statistic |
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2021-10-01 05:11:15 | Re: Incorrect snapshots while promoting hot standby node when 2PC is used |
Previous Message | Ashutosh Sharma | 2021-10-01 04:28:38 | Re: non-superusers are allowed to drop the replication user, but are not allowed to alter or even create them, is that ok? |