On Tue, Apr 11, 2023 at 01:10:57PM -0700, Andres Freund wrote:
> On 2023-04-11 11:04:50 +0200, Drouvot, Bertrand wrote:
> > On 4/11/23 10:55 AM, Drouvot, Bertrand wrote:
> > > I think we might want to add:
> > >
> > > $node_primary->wait_for_replay_catchup($node_standby);
> > >
> > > before calli
Andres Freund writes:
> I think we should lower the log level, but perhaps wait for a few more cycles
> in case there are random failures?
Removing
-log_min_messages = 'debug2'
-log_error_verbosity = verbose
not only reduces 035's log output volume from 1.6MB to 260kB,
but also speeds it up non
Hi,
On 2023-04-11 11:04:50 +0200, Drouvot, Bertrand wrote:
> On 4/11/23 10:55 AM, Drouvot, Bertrand wrote:
> > Hi,
> >
> > I think we might want to add:
> >
> > $node_primary->wait_for_replay_catchup($node_standby);
> >
> > before calling the slot creation.
> >
> > It's done in the attached, w
Hi,
On 4/11/23 10:55 AM, Drouvot, Bertrand wrote:
Hi,
I think we might want to add:
$node_primary->wait_for_replay_catchup($node_standby);
before calling the slot creation.
It's done in the attached, would it be possible to give it a try please?
Actually, let's also wait for the cascading
Hi,
On 4/11/23 10:20 AM, Drouvot, Bertrand wrote:
Hi,
On 4/11/23 7:36 AM, Noah Misch wrote:
On Fri, Apr 07, 2023 at 11:12:26AM -0700, Andres Freund wrote:
--- /dev/null
+++ b/src/test/recovery/t/035_standby_logical_decoding.pl
@@ -0,0 +1,720 @@
+# logical decoding on standby : test logical de
Hi,
On 4/11/23 7:36 AM, Noah Misch wrote:
On Fri, Apr 07, 2023 at 11:12:26AM -0700, Andres Freund wrote:
--- /dev/null
+++ b/src/test/recovery/t/035_standby_logical_decoding.pl
@@ -0,0 +1,720 @@
+# logical decoding on standby : test logical decoding,
+# recovery conflict and standby promotion.
On Fri, Apr 07, 2023 at 11:12:26AM -0700, Andres Freund wrote:
> --- /dev/null
> +++ b/src/test/recovery/t/035_standby_logical_decoding.pl
> @@ -0,0 +1,720 @@
> +# logical decoding on standby : test logical decoding,
> +# recovery conflict and standby promotion.
...
> +$node_primary->append_conf('p
On 4/8/23 5:27 AM, Andres Freund wrote:
Hi,
On 2023-04-07 14:27:09 -0700, Andres Freund wrote:
I think I'll push these in a few hours. While this needed more changes than
I'd like shortly before the freeze, I think they're largely not in very
interesting bits and pieces - and this feature has b
Hi,
On 2023-04-07 14:27:09 -0700, Andres Freund wrote:
> I think I'll push these in a few hours. While this needed more changes than
> I'd like shortly before the freeze, I think they're largely not in very
> interesting bits and pieces - and this feature has been in the works for about
> three et
Hi,
New wording works for me, thanks!
Bertrand
Le sam. 8 avr. 2023, 08:26, Andres Freund a écrit :
> Hi,
>
> On 2023-04-07 11:12:26 -0700, Andres Freund wrote:
> > +
> > +
> > + confl_active_logicalslot
> bigint
> > +
> > +
> > + Number of active logical slot
Hi,
On 2023-04-07 11:12:26 -0700, Andres Freund wrote:
> +
> +
> + confl_active_logicalslot
> bigint
> +
> +
> + Number of active logical slots in this database that have been
> + invalidated because they conflict with recovery (note that inactive
> ones
On Sat, Apr 8, 2023 at 9:31 AM Andres Freund wrote:
>
> On 2023-04-08 09:15:05 +0530, Amit Kapila wrote:
> > The new approach for invalidation looks clean. BTW, I see minor
> > inconsistency in the following two error messages (errmsg):
>
> Thanks for checking.
>
>
> > if (MyReplicationSlot->data.
On 4/8/23 12:01 AM, Andres Freund wrote:
Hi,
On 2023-04-08 09:15:05 +0530, Amit Kapila wrote:
The new approach for invalidation looks clean. BTW, I see minor
inconsistency in the following two error messages (errmsg):
Thanks for checking.
if (MyReplicationSlot->data.invalidated == RS_INVAL
Hi,
On 2023-04-08 09:15:05 +0530, Amit Kapila wrote:
> The new approach for invalidation looks clean. BTW, I see minor
> inconsistency in the following two error messages (errmsg):
Thanks for checking.
> if (MyReplicationSlot->data.invalidated == RS_INVAL_WAL)
> ereport(ERROR,
> (errcode(ERRCOD
On Fri, Apr 7, 2023 at 11:42 PM Andres Freund wrote:
>
> On 2023-04-07 08:47:57 -0700, Andres Freund wrote:
> > Integrated all of these.
>
> Here's my current version. Changes:
> - Integrated Bertrand's changes
> - polished commit messages of 0001-0003
> - edited code comments for 0003, including
Hi,
On 2023-04-07 18:32:04 -0400, Melanie Plageman wrote:
> Code review only of 0001-0005.
>
> I noticed you had two 0008, btw.
Yea, sorry for that. One was the older version. Just before sending the patch
I saw another occurance of a test failure, which I then fixed. In the course
of that I cha
Code review only of 0001-0005.
I noticed you had two 0008, btw.
On Fri, Apr 07, 2023 at 11:12:26AM -0700, Andres Freund wrote:
> Hi,
>
> On 2023-04-07 08:47:57 -0700, Andres Freund wrote:
> > Integrated all of these.
>
> From 0e038eb5dfddec500fbf4625775d1fa508a208f6 Mon Sep 17 00:00:00 2001
> F
I gave a very quick look at 0001 and 0003. I find no fault with 0001.
It was clear back when we added that stuff that invalidated_at was not
terribly useful -- I was just too conservative to not have it -- but now
that a lot of time has passed and we haven't done anything with it,
removing it seem
Hi,
On 2023-04-07 22:54:01 +0200, Drouvot, Bertrand wrote:
> That looks good to me
Cool.
I think I'll push these in a few hours. While this needed more changes than
I'd like shortly before the freeze, I think they're largely not in very
interesting bits and pieces - and this feature has been in
Hi,
On 4/7/23 8:24 PM, Drouvot, Bertrand wrote:
Hi,
On 4/7/23 5:47 PM, Andres Freund wrote:
Hi,
- write a test that invalidated logical slots do not lead to retaining WAL
I'm not sure how to do that since pg_switch_wal() and friends can't be executed
on
a standby.
You can do it on the p
Hi,
On 4/7/23 8:27 PM, Drouvot, Bertrand wrote:
Hi,
I think some of the patches might have more reviewers than really applicable,
and might also miss some. I'd appreciate if you could go over that...
Sure, will do in a couple of hours.
That looks good to me, just few remarks:
0005 is
Hi,
On 4/7/23 8:12 PM, Andres Freund wrote:
Hi,
On 2023-04-07 08:47:57 -0700, Andres Freund wrote:
Integrated all of these.
Here's my current version. Changes:
- Integrated Bertrand's changes
- polished commit messages of 0001-0003
- edited code comments for 0003, including
InvalidateObso
Hi,
On 4/7/23 5:47 PM, Andres Freund wrote:
Hi,
- write a test that invalidated logical slots do not lead to retaining WAL
I'm not sure how to do that since pg_switch_wal() and friends can't be executed
on
a standby.
You can do it on the primary and wait for the records to have been appli
Hi,
On 2023-04-07 08:47:57 -0700, Andres Freund wrote:
> Integrated all of these.
Here's my current version. Changes:
- Integrated Bertrand's changes
- polished commit messages of 0001-0003
- edited code comments for 0003, including
InvalidateObsoleteReplicationSlots()'s header
- added a bump o
Hi,
On 2023-04-07 17:13:13 +0200, Drouvot, Bertrand wrote:
> On 4/7/23 9:50 AM, Andres Freund wrote:
> > I added a check for !invalidated to
> > ReplicationSlotsComputeRequiredLSN() etc.
> >
>
> looked at 65-0001 and it looks good to me.
>
> > Added new patch moving checks for invalid logical s
Hi,
On 4/7/23 9:50 AM, Andres Freund wrote:
Hi,
Here's my current working state - I'll go to bed soon.
Thanks a lot for this Andres!
Changes:
- shared catalog relations weren't handled correctly, because the dboid is
InvalidOid for them. I wrote a test for that as well.
- ReplicationSl
Hi,
On 2023-04-07 08:09:50 +0200, Drouvot, Bertrand wrote:
> Hi,
>
> On 4/7/23 7:56 AM, Andres Freund wrote:
> > Hi,
> >
> > On 2023-04-07 07:02:04 +0200, Drouvot, Bertrand wrote:
> > > Done in V63 attached and did change the associated comment a bit.
> >
> > Can you send your changes incrementall
Hi,
On 4/7/23 7:56 AM, Andres Freund wrote:
Hi,
On 2023-04-07 07:02:04 +0200, Drouvot, Bertrand wrote:
Done in V63 attached and did change the associated comment a bit.
Can you send your changes incrementally, relative to V62? I'm polishing them
right now, and that'd make it a lot easier to
Hi,
On 2023-04-07 07:02:04 +0200, Drouvot, Bertrand wrote:
> Done in V63 attached and did change the associated comment a bit.
Can you send your changes incrementally, relative to V62? I'm polishing them
right now, and that'd make it a lot easier to apply your changes ontop.
Greetings,
Andres F
Hi,
On 4/7/23 5:47 AM, Amit Kapila wrote:
On Thu, Apr 6, 2023 at 7:50 PM Drouvot, Bertrand
wrote:
Thanks! Will update 0005.
I noticed a few typos in the latest patches.
0004
1.
+ * Physical walsenders don't need to be wakon up during replay unless
Typo.
Thanks! Fixed in V63 just posted
Hi,
On 4/6/23 4:20 PM, Drouvot, Bertrand wrote:
Hi,
On 4/6/23 3:39 PM, Amit Kapila wrote:
On Thu, Apr 6, 2023 at 6:32 PM Drouvot, Bertrand
wrote:
I don't think it could be possible to create logical walsenders on a standby if
AllowCascadeReplication() is not true, or am I missing something
Hi,
On 4/7/23 4:18 AM, Andres Freund wrote:
Hi,
TBH, I don't like the state of 0001 much. I'm working on polishing it now.
Thanks Andres!
A lot of the new functions in slot.h don't seem right to me:
- ObsoleteSlotIsInvalid() - isn't an obsolete slot by definition invalid?
bad naming, agr
On 4/7/23 3:59 AM, Amit Kapila wrote:
On Fri, Apr 7, 2023 at 6:55 AM Andres Freund wrote:
On 2023-04-06 12:10:57 +0530, Amit Kapila wrote:
After this, I think for backends that have active slots, it would
simply cancel the current query. Will that be sufficient? Because we
want the backend pr
On Thu, Apr 6, 2023 at 7:50 PM Drouvot, Bertrand
wrote:
>
> Thanks! Will update 0005.
>
I noticed a few typos in the latest patches.
0004
1.
+ * Physical walsenders don't need to be wakon up during replay unless
Typo.
0005
2.
+# Check if all the slots on standby are dropped. These include the
On Fri, Apr 7, 2023 at 8:43 AM Andres Freund wrote:
>
> On 2023-04-06 12:10:57 +0530, Amit Kapila wrote:
> > Also, it seems you have removed the checks related to
> > slots, is it because PROCSIG_RECOVERY_CONFLICT_LOGICALSLOT is only
> > used for logical slots? If so, do you think an Assert would
Hi,
On 2023-04-06 12:10:57 +0530, Amit Kapila wrote:
> Also, it seems you have removed the checks related to
> slots, is it because PROCSIG_RECOVERY_CONFLICT_LOGICALSLOT is only
> used for logical slots? If so, do you think an Assert would make
> sense?
The asserts that have been added aren't cor
Hi,
TBH, I don't like the state of 0001 much. I'm working on polishing it now.
A lot of the new functions in slot.h don't seem right to me:
- ObsoleteSlotIsInvalid() - isn't an obsolete slot by definition invalid?
- Why does ObsoleteSlotIsInvalid() sometime check invalidated_at and sometimes
no
On Fri, Apr 7, 2023 at 6:55 AM Andres Freund wrote:
>
> On 2023-04-06 12:10:57 +0530, Amit Kapila wrote:
> > After this, I think for backends that have active slots, it would
> > simply cancel the current query. Will that be sufficient? Because we
> > want the backend process should exit and relea
Hi,
On 2023-04-06 12:10:57 +0530, Amit Kapila wrote:
> After this, I think for backends that have active slots, it would
> simply cancel the current query. Will that be sufficient? Because we
> want the backend process should exit and release the slot so that the
> startup process can mark it inva
Hi,
On 4/6/23 3:39 PM, Amit Kapila wrote:
On Thu, Apr 6, 2023 at 6:32 PM Drouvot, Bertrand
wrote:
I don't think it could be possible to create logical walsenders on a standby if
AllowCascadeReplication() is not true, or am I missing something?
Right, so why to even traverse walsenders for
On Thu, Apr 6, 2023 at 6:32 PM Drouvot, Bertrand
wrote:
>
> Hi,
>
> On 4/6/23 11:55 AM, Amit Kapila wrote:
> > On Thu, Apr 6, 2023 at 12:10 PM Amit Kapila wrote:
> >>
> >> On Wed, Apr 5, 2023 at 9:27 PM Drouvot, Bertrand
> >> wrote:
> >>>
> >>
> >> Another comment on 0001.
> >> extern void Che
Hi,
On 4/6/23 2:23 PM, Amit Kapila wrote:
On Thu, Apr 6, 2023 at 11:29 AM Amit Kapila wrote:
Thinking some more on this, I think such a slot won't decode any other
records. During CreateInitDecodingContext->ReplicationSlotReserveWal,
for standby's, we use lastReplayedEndRecPtr as restart_lsn.
Hi,
On 4/6/23 7:59 AM, Amit Kapila wrote:
On Wed, Apr 5, 2023 at 6:14 PM Drouvot, Bertrand
wrote:
On 4/5/23 12:28 PM, Amit Kapila wrote:
On Wed, Apr 5, 2023 at 2:41 PM Drouvot, Bertrand
wrote:
Maybe we could change the doc with something among those lines instead?
"
Existing logical slots
Hi,
On 4/6/23 11:55 AM, Amit Kapila wrote:
On Thu, Apr 6, 2023 at 12:10 PM Amit Kapila wrote:
On Wed, Apr 5, 2023 at 9:27 PM Drouvot, Bertrand
wrote:
Another comment on 0001.
extern void CheckSlotRequirements(void);
extern void CheckSlotPermissions(void);
+extern void ResolveRecovery
Hi,
On 4/6/23 8:40 AM, Amit Kapila wrote:
On Wed, Apr 5, 2023 at 9:27 PM Drouvot, Bertrand
After this, I think for backends that have active slots, it would
simply cancel the current query. Will that be sufficient? Because we
want the backend process should exit and release the slot so that the
On Thu, Apr 6, 2023 at 11:29 AM Amit Kapila wrote:
>
> >
>
> This doesn't seem to be addressed in the latest version. And today, I
> think I see one more point about this doc change:
> +
> + A logical replication slot can also be created on a hot standby.
> To prevent
> + VACUUM from r
On Thu, Apr 6, 2023 at 12:10 PM Amit Kapila wrote:
>
> On Wed, Apr 5, 2023 at 9:27 PM Drouvot, Bertrand
> wrote:
> >
>
> Another comment on 0001.
> extern void CheckSlotRequirements(void);
> extern void CheckSlotPermissions(void);
> +extern void ResolveRecoveryConflictWithLogicalSlots(Oid dboid
On Wed, Apr 5, 2023 at 9:27 PM Drouvot, Bertrand
wrote:
>
> On 4/5/23 3:15 PM, Amit Kapila wrote:
> > On Wed, Apr 5, 2023 at 6:14 PM Drouvot, Bertrand
> > wrote:
> >>
> >> On 4/5/23 12:28 PM, Amit Kapila wrote:
> >>> On Wed, Apr 5, 2023 at 2:41 PM Drouvot, Bertrand
> >>> wrote:
> >>
> >>> minor
On Wed, Apr 5, 2023 at 6:14 PM Drouvot, Bertrand
wrote:
>
> On 4/5/23 12:28 PM, Amit Kapila wrote:
> > On Wed, Apr 5, 2023 at 2:41 PM Drouvot, Bertrand
> > wrote:
> >> Maybe we could change the doc with something among those lines instead?
> >>
> >> "
> >> Existing logical slots on standby also g
Hi,
On 2023-04-05 17:56:14 +0200, Drouvot, Bertrand wrote:
> @@ -7963,6 +7963,23 @@ xlog_redo(XLogReaderState *record)
> /* Update our copy of the parameters in pg_control */
> memcpy(&xlrec, XLogRecGetData(record),
> sizeof(xl_parameter_change));
>
> + /*
Hi,
On 4/5/23 4:24 PM, Robert Haas wrote:
On Tue, Apr 4, 2023 at 8:33 PM Jeff Davis wrote:
For comments, I agree that WalSndWakeup() clearly needs a comment
update. The call site in ApplyWalRecord() could also use a comment. You
could add a comment at every call site, but I don't think that's
Hi,
On 4/5/23 3:15 PM, Amit Kapila wrote:
On Wed, Apr 5, 2023 at 6:14 PM Drouvot, Bertrand
wrote:
On 4/5/23 12:28 PM, Amit Kapila wrote:
On Wed, Apr 5, 2023 at 2:41 PM Drouvot, Bertrand
wrote:
minor nitpick:
+
+ /* Intentional fall through to session cancel */
+ /* FALLTHROUGH */
Do we
Hi,
On 4/5/23 1:59 PM, Amit Kapila wrote:
On Wed, Apr 5, 2023 at 3:58 PM Amit Kapila wrote:
On Wed, Apr 5, 2023 at 2:41 PM Drouvot, Bertrand
wrote:
minor nitpick:
+
+ /* Intentional fall through to session cancel */
+ /* FALLTHROUGH */
Do we need to repeat fall through twice in different w
On Tue, Apr 4, 2023 at 8:33 PM Jeff Davis wrote:
> Perhaps a commit message like:
>
> "For cascading replication, wake up physical walsenders separately from
> logical walsenders.
>
> Physical walsenders can't send data until it's been flushed; logical
> walsenders can't decode and send data until
On Wed, Apr 5, 2023 at 6:14 PM Drouvot, Bertrand
wrote:
>
> On 4/5/23 12:28 PM, Amit Kapila wrote:
> > On Wed, Apr 5, 2023 at 2:41 PM Drouvot, Bertrand
> > wrote:
>
> > minor nitpick:
> > +
> > + /* Intentional fall through to session cancel */
> > + /* FALLTHROUGH */
> >
> > Do we need to repeat
Hi,
On 4/5/23 12:28 PM, Amit Kapila wrote:
On Wed, Apr 5, 2023 at 2:41 PM Drouvot, Bertrand
wrote:
Maybe we could change the doc with something among those lines instead?
"
Existing logical slots on standby also get invalidated if wal_level on primary
is reduced to
less than 'logical'. This
On Wed, Apr 5, 2023 at 3:58 PM Amit Kapila wrote:
>
> On Wed, Apr 5, 2023 at 2:41 PM Drouvot, Bertrand
> wrote:
>
> minor nitpick:
> +
> + /* Intentional fall through to session cancel */
> + /* FALLTHROUGH */
>
> Do we need to repeat fall through twice in different ways?
>
Few minor comments on
On Wed, Apr 5, 2023 at 2:41 PM Drouvot, Bertrand
wrote:
>
> On 4/5/23 8:59 AM, Amit Kapila wrote:
> > On Mon, Apr 3, 2023 at 12:05 PM Amit Kapila wrote:
>
> > On further thinking, as such this shouldn't be a problem because all
> > the WAL records before PARAMETER_CHANGE record will have sufficie
Hi,
On 4/5/23 8:59 AM, Amit Kapila wrote:
On Mon, Apr 3, 2023 at 12:05 PM Amit Kapila wrote:
On further thinking, as such this shouldn't be a problem because all
the WAL records before PARAMETER_CHANGE record will have sufficient
information so that they can get decoded. However, with the cu
Hi,
On 4/5/23 2:33 AM, Jeff Davis wrote:
On Tue, 2023-04-04 at 14:55 -0400, Robert Haas wrote:
Thanks for your continued work on $SUBJECT. I just took a look at
0004,
Thanks Robert for the feedback!
and I think that at the very least the commit message needs
work.
Agree.
Perhaps a commi
Hi,
On 4/4/23 8:13 PM, Jeff Davis wrote:
On Tue, 2023-04-04 at 11:42 +0200, Drouvot, Bertrand wrote:
Done in V58 and now this is as simple as:
Minor comments on 0004 (address if you agree):
Thanks for the review!
* Consider static inline for WalSndWakeupProcessRequests()?
Agree and do
Hi,
On 4/4/23 7:53 PM, Andres Freund wrote:
Hi,
On 2023-04-04 18:54:33 +0200, Drouvot, Bertrand wrote:
if (check_on_xid)
{
if (terminating)
appendStringInfo(&err_msg, _("terminating process %d to release replication slot
\"%s\" because it conflicts with recover
On Mon, Apr 3, 2023 at 12:05 PM Amit Kapila wrote:
>
> On Mon, Apr 3, 2023 at 4:39 AM Alvaro Herrera wrote:
> >
> > > From 56a9559555918a99c202a0924f7b2ede9de4e75d Mon Sep 17 00:00:00 2001
> > > From: bdrouvotAWS
> > > Date: Tue, 7 Feb 2023 08:59:47 +
> > > Subject: [PATCH v52 3/6] Allow log
Hi,
On 2023-04-04 17:33:25 -0700, Jeff Davis wrote:
> On Tue, 2023-04-04 at 14:55 -0400, Robert Haas wrote:
> > That's presumably OK, in the
> > sense that they'll go back to sleep and eventually wake up again, but
> > it means they might end up chronically behind sending out WAL to
> > cascading
On Tue, 2023-04-04 at 14:55 -0400, Robert Haas wrote:
> Thanks for your continued work on $SUBJECT. I just took a look at
> 0004, and I think that at the very least the commit message needs
> work. Nobody who is not a hacker is going to understand what problem
> this is fixing, because it makes ref
On Tue, Apr 4, 2023 at 5:44 AM Drouvot, Bertrand
wrote:
> Oh right, even better, thanks!
> Done in V58 and now this is as simple as:
>
> + if (DoNotInvalidateSlot(s, xid, &oldestLSN))
> {
> /* then, we are not forcing for invalidation */
Tha
On Tue, 2023-04-04 at 11:42 +0200, Drouvot, Bertrand wrote:
> Done in V58 and now this is as simple as:
Minor comments on 0004 (address if you agree):
* Consider static inline for WalSndWakeupProcessRequests()?
* Is the WalSndWakeup() in KeepFileRestoredFromArchive() more like the
flush case? Wh
Hi,
On 2023-04-04 18:54:33 +0200, Drouvot, Bertrand wrote:
> if (check_on_xid)
> {
> if (terminating)
> appendStringInfo(&err_msg, _("terminating process %d to release
> replication slot \"%s\" because it conflicts with recovery"),
> pid,
>
Hi,
On 2023-04-04 13:21:38 +0200, Alvaro Herrera wrote:
> On 2023-Apr-03, Andres Freund wrote:
>
> > Hm? That's what the _'s do. We build strings in parts in other places too.
>
> No, what _() does is mark each piece for translation separately. But a
> translation cannot be done on string piece
Hi,
On 4/4/23 1:21 PM, Alvaro Herrera wrote:
Hi,
On 2023-Apr-03, Andres Freund wrote:
Hm? That's what the _'s do. We build strings in parts in other places too.
No, what _() does is mark each piece for translation separately. But a
translation cannot be done on string pieces, and later hav
Hi,
On 4/4/23 3:43 PM, Amit Kapila wrote:
On Tue, Apr 4, 2023 at 6:05 PM Drouvot, Bertrand
I think we might want to consider slot's effective_xmin instead of
data.xmin as we use that to store xmin_horizon when we build the full
snapshot.
Oh, I did not know about the 'effective_xmin' and was
On Tue, Apr 4, 2023 at 6:05 PM Drouvot, Bertrand
wrote:
>
> On 4/4/23 1:43 PM, Amit Kapila wrote:
> > On Tue, Apr 4, 2023 at 3:14 PM Drouvot, Bertrand
> > wrote:
> >>
> >
> >
> > +static inline bool
> > +LogicalReplicationSlotXidsConflict(ReplicationSlot *s, TransactionId xid)
> > +{
> > + Transa
Hi,
On 4/4/23 1:43 PM, Amit Kapila wrote:
On Tue, Apr 4, 2023 at 3:14 PM Drouvot, Bertrand
wrote:
+static inline bool
+LogicalReplicationSlotXidsConflict(ReplicationSlot *s, TransactionId xid)
+{
+ TransactionId slot_xmin;
+ TransactionId slot_catalog_xmin;
+
+ slot_xmin = s->data.xmin;
+
On Tue, Apr 4, 2023 at 3:14 PM Drouvot, Bertrand
wrote:
>
+static inline bool
+LogicalReplicationSlotXidsConflict(ReplicationSlot *s, TransactionId xid)
+{
+ TransactionId slot_xmin;
+ TransactionId slot_catalog_xmin;
+
+ slot_xmin = s->data.xmin;
+ slot_catalog_xmin = s->data.catalog_xmin;
+
+
Hi,
On 2023-Apr-03, Andres Freund wrote:
> Hm? That's what the _'s do. We build strings in parts in other places too.
No, what _() does is mark each piece for translation separately. But a
translation cannot be done on string pieces, and later have all the
pieces appended together to form a ful
Hi,
On 4/4/23 9:48 AM, Masahiko Sawada wrote:
On Tue, Apr 4, 2023 at 10:55 AM Masahiko Sawada wrote:
Regarding 0004 patch:
@@ -2626,6 +2626,12 @@ InitWalSenderSlot(void)
walsnd->sync_standby_priority = 0;
walsnd->latch = &MyProc->procLatch;
Hi,
On 4/4/23 7:57 AM, Amit Kapila wrote:
On Mon, Apr 3, 2023 at 8:51 PM Drouvot, Bertrand
wrote:
I made it as simple as:
/*
* If the slot is already invalid or is a non conflicting slot, we
don't
* need to do anything.
*/
islogical = xid
On Tue, Apr 4, 2023 at 10:55 AM Masahiko Sawada wrote:
>
> On Tue, Apr 4, 2023 at 3:17 AM Drouvot, Bertrand
> wrote:
> >
> > Hi,
> >
> > On 4/3/23 8:10 AM, Drouvot, Bertrand wrote:
> > > Hi,
> > >
> > > On 4/3/23 7:35 AM, Amit Kapila wrote:
> > >> On Mon, Apr 3, 2023 at 4:26 AM Jeff Davis wrote:
On Mon, Apr 3, 2023 at 8:51 PM Drouvot, Bertrand
wrote:
>
> On 4/2/23 10:10 PM, Andres Freund wrote:
> > Hi,
> >> restart_lsn = s->data.restart_lsn;
> >> -
> >> -/*
> >> - * If the slot is already invalid or is fresh enough, we
> >> don't need to
> >> -
On Tue, Apr 4, 2023 at 3:17 AM Drouvot, Bertrand
wrote:
>
> Hi,
>
> On 4/3/23 8:10 AM, Drouvot, Bertrand wrote:
> > Hi,
> >
> > On 4/3/23 7:35 AM, Amit Kapila wrote:
> >> On Mon, Apr 3, 2023 at 4:26 AM Jeff Davis wrote:
> >>
> >> Agreed, even Bertrand and myself discussed the same approach few
>
Hi,
On 2023-04-03 17:34:52 +0200, Alvaro Herrera wrote:
> On 2023-Apr-03, Drouvot, Bertrand wrote:
>
> > +/*
> > + * Report terminating or conflicting message.
> > + *
> > + * For both, logical conflict on standby and obsolete slot are handled.
> > + */
> > +static void
> > +ReportTerminationInva
Hi,
On 4/3/23 8:10 AM, Drouvot, Bertrand wrote:
Hi,
On 4/3/23 7:35 AM, Amit Kapila wrote:
On Mon, Apr 3, 2023 at 4:26 AM Jeff Davis wrote:
Agreed, even Bertrand and myself discussed the same approach few
emails above. BTW, if we have this selective logic to wake
physical/logical walsenders a
On 2023-Apr-03, Drouvot, Bertrand wrote:
> +/*
> + * Report terminating or conflicting message.
> + *
> + * For both, logical conflict on standby and obsolete slot are handled.
> + */
> +static void
> +ReportTerminationInvalidation(bool terminating, bool islogical, int pid,
> +
Hi,
On 4/2/23 10:10 PM, Andres Freund wrote:
Hi,
Btw, most of the patches have some things that pgindent will change (and some
that my editor will highlight). It wouldn't hurt to run pgindent for the later
patches...
done.
Pushed the WAL format change.
Thanks!
On 2023-04-02 10:27:45
On Mon, Apr 3, 2023 at 4:39 AM Alvaro Herrera wrote:
>
> > From 56a9559555918a99c202a0924f7b2ede9de4e75d Mon Sep 17 00:00:00 2001
> > From: bdrouvotAWS
> > Date: Tue, 7 Feb 2023 08:59:47 +
> > Subject: [PATCH v52 3/6] Allow logical decoding on standby.
> >
> > Allow a logical slot to be creat
Hi,
On 4/3/23 7:35 AM, Amit Kapila wrote:
On Mon, Apr 3, 2023 at 4:26 AM Jeff Davis wrote:
On Fri, 2023-03-31 at 02:50 -0700, Jeff Davis wrote:
But if the ConditionVariableEventSleep() API is added, then I think
we
should change the non-recovery case to use a CV as well for
consistency, and
Hi,
On 4/3/23 7:20 AM, Amit Kapila wrote:
On Mon, Apr 3, 2023 at 1:31 AM Jeff Davis wrote:
On Sun, 2023-04-02 at 10:11 +0200, Drouvot, Bertrand wrote:
I was thinking that, if a new LogicalWalSndWakeup() replaces
"ConditionVariableBroadcast(&XLogRecoveryCtl->replayedCV);"
in ApplyWalRecord()
On Mon, Apr 3, 2023 at 4:26 AM Jeff Davis wrote:
>
> On Fri, 2023-03-31 at 02:50 -0700, Jeff Davis wrote:
> > But if the ConditionVariableEventSleep() API is added, then I think
> > we
> > should change the non-recovery case to use a CV as well for
> > consistency, and it would avoid the need for
On Mon, Apr 3, 2023 at 1:31 AM Jeff Davis wrote:
>
> On Sun, 2023-04-02 at 10:11 +0200, Drouvot, Bertrand wrote:
> > I was thinking that, if a new LogicalWalSndWakeup() replaces
> > "ConditionVariableBroadcast(&XLogRecoveryCtl->replayedCV);"
> > in ApplyWalRecord() then, it could be possible that
> From 56a9559555918a99c202a0924f7b2ede9de4e75d Mon Sep 17 00:00:00 2001
> From: bdrouvotAWS
> Date: Tue, 7 Feb 2023 08:59:47 +
> Subject: [PATCH v52 3/6] Allow logical decoding on standby.
>
> Allow a logical slot to be created on standby. Restrict its usage
> or its creation if wal_level on
On Sun, 2023-04-02 at 15:29 -0700, Andres Freund wrote:
> I agree that the *wait* has to go through condition_variable.c, but
> it doesn't
> seem right that creation of the WES needs to go through
> condition_variable.c.
The kind of WES required by a CV is an implementation detail, so I was
concer
On Fri, 2023-03-31 at 02:50 -0700, Jeff Davis wrote:
> But if the ConditionVariableEventSleep() API is added, then I think
> we
> should change the non-recovery case to use a CV as well for
> consistency, and it would avoid the need for WalSndWakeup().
It seems like what we ultimately want is for
Hi,
On 2023-04-02 15:15:44 -0700, Jeff Davis wrote:
> On Sun, 2023-04-02 at 14:35 -0700, Andres Freund wrote:
> > Why not offer a function to add a CV to a WES? It seems somehow odd
> > to require
> > going through condition_variable.c to create a WES.
>
> I agree that it's a bit odd, but remembe
On Sun, 2023-04-02 at 14:35 -0700, Andres Freund wrote:
> Why not offer a function to add a CV to a WES? It seems somehow odd
> to require
> going through condition_variable.c to create a WES.
I agree that it's a bit odd, but remember that after waiting on a CV's
latch, it needs to re-insert itsel
Hi,
On 2023-03-31 02:44:33 -0700, Jeff Davis wrote:
> From 2f05cab9012950ae9290fccbb6366d50fc01553e Mon Sep 17 00:00:00 2001
> From: Jeff Davis
> Date: Wed, 1 Mar 2023 20:02:42 -0800
> Subject: [PATCH v2] Introduce ConditionVariableEventSleep().
>
> The new API takes a WaitEventSet which can inc
On Fri, 2023-03-31 at 02:44 -0700, Jeff Davis wrote:
> Thank you, done. I think the nearby line was also wrong, returning
> true
> when there was no timeout. I combined the lines and got rid of the
> early return so it can check the list and timeout condition like
> normal. Attached.
On second (th
Hi,
Btw, most of the patches have some things that pgindent will change (and some
that my editor will highlight). It wouldn't hurt to run pgindent for the later
patches...
Pushed the WAL format change.
On 2023-04-02 10:27:45 +0200, Drouvot, Bertrand wrote:
> During WAL replay on standby, when s
On Sun, 2023-04-02 at 10:11 +0200, Drouvot, Bertrand wrote:
> I was thinking that, if a new LogicalWalSndWakeup() replaces
> "ConditionVariableBroadcast(&XLogRecoveryCtl->replayedCV);"
> in ApplyWalRecord() then, it could be possible that some walsender(s)
> are requested to wake up while they are
Hi,
On 4/1/23 6:50 AM, Amit Kapila wrote:
On Fri, Mar 31, 2023 at 7:14 PM Drouvot, Bertrand
wrote:
That sounds like a good idea. We could imagine creating a LogicalWalSndWakeup()
doing the Walsender(s) triage based on a new variable (as you suggest).
But, it looks to me that we:
- would nee
Hi,
On 2023-03-31 12:45:51 +0200, Drouvot, Bertrand wrote:
> On 3/31/23 6:33 AM, Andres Freund wrote:
> > Hi,
> >
> > On 2023-03-30 18:23:41 +0200, Drouvot, Bertrand wrote:
> > > On 3/30/23 9:04 AM, Andres Freund wrote:
> > > > I think this commit is ready to go. Unless somebody thinks differentl
1 - 100 of 308 matches
Mail list logo