pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedSegfault on updating foreign table
2+ messages / 2 participants
[nested] [flat]
Commits from this thread:
2020-01-26 215824f918 7294f99a0b 5220ced0de 43a648f57c 603e03b4c9 In postgres_fdw, don't try to ship MULTIEXPR updates to remote server.
* Segfault on updating foreign table
@ 2020-01-26 07:00 Lukáš Sobotka <sobotka.luk@gmail.com>
0 siblings, 1 reply; 2+ messages in thread
From: Lukáš Sobotka @ 2020-01-26 07:00 UTC (permalink / raw)
To: pgsql-bugs@lists.postgresql.org
Hi there,
I tried to synchronize two tables on different databases using foreign data
wrapper. I executed update of foreign table with sub-query selection from
local table. As the result I got segmentation fault. General query:
UPDATE foreign_table SET (col) = (
SELECT col
FROM local_table
WHERE foreign_table.id = local_table.id
);
I am not looking for working or better solution, I just want let you know
about this. I think the query is according documentation and segfault is
not suitable result. If somebody could check it I would be grateful.
For reproducer or log see attachments.
Tested on Ubuntu 18.04.3 LTS with PG12: PostgreSQL 12.1 (Ubuntu
12.1-1.pgdg18.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu
7.4.0-1ubuntu1~18.04.1) 7.4.0, 64-bit
Thanks for your time.
Best regards,
Lukas
Attachments:
postgresql.log (text/x-log, 2.3K) download
2020-01-24 10:26:32.684 CET [15120] admin@bara LOG: could not receive data from client: Connection reset by peer
2020-01-24 10:26:32.684 CET [15120] admin@bara LOG: unexpected EOF on client connection with an open transaction
2020-01-24 10:26:32.684 CET [6346] LOG: server process (PID 15114) was terminated by signal 11: Segmentation fault
2020-01-24 10:26:32.684 CET [6346] DETAIL: Failed process was running: UPDATE bara_fdw.person SET (age) = (
SELECT age
FROM person
WHERE bara_fdw.person.name = person.name
);
2020-01-24 10:26:32.684 CET [6346] LOG: terminating any other active server processes
2020-01-24 10:26:32.684 CET [14718] WARNING: terminating connection because of crash of another server process
2020-01-24 10:26:32.684 CET [14718] 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.
2020-01-24 10:26:32.684 CET [14718] HINT: In a moment you should be able to reconnect to the database and repeat your command.
2020-01-24 10:26:32.685 CET [15122] postgres@adam FATAL: the database system is in recovery mode
2020-01-24 10:26:32.685 CET [15120] admin@bara WARNING: terminating connection because of crash of another server process
2020-01-24 10:26:32.685 CET [15120] admin@bara 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.
2020-01-24 10:26:32.685 CET [15120] admin@bara HINT: In a moment you should be able to reconnect to the database and repeat your command.
2020-01-24 10:26:32.686 CET [6346] LOG: all server processes terminated; reinitializing
2020-01-24 10:26:32.700 CET [15123] LOG: database system was interrupted; last known up at 2020-01-24 10:22:48 CET
2020-01-24 10:26:33.204 CET [15123] LOG: database system was not properly shut down; automatic recovery in progress
2020-01-24 10:26:33.208 CET [15123] LOG: redo starts at 0/1926F18
2020-01-24 10:26:33.208 CET [15123] LOG: invalid record length at 0/1926F50: wanted 24, got 0
2020-01-24 10:26:33.208 CET [15123] LOG: redo done at 0/1926F18
2020-01-24 10:26:33.256 CET [6346] LOG: database system is ready to accept connections
reproducer.sql (application/sql, 1.3K) download
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Segfault on updating foreign table
@ 2020-01-26 18:26 Tom Lane <tgl@sss.pgh.pa.us>
parent: Lukáš Sobotka <sobotka.luk@gmail.com>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2020-01-26 18:26 UTC (permalink / raw)
To: Lukáš Sobotka <sobotka.luk@gmail.com>; +Cc: pgsql-bugs@lists.postgresql.org
=?UTF-8?B?THVrw6HFoSBTb2JvdGth?= <sobotka.luk@gmail.com> writes:
> I tried to synchronize two tables on different databases using foreign data
> wrapper. I executed update of foreign table with sub-query selection from
> local table. As the result I got segmentation fault. General query:
> UPDATE foreign_table SET (col) = (
> SELECT col
> FROM local_table
> WHERE foreign_table.id = local_table.id
> );
Yup, that's a bug. Will fix, thanks for the report!
regards, tom lane
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2020-01-26 18:26 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-01-26 07:00 Segfault on updating foreign table Lukáš Sobotka <sobotka.luk@gmail.com>
2020-01-26 18:26 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox