Re: Logical Replication: SELECT pg_catalog.set_config Statement - Mailing list pgsql-general

From Hannes Kühtreiber
Subject Re: Logical Replication: SELECT pg_catalog.set_config Statement
Date
Msg-id d9c1b860-3a8e-1542-dc02-d1e1aa1efe54@synedra.com
Whole thread Raw
In response to Re: Logical Replication: SELECT pg_catalog.set_config Statement  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Logical Replication: SELECT pg_catalog.set_config Statement
Re: Logical Replication: SELECT pg_catalog.set_config Statement
List pgsql-general

Hello Tom, thanks for your answer!


We found out because we are monitoring long running queries, and saw it had been running for a month before the restart yesterday.
I just queried pg_stat_activity and it seems to be running since then.

taimusz=# SELECT pid, query_start, usename, left(query,70)
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start;
   pid   |          query_start          |  usename   |                                  left
---------+-------------------------------+------------+------------------------------------------------------------------------
 2321161 | 2021-05-17 16:15:13.906679+02 | subscriber | SELECT pg_catalog.set_config('search_path', '', false);

Am 18.05.2021 um 14:24 schrieb Tom Lane:
SELECT pg_catalog.set_config('search_path', '', false);
What makes you think it "keeps running"?  It looks to me like the
replication client does that and then goes about its business:
Admittedly, since you seem to have omitted the PID from your
log_line_prefix, it's hard to be 100% sure that these log entries
are from the same process.  But I bet they are.  The standard
walreceiver definitely does things this way.

Sorry for omitting the PIDs. But you are probably right, it is a test environment where not much is happening

In short, I think there's nothing to see here.
			regards, tom lane

I wish this is the case. There seem to be no bloated tables, but before trying this on a production system I want to be sure

regards

Hannes

--






Attachment

pgsql-general by date:

Previous
From: "Franck Routier (perso)"
Date:
Subject: Any insights on Qlik Sense using CURSOR ?
Next
From: Tom Lane
Date:
Subject: Re: Logical Replication: SELECT pg_catalog.set_config Statement