From: | abbas alizadeh <ramkly(at)yahoo(dot)com> |
---|---|
To: | Matt Gibbins <matt_gibbins(at)fastmail(dot)com(dot)au> |
Cc: | pgsql-admin(at)lists(dot)postgresql(dot)org |
Subject: | Re: Segmentation fault when running queries in sequence |
Date: | 2023-09-23 11:38:17 |
Message-ID: | E87AF61A-F0AD-4510-8B73-8160933187D5@yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
He Matt
Most of time segment fault is because of broken index, reindex the table (or if you can whole db) it might help get rid of segment faults
Regards
Abbas
> On 23 Sep 2023, at 2:53 PM, Matt Gibbins <matt_gibbins(at)fastmail(dot)com(dot)au> wrote:
>
>
> I am running postgresql through an SSH tunnel to process a collection of files on the server loading them into the database.
>
> Specifically GTFS files
>
> The process is as follows.
>
> find ../Database\ management/SQL/Create\ tables/Landing -type f -name 'Bus *.sql' | sort -n | while read -r f;
> do
> echo "$f";
> ./Query\ to\ server "$f";
> ./Query\ to\ server "../Database management/SQL/Create tables/AllServices/Insert landing - bus.sql";
> done
> The 'Query to server' script initiates an SSL session with the following statement where postgresql_tcanalysis initiates an SSH tunnel to the database on the remote server which I have SSH connection to.
>
> postgresql_tcanalysis < "$1"
> There is no problem with the SSH connection and running individual queries.
>
> The issue occurs when stepping through the queries.
>
> The find statement results in 19 queries. It is necessary to have individual queries as the content of the GTFS files are not consistent with regard to fields.
>
> Attached is the STDOUT messages showing the progress of the the process to segmentation fault.
>
> Running the individual queries where the segfault occurs does not occur for the individual query. The segfault only occurs when doing the bulk process.
>
> Also attached is the section from /var/log/postgresql/postgresql-15-main.log relating to the segfault occurence.
>
> Any suggestions for identifying the cause appreciated.
>
> Regards
> Matt.
>
>
>
>
>
> <messages.txt>
> <postgresql-15-main-segfault.log>
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2023-09-23 14:26:36 | Re: Segmentation fault when running queries in sequence |
Previous Message | Matt Gibbins | 2023-09-23 10:53:08 | Segmentation fault when running queries in sequence |