Is a logical replication crash recovery safe?

2023-01-24 Thread Zwettler Markus (OIZ)
Is a logical replication crash recovery safe?

Thanks, Markus



Re: Is a logical replication crash recovery safe?

2023-01-24 Thread Christophe Pettus



> On Jan 24, 2023, at 07:37, Zwettler Markus (OIZ)  
> wrote:
> 
> Is a logical replication crash recovery safe?

You might want to give more detail about the scenario you are concerned about.  
Changes that are received by a subscriber as part of logical replication are 
WAL-logged, observe transaction semantics, and will be replayed if the 
subscriber crashes and restarts.



AW: [Extern] Re: Is a logical replication crash recovery safe?

2023-01-24 Thread Zwettler Markus (OIZ)
> -Ursprüngliche Nachricht-
> Von: Christophe Pettus 
> Gesendet: Dienstag, 24. Januar 2023 16:48
> An: Zwettler Markus (OIZ) 
> Cc: pgsql-general@lists.postgresql.org
> Betreff: [Extern] Re: Is a logical replication crash recovery safe?
> 
> 
> 
> > On Jan 24, 2023, at 07:37, Zwettler Markus (OIZ) 
> > 
> wrote:
> >
> > Is a logical replication crash recovery safe?
> 
> You might want to give more detail about the scenario you are concerned about.
> Changes that are received by a subscriber as part of logical replication are 
> WAL-
> logged, observe transaction semantics, and will be replayed if the subscriber
> crashes and restarts.
> 


Sorry. Let me refine.

If I create a logical replication slot and use the replication slot to publish 
some tables.

Will the information in the replication slot be safe for any subscription even 
if a crash recovery happened on the publisher node?




Link WAL record to session

2023-01-24 Thread Sergey Burladyan


Hi, All!

Is it possible to associate a WAL record with it session/process id?

For example, if I have this record in WAL:
rmgr: Standby len (rec/tot): 42/42, tx: 1142213518, lsn: 
36174/FDC19050, prev 36174/FDC19020, desc: LOCK xid 1142213518 db 13091 rel 
733108033

Can I find session that writes it?

-- 
Sergey Burladyan




Re: Link WAL record to session

2023-01-24 Thread kaido vaikla
Hi
Take a look at parameter
log_line_prefix

br
Kaido

On Tue, 24 Jan 2023, 20:36 Sergey Burladyan,  wrote:

>
> Hi, All!
>
> Is it possible to associate a WAL record with it session/process id?
>
> For example, if I have this record in WAL:
> rmgr: Standby len (rec/tot): 42/42, tx: 1142213518, lsn:
> 36174/FDC19050, prev 36174/FDC19020, desc: LOCK xid 1142213518 db 13091 rel
> 733108033
>
> Can I find session that writes it?
>
> --
> Sergey Burladyan
>
>
>


Re: Link WAL record to session

2023-01-24 Thread David G. Johnston
On Tue, Jan 24, 2023 at 12:30 PM kaido vaikla 
wrote:

> Hi
> Take a look at parameter
> log_line_prefix
>
>>
>>
Really?  Care to explain in more detail.  I wouldn't expect that setting to
have anything to do with WAL.

David J.


re: Link WAL record to session

2023-01-24 Thread kaido vaikla
xid in wal should be transaction id. It is one option (with pid) for log
line prefix
br
Kaido

On Tue, 24 Jan 2023, 21:37 David G. Johnston, 
wrote:

> On Tue, Jan 24, 2023 at 12:30 PM kaido vaikla 
> wrote:
>
>> Hi
>> Take a look at parameter
>> log_line_prefix
>>
>>>
>>>
> Really?  Care to explain in more detail.  I wouldn't expect that setting
> to have anything to do with WAL.
>
> David J.
>
>