Thread: Postgresql 12 Beta2 Crashes for any Insert/Update

Postgresql 12 Beta2 Crashes for any Insert/Update

From
Mohsen Bande
Date:

i have a working database in PG 12 Beta 1. today i upgraded it to Beta 2. everything goes fine and server is up and running. but trying to INSERT/UPDATE anything, server crashes:

=# select id from user where id=0;id 
---- 0
(1 row)
=# UPDATE user SET is_deleted = true WHERE id = 0;
psql: server closed the connection unexpectedly   This probably means the server terminated abnormally   before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.

and the server log has nothing more:

2019-06-27 12:49:07.348  [16336] LOG:  server process (PID 17680) was terminated by signal 11: Segmentation fault
2019-06-27 12:49:07.348  [16336] DETAIL:  Failed process was running: UPDATE user SET is_deleted = true WHERE id = 0;
2019-06-27 12:49:07.348  [16336] LOG:  terminating any other active server processes
2019-06-27 12:49:07.348  [16436] WARNING:  terminating connection because of crash of another server process
2019-06-27 12:49:07.348  [16436] DETAIL:  The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
2019-06-27 12:49:07.348  [16436] HINT:  In a moment you should be able to reconnect to the database and repeat your command.
2019-06-27 12:49:07.350  [17787] postgres@db_01 FATAL:  the database system is in recovery mode
2019-06-27 12:49:07.363  [16336] LOG:  all server processes terminated; reinitializing
2019-06-27 12:49:07.821  [17788] LOG:  database system was interrupted; last known up at 2019-06-27 12:39:53 
2019-06-27 12:49:07.858  [17788] LOG:  database system was not properly shut down; automatic recovery in progress
2019-06-27 12:49:07.868  [17788] LOG:  redo starts at 4B2/5A000AF8
2019-06-27 12:49:07.868  [17788] LOG:  invalid record length at 4B2/5A000B30: wanted 24, got 0
2019-06-27 12:49:07.868  [17788] LOG:  redo done at 4B2/5A000AF8
2019-06-27 12:49:08.063  [16336] LOG:  database system is ready to accept connections

Re: Postgresql 12 Beta2 Crashes for any Insert/Update

From
Peter Geoghegan
Date:
On Thu, Jun 27, 2019 at 1:28 AM Mohsen Bande <mohsenbande@gmail.com> wrote:
> i have a working database in PG 12 Beta 1. today i upgraded it to Beta 2. everything goes fine and server is up and
running.but trying to INSERT/UPDATE anything, server crashes:
 

Is it possible for you to send us a stacktrace?

https://wiki.postgresql.org/wiki/Generating_a_stack_trace_of_a_PostgreSQL_backend

Thanks
-- 
Peter Geoghegan



Re: Postgresql 12 Beta2 Crashes for any Insert/Update

From
Mohsen Bande
Date:
I've created a new database, and started to copy current data into it. it seems to work.
it seems that the problem relates to upgrade process of database catalogs from Beta1 to Beta2.
if the problem persists, it will investigate the stacktrace.
Thanks

On Thu, Jun 27, 2019 at 9:40 PM Peter Geoghegan <pg@bowt.ie> wrote:
On Thu, Jun 27, 2019 at 1:28 AM Mohsen Bande <mohsenbande@gmail.com> wrote:
> i have a working database in PG 12 Beta 1. today i upgraded it to Beta 2. everything goes fine and server is up and running. but trying to INSERT/UPDATE anything, server crashes:

Is it possible for you to send us a stacktrace?

https://wiki.postgresql.org/wiki/Generating_a_stack_trace_of_a_PostgreSQL_backend

Thanks
--
Peter Geoghegan

Re: Postgresql 12 Beta2 Crashes for any Insert/Update

From
Mohsen Bande
Date:
After Investigating deeper, I found the root cause.
Actually, the problem exists in certain tables, which i have created a trigger on them calling a function from a custom dynamic extension.
the extension needs to rebuild (make && make install) against new PG development header files.


On Sun, Jun 30, 2019 at 3:29 PM Mohsen Bande <mohsenbande@gmail.com> wrote:
I've created a new database, and started to copy current data into it. it seems to work.
it seems that the problem relates to upgrade process of database catalogs from Beta1 to Beta2.
if the problem persists, it will investigate the stacktrace.
Thanks

On Thu, Jun 27, 2019 at 9:40 PM Peter Geoghegan <pg@bowt.ie> wrote:
On Thu, Jun 27, 2019 at 1:28 AM Mohsen Bande <mohsenbande@gmail.com> wrote:
> i have a working database in PG 12 Beta 1. today i upgraded it to Beta 2. everything goes fine and server is up and running. but trying to INSERT/UPDATE anything, server crashes:

Is it possible for you to send us a stacktrace?

https://wiki.postgresql.org/wiki/Generating_a_stack_trace_of_a_PostgreSQL_backend

Thanks
--
Peter Geoghegan