public inbox for [email protected]  
help / color / mirror / Atom feed
Re: constant crashing
2+ messages / 2 participants
[nested] [flat]

* Re: constant crashing
@ 2024-04-14 17:05 Adrian Klaver <[email protected]>
  2024-04-14 17:13 ` Re: constant crashing Tom Lane <[email protected]>
  0 siblings, 1 reply; 2+ messages in thread

From: Adrian Klaver @ 2024-04-14 17:05 UTC (permalink / raw)
  To: jack <[email protected]>; [email protected] <[email protected]>

On 4/14/24 09:20, jack wrote:
> The full error reads:
> server closed the connection expectantly
> This probably means the server terminated abnormally
> before or while processing the request.
> error: connection to server was lost

Look at the OS system log.

> 
> PostgreSQL 16.2
> 
> I also believe it is a resource issue which can be rectified with a 
> setting, but which setting?
> If you were updating 100 million records what settings would you adjust?
> 
> Here are the updates I am performing on the 100 million records:
> UPDATE table SET category_modified = UPPER(category);
> UPDATE table SET category_modified = 
> REGEXP_REPLACE(REPLACE(REPLACE(category_modified, '''','-'), '`', '-'), 
> '\s{2,}', ' ', 'g') WHERE  AND LENGTH(category_modified)>1 AND 
> POSITION('--' IN category_modified)>0;
> UPDATE table SET category_modified = REPLACE(category_modified,' ','-');
> UPDATE table SET category_modified = CASE WHEN category_modified IS NOT 
> NULL THEN regexp_replace(category_modified, '[^a-zA-Z]$', '') ELSE NULL END;
> UPDATE table SET category_modified = regexp_replace(category_modified, 
> '-{2,}', '-', 'g');
> UPDATE table SET category_modified = SUBSTRING(category_modified FROM 1 
> FOR LENGTH(category_modified) - 1) WHERE LENGTH(category_modified)>1 AND 
> category_modified LIKE '%-';

Is the above all being done in one script/transaction?

Again what are the table definitions for the tables being copied into 
and/or modified?

> 
> 
> 
> 

-- 
Adrian Klaver
[email protected]







^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: constant crashing
  2024-04-14 17:05 Re: constant crashing Adrian Klaver <[email protected]>
@ 2024-04-14 17:13 ` Tom Lane <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2024-04-14 17:13 UTC (permalink / raw)
  To: Adrian Klaver <[email protected]>; +Cc: jack <[email protected]>; [email protected] <[email protected]>

Adrian Klaver <[email protected]> writes:
> On 4/14/24 09:20, jack wrote:
>> The full error reads:
>> server closed the connection expectantly
>> This probably means the server terminated abnormally
>> before or while processing the request.
>> error: connection to server was lost

> Look at the OS system log.

Really the most detail would be in postgres' own log.  I'd only
expect the system log to contain relevant info if the problem
turns out to be an overeager OOM killer --- but if that's what's
happening, we should be able to diagnose from the postmaster's
log too (because it'd show up as the backend dying from SIGKILL).

			regards, tom lane






^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2024-04-14 17:13 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-04-14 17:05 Re: constant crashing Adrian Klaver <[email protected]>
2024-04-14 17:13 ` Tom Lane <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox