RE: speed up a logical replica setup

From: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>
To: 'Alvaro Herrera' <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: 'Euler Taveira' <euler(at)eulerto(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>, vignesh C <vignesh21(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Peter Eisentraut <peter(at)eisentraut(dot)org>, Andres Freund <andres(at)anarazel(dot)de>, Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Shlok Kyal <shlok(dot)kyal(dot)oss(at)gmail(dot)com>, Fabrízio de Royes Mello <fabriziomello(at)gmail(dot)com>
Subject: RE: speed up a logical replica setup
Date: 2024-02-22 15:45:26
Message-ID: TYCPR01MB12077E9F3EC59D2B112D289A4F5562@TYCPR01MB12077.jpnprd01.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dear Alvaro,

> > 15.
> >
> > You said in case of failure, cleanups is not needed if the process exits soon [1].
> > But some functions call PQfinish() then exit(1) or pg_fatal(). Should we follow?
>
> Hmm, but doesn't this mean that the server will log an ugly message that
> "client closed connection unexpectedly"? I think it's nicer to close
> the connection before terminating the process (especially since the
> code for that is already written).

OK. So we should disconnect properly even if the process exits. I added the function call
again. Note that PQclear() was not added because it is only related with the application.

Best Regards,
Hayato Kuroda
FUJITSU LIMITED
https://www.fujitsu.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hayato Kuroda (Fujitsu) 2024-02-22 15:46:06 RE: speed up a logical replica setup
Previous Message Hayato Kuroda (Fujitsu) 2024-02-22 15:45:02 RE: speed up a logical replica setup