public inbox for [email protected]
help / color / mirror / Atom feedRE: Segmentation fault in PostgreSQL 17.7 during REINDEX TABLE CONCURRENTLY
2+ messages / 2 participants
[nested] [flat]
* RE: Segmentation fault in PostgreSQL 17.7 during REINDEX TABLE CONCURRENTLY
@ 2026-03-20 12:26 Ana Almeida <[email protected]>
2026-03-26 23:44 ` Re: Segmentation fault in PostgreSQL 17.7 during REINDEX TABLE CONCURRENTLY Michael Paquier <[email protected]>
0 siblings, 1 reply; 2+ messages in thread
From: Ana Almeida @ 2026-03-20 12:26 UTC (permalink / raw)
To: Tomas Vondra <[email protected]>; Jim Jones <[email protected]>; [email protected] <[email protected]>; +Cc: Nuno Azevedo <[email protected]>
Hello Tomas,
We used GDB and generated a full backtrace, which we have annexed for reference.
#0 BlockIdGetBlockNumber (blockId=0x7f915c757010, blockId=0x7f915c757010) at ../../../src/include/postgres.h:405
No locals.
#1 ItemPointerGetBlockNumberNoCheck (pointer=<optimized out>) at ../../../src/include/storage/itemptr.h:95
No locals.
#2 ItemPointerGetBlockNumber (pointer=<optimized out>) at ../../../src/include/storage/itemptr.h:106
No locals.
#3 itemptr_encode (itemptr=<optimized out>) at ../../../src/include/catalog/index.h:191
block = <error reading variable block (Cannot access memory at address 0x7f915c757010)>
offset = <error reading variable offset (Cannot access memory at address 0x7f915c757014)>
encoded = <optimized out>
block = <optimized out>
offset = <optimized out>
encoded = <optimized out>
#4 validate_index_callback (itemptr=0x7f915c757010, opaque=0x7fff98611030) at index.c:3425
state = 0x7fff98611030
encoded = <error reading variable encoded (Cannot access memory at address 0x7f915c757010)>
The errors occurred in a test database that was created using pg_restore from a pg_dump of another database.
We executed DELETE, VACUUM, and REINDEX commands multiple times. During one of the executions, the REINDEX operation failed with the error: "could not open file". After this, we dropped and recreated the database and repeated the tests. In one of the executions, the same REINDEX command resulted in segmentation fault, which caused the database to crash. When the REINDEX command failed, it left behind temporary index copies with the _ccnew suffix. We manually dropped these indexes and re-ran the REINDEX command, which then completed successfully.
We also attempted to reproduce the issue by increasing certain parameters, such as maintenance_work_mem and max_parallel_maintenance_workers, suspecting it might be related to server resource constraints. However, we have not yet been able to reproduce the error.
Cumprimentos,
Ana Almeida
-----Original Message-----
From: Tomas Vondra <[email protected]<mailto:[email protected]>>
Sent: 18 March 2026 23:42
To: Ana Almeida <[email protected]<mailto:[email protected]>>; Jim Jones <[email protected]<mailto:[email protected]>>; [email protected]<mailto:[email protected]>
Cc: Nuno Azevedo <[email protected]<mailto:[email protected]>>
Subject: Re: Segmentation fault in PostgreSQL 17.7 during REINDEX TABLE CONCURRENTLY
[You don't often get email from [email protected]<mailto:[email protected]>. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
On 3/18/26 15:54, Ana Almeida wrote:
> Hello Jim,
>
> I didn’t notice that the error showed the schema and table name. For
> confidentiality reasons, could you please not share the schema and
> table name if this is released as a bug?
>
> Here is the information:
>
>
>
> Table
> "myschema.mytable"
>
> Column | Type | Collation | Nullable
> | Default | Storage | Compression | Stats target | Description
>
> --------------------+-----------------------------+-----------
> +----------+---------+----------+-------------+--------------+--------
> +----------+---------+----------+-------------+--------------+-----
>
> id | bigint | | not null
> | | plain | | |
>
> axxxxxx | character varying(32) | | not null
> | | extended | | |
>
> bxx | text | | not null
> | | extended | | |
>
> cxxxxxxx | text | | not null
> | | extended | | |
>
> dxxxxxxxx | text | |
> | | extended | | |
>
> lag_val | text | |
> | | extended | | |
>
> exxxxxxxxxx | text | |
> | | extended | | |
>
> fxxxxxxxxxxxxx | text | |
> | | extended | | |
>
> gxxxxxxxxxxxx | text | |
> | | extended | | |
>
> hxxxxxx | numeric | | not null
> | | main | | |
>
> ixxxxxxxxxxxxxx | numeric | |
> | | main | | |
>
> jxxxxxxxxxxxxxx | numeric | |
> | | main | | |
>
> kxxxxxx | integer | |
> | | plain | | |
>
> lxxxxxxxxxxxx | integer | | not null
> | | plain | | |
>
> mxxxxxxxxxxxxxx | timestamp without time zone | |
> | | plain | | |
>
> nxxxxxxxxxxxxx | timestamp without time zone | |
> | | plain | | |
>
> oxxxxxxxxxxxx | timestamp without time zone | |
> | | plain | | |
>
> pxxxxxxxxxxx | timestamp without time zone | | not null
> | | plain | | |
>
> qr_mydb_id | bigint | |
> | | plain | | |
>
> qxxxxxx | character varying(100) | |
> | | extended | | |
>
> Indexes:
>
> "mytable_pkey" PRIMARY KEY, btree (id)
>
> "idx_lag_val" btree (lag_val)
>
> "idx_mytable_qr_mydb" btree (qr_mydb_id)
>
> Foreign-key constraints:
>
> "fk__mytable__qr_mydb" FOREIGN KEY (qr_mydb_id) REFERENCES
> myschema.qr_mydb(id)
>
> Access method: heap
>
> Options: autovacuum_enabled=true, toast.autovacuum_enabled=true
>
>
>
> Just another note, before we also had the error below in the same
> reindex command. The database didn’t crash when that error happened
> but the reindex failed. After that, we recreated the table.
>
>
>
> ERROR: could not open file "base/179146/184526.4" (target block
> 808464432): previous segment is only 99572 blocks
>
So what was the sequence of events, exactly? You got this "could not open file" error during REINDEX CONCURRENTLY, you recreated the table and then it crashed on some later REINDEX CONCURRENTLY?
How did you recreate the table? Did you reload it from a backup or something else?
>
> We haven’t been able to reproduce the errors again.
>
That suggests it might have been some sort of data corruption, but it's just a guess. Have you checked the server log if there are any messages suggesting e.g. storage / memory issues or something like that?
Per the backtrace you shared in the previous message, the segfault happened here:
#0 0x00000000005d67a8 validate_index_callback (postgres)
#1 0x00000000005738bd btvacuumpage (postgres)
#2 0x0000000000573d8a btvacuumscan (postgres)
#3 0x0000000000573f00 btbulkdelete (postgres)
...
Which is a very heavily exercised code, so I'm somewhat skeptical a bug would go unnoticed for very long. It's possible, of course. But the validate_index_callback doesn't do all that much - it just writes the TID value to a tuplesort / temporary file.
It seems you have the core saved in a file:
> Storage: /var/lib/systemd/coredump/core.postgres.26.0a32...
Can you try inspecting getting a better backtrace using gdb? It might tell us if there's a bogus pointer or something like that. Or maybe not, chances are the compiler optimized some of the variables, but it's worth a try.
regards
--
Tomas Vondra
(gdb) bt full
#0 BlockIdGetBlockNumber (blockId=0x7f915c757010, blockId=0x7f915c757010) at ../../../src/include/postgres.h:405
No locals.
#1 ItemPointerGetBlockNumberNoCheck (pointer=<optimized out>) at ../../../src/include/storage/itemptr.h:95
No locals.
#2 ItemPointerGetBlockNumber (pointer=<optimized out>) at ../../../src/include/storage/itemptr.h:106
No locals.
#3 itemptr_encode (itemptr=<optimized out>) at ../../../src/include/catalog/index.h:191
block = <error reading variable block (Cannot access memory at address 0x7f915c757010)>
offset = <error reading variable offset (Cannot access memory at address 0x7f915c757014)>
encoded = <optimized out>
block = <optimized out>
offset = <optimized out>
encoded = <optimized out>
#4 validate_index_callback (itemptr=0x7f915c757010, opaque=0x7fff98611030) at index.c:3425
state = 0x7fff98611030
encoded = <error reading variable encoded (Cannot access memory at address 0x7f915c757010)>
#5 0x00000000005738bd in btreevacuumposting (nremaining=<synthetic pointer>, updatedoffset=2, posting=0x7f912c453fe0, vstate=0x7fff98610e50) at nbtree.c:1418
i = 0
live = 0
nitem = 48
items = <optimized out>
vacposting = 0x0
live = <optimized out>
nitem = <optimized out>
items = <optimized out>
vacposting = <optimized out>
i = <optimized out>
#6 btvacuumpage (vstate=vstate@entry=0x7fff98610e50, scanblkno=scanblkno@entry=504524) at nbtree.c:1262
vacposting = <optimized out>
nremaining = <optimized out>
itup = 0x7f912c453fe0
ndeletable = 0
nupdatable = 0
nhtidsdead = 0
nhtidslive = 0
deletable = {44328, 559, 0, 0, 44336, 559, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 2432, 39009, 32767, 0, 53151, 159, 0, 0, 4, 0, 0, 0, 7, 0, 0, 0, 24596, 541, 0, 0, 0, 0, 0, 0, 32816, 0, 0, 0, 118, 0, 0, 0, 36896, 541,
0, 0, 32864, 0, 0, 0, 65264, 65535, 65535, 65535, 513, 0, 0, 0, 2052, 0, 21004, 50815, 1, 0, 1, 0, 64, 0, 1, 0, 58862, 2, 0, 0, 1, 0, 58862, 2, 0, 0, 1, 0, 58862, 2, 0, 0, 44800, 43679, 11073, 42135, 32816,
0, 0, 0, 58862, 2, 0, 0, 1, 0 <repeats 11 times>, 64, 39009, 32767, 0, 26232, 562, 0, 0, 9322, 136, 0, 0, 109, 39009, 32767, 0, 16384, 11143, 0, 0, 64, 39009, 32767, 0, 26112, 562, 0, 0, 0, 0, 0, 0, 15128,
136, 0, 0, 16384, 11143, 0, 0, 45556, 131, 0, 0, 64514, 0, 0, 0, 64, 39009, 32767, 0, 1, 0, 0, 0, 50050, 131, 0, 0, 64514, 0, 0, 0, 48140, 159, 0, 0, 1, 0, 0, 0, 6, 0, 0, 0, 58, 0, 0, 0, 1696, 39009, 32767,
0, 0...}
updatable = {0x7fff98610840, 0x0, 0xa16761, 0xa1675c, 0x7f0000000101, 0x0, 0x1, 0x100030000, 0x3b600000000, 0x56b350 <btoidcmp>, 0x1000200000164, 0x2, 0x0, 0x2217a00, 0x22bc038, 0x2fb3c, 0x1c, 0x0, 0x0,
0x7f91356b7400, 0x1c, 0x2fb3e, 0x200030000, 0x3b600000000, 0x56b1d0 <btint2cmp>, 0x100020000015e, 0x2, 0x0, 0x2217a00, 0x22a9700, 0x2, 0x100030000, 0x3b600000000, 0x56b350 <btoidcmp>, 0x1000200000164, 0x2,
0x0, 0x2217a00, 0x22bc038, 0x2fb3e, 0x7fff986103ff, 0x7fff986103e0, 0x7fff986107df, 0x0, 0x3631000000000000, 0x3836323133383733, 0x4b0010000010000b, 0xa4972b41aa9faf00, 0x0, 0x0, 0x7fff986109a0, 0x0,
0xb4f455, 0xb4f453, 0x7fff98610950, 0x9fc5df <dopr+1647>, 0x0, 0x0, 0x7fff98610950, 0x9fbfe7 <dopr+119>, 0x101, 0x0, 0x1, 0x100030000, 0x3b600000000, 0x56b350 <btoidcmp>, 0x1000200000164, 0x2, 0x101, 0x0,
0x1, 0x100030000, 0x3b600000000, 0x56b350 <btoidcmp>, 0x1000200000164, 0x2, 0x0, 0x2217a00, 0x22ab898, 0x2fb3c, 0x7fff98610e40, 0x9fcf9f <pg_vsnprintf+95>, 0x7fff98610969, 0x7fff98610940, 0x7f0001000101,
0x0, 0x7f0000000002, 0x100030000, 0x3b600000000, 0x56b350 <btoidcmp>, 0x1000200000164, 0x2, 0x0, 0x2217a00, 0x22a96b8, 0x2fb3c, 0x200020000, 0x3b600000000, 0x56b1d0 <btint2cmp>, 0x100020000015e, 0x2, 0x0,
0x2217a00, 0x22a9700, 0x0, 0x7fff98610b90, 0x1, 0x9fbd71 <fmtint+289>, 0x1000101, 0x0, 0x7fff98610530, 0x1, 0xa000011, 0x83ca70 <FileReadV+96>, 0x0, 0x0, 0x3a000, 0x9fbc0c <dostr+124>, 0x1d, 0x1, 0x3f,
0x7fff98610c10, 0x1, 0x9fbd71 <fmtint+289>, 0x3a, 0x98610c30, 0x0, 0x9fbd71 <fmtint+289>, 0x7f9126230000, 0x2000, 0x14000, 0x2226fe0, 0x7fff986108d0, 0x343833353931000a, 0x7f912615c000, 0xa4972b41aa9faf00,
0x7f9126110000, 0x0, 0x7fff98610c90, 0x0, 0xa16761, 0xa1675c, 0x7fff98610c10, 0x9fc5df <dopr+1647>, 0x0, 0x0, 0x7fff98610c10, 0x9fbfe7 <dopr+119>, 0x0, 0x0, 0x98610c30, 0x0, 0x0, 0x7f91356b7400, 0x1c, 0x0,
0x0, 0x7f91356b7400, 0x1c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xa4972b41aa9faf00, 0x0, 0x80, 0xbbfd9b, 0x7f91356b7400, 0x1, 0x0, 0xbbfd9b, 0x0, 0x7fff98610730, 0x1, 0xa000011, 0x83ca70 <FileReadV+96>, 0x0, 0x0,
0x80000, 0x7fff98610730, 0x40, 0x1, 0x22a6450, 0x832f25 <LockBufHdr+133>, 0x0, 0x0, 0xb4d907, 0x166e, 0xb4d970 <__func__.20452>, 0xa4972b41aa9faf00, 0x7f9124961340, 0x1, 0x1000000,
0x832fdc <TerminateBufferIO+140>, 0x0, 0x1d, 0x7fff986107d0, 0x7f9126230000...}
offnum = 2
minoff = 2
maxoff = 367
info = 0x7fff98611050
stats = 0x2217c30
callback = 0x5d67a0 <validate_index_callback>
callback_state = 0x7fff98611030
rel = <optimized out>
heaprel = 0x7f912340ff58
attempt_pagedel = false
blkno = 504524
backtrack_to = 0
buf = 15633
page = 0x7f912c452000 ""
opaque = 0x7f912c453ff0
__func__ = "btvacuumpage"
#7 0x0000000000573d8a in btvacuumscan (info=info@entry=0x7fff98611050, stats=stats@entry=0x2217c30, callback=callback@entry=0x5d67a0 <validate_index_callback>, callback_state=callback_state@entry=0x7fff98611030, cycleid=<optimized out>) at nbtree.c:1036
rel = 0x7f9135531a78
vstate = {info = 0x7fff98611050, stats = 0x2217c30, callback = 0x5d67a0 <validate_index_callback>, callback_state = 0x7fff98611030, cycleid = 49620, pagedelcontext = 0x22d5cb0, bufsize = 256, maxbufsize = 262144, pendingpages = 0x2218500, npendingpages = 0}
num_pages = 525666
scanblkno = 504524
needLock = true
#8 0x0000000000573f00 in btbulkdelete (info=0x7fff98611050, stats=0x2217c30, callback=0x5d67a0 <validate_index_callback>, callback_state=0x7fff98611030) at nbtree.c:837
_save_exception_stack = <optimized out>
_save_context_stack = <optimized out>
_local_sigjmp_buf = {{__jmpbuf = {140261338447704, 561272429210479929, 35750360, 140735749886080, 140735749886112, 35748600, 510965219158109497, -511052709365174983}, __mask_was_saved = 0, __saved_mask = {__val= {11859995704738950912, 36577824, 0, 20, 10346183, 0, 35748352, 1769526525952, 0, 2252899325313024, 11859995704738950912, 0, 140261338447704, 140261641624184, 5680483, 140261338447704}}}}
_do_rethrow = <optimized out>
rel = <optimized out>
cycleid = <optimized out>
#9 0x00000000005d9873 in validate_index (heapId=<optimized out>, indexId=<optimized out>, snapshot=snapshot@entry=0x2217af8) at index.c:3367
heapRelation = 0x7f912340ff58
indexRelation = 0x7f9135531a78
indexInfo = 0x22181d8
ivinfo = {index = 0x7f9135531a78, heaprel = 0x7f912340ff58, analyze_only = false, report_progress = true, estimated_count = true, message_level = 13, num_heap_tuples = 72923720, strategy = 0x0}
state = {tuplesort = 0x22e1e18, htups = 0, itups = 69990900, tups_inserted = 0}
save_userid = 10
save_sec_context = 0
save_nestlevel = 2
__func__ = "validate_index"
#10 0x000000000066b583 in ReindexRelationConcurrently (stmt=0x21ef740, relationOid=<optimized out>, params=<optimized out>, params=<optimized out>) at indexcmds.c:4056
newidx = 0x2222100
limitXmin = <optimized out>
snapshot = 0x2217af8
lc__state = {l = <optimized out>, i = 1}
heapRelationIds = 0x2221f48
indexIds = <optimized out>
newIndexIds = <optimized out>
relationLocks = 0x22220a8
lockTags = <optimized out>
lc = <optimized out>
lc2 = <optimized out>
private_context = 0x2221e50
oldcontext = <optimized out>
relkind = 114 'r'
relationName = 0x0
relationNamespace = 0x0
ru0 = {tv = {tv_sec = 140735749886432, tv_usec = 10029632}, ru = {ru_utime = {tv_sec = 1690, tv_usec = 8704357}, ru_stime = {tv_sec = 4, tv_usec = -6586748368970600704}, {ru_maxrss = 2919286719, __ru_maxrss_word = 2919286719}, {ru_ixrss = -6586748368970600704, __ru_ixrss_word = -6586748368970600704}, {ru_idrss = 4, __ru_idrss_word = 4}, {ru_isrss = 193366, __ru_isrss_word = 193366}, {ru_minflt = 4, __ru_minflt_word = 4}, {ru_majflt = 0, __ru_majflt_word = 0}, {ru_nswap = 1690, __ru_nswap_word = 1690}, {ru_inblock = 8724663, __ru_inblock_word = 8724663}, {ru_oublock = 1690, __ru_oublock_word = 1690}, {ru_msgsnd = 35740584, __ru_msgsnd_word =35740584}, {ru_msgrcv = 830500646348270, __ru_msgrcv_word = 830500646348270}, {ru_nsignals = 10015845, __ru_nsignals_word = 10015845}, {ru_nvcsw = 193366, __ru_nvcsw_word = 193366}, {ru_nivcsw = -6586748368970600704, __ru_nivcsw_word = -6586748368970600704}}}
progress_index = {0, 9, 6, 8}
progress_vals = {4, 4, 195388, 403}
__func__ = "ReindexRelationConcurrently"
#11 0x000000000066c784 in ReindexTable (isTopLevel=true, params=0x7fff98611314, stmt=0x21ef740) at indexcmds.c:2943
heapOid = 193366
result = <optimized out>
relation = 0x21ef6f8
heapOid = <optimized out>
result = <optimized out>
relation = <optimized out>
__func__ = "ReindexTable"
__errno_location = <optimized out>
newparams = <optimized out>
__errno_location = <optimized out>
#12 ExecReindex (pstate=pstate@entry=0x2219f48, stmt=stmt@entry=0x21ef740, isTopLevel=isTopLevel@entry=true) at indexcmds.c:2758
params = {options = 8, tablespaceOid = 0}
lc = <optimized out>
concurrently = <optimized out>
verbose = <optimized out>
tablespacename = <optimized out>
__func__ = "ExecReindex"
#13 0x0000000000870d2f in ProcessUtilitySlow (pstate=0x2219f48, pstmt=0x21ef868, queryString=0x21eecb8 "REINDEX TABLE CONCURRENTLY myschema.mytable;", context=PROCESS_UTILITY_TOPLEVEL, params=0x0, queryEnv=0x0, qc=0x7fff98611960, dest=<optimized out>) at utility.c:1567
_save_exception_stack = 0x7fff98611810
_save_context_stack = 0x0
_local_sigjmp_buf = {{__jmpbuf = {0, -511047682296402631, 35581112, 0, 35757896, 35583808, 510965219321687353, -511050922500313799}, __mask_was_saved = 0, __saved_mask = {__val = {35693816, 140261501560768, 140261501569088, 1, 8913126, 140261501536240, 140735749887328, 140261501560768, 8914115, 0, 0, 0, 0, 0, 0, 0}}}}
_do_rethrow = false
parsetree = 0x21ef740
isTopLevel = true
isCompleteQuery = true
needCleanup = false
commandCollected = false
address = {classId = 10018115, objectId = 0, objectSubId = 894507120}
secondaryObject = {classId = 0, objectId = 0, objectSubId = 0}
__func__ = "ProcessUtilitySlow"
#14 0x000000000086fa60 in standard_ProcessUtility (pstmt=0x21ef868, queryString=0x21eecb8 "REINDEX TABLE CONCURRENTLY myschema.mytable;", readOnlyTree=<optimized out>, context=PROCESS_UTILITY_TOPLEVEL, params=0x0, queryEnv=0x0, dest=0x21efc08, qc=0x7fff98611960) at utility.c:1067
parsetree = 0x21ef740
isTopLevel = <optimized out>
isAtomicContext = false
pstate = 0x2219f48
readonly_flags = <optimized out>
__func__ = "standard_ProcessUtility"
#15 0x000000000086e4cf in PortalRunUtility (portal=portal@entry=0x227a308, pstmt=pstmt@entry=0x21ef868, isTopLevel=isTopLevel@entry=true, setHoldSnapshot=setHoldSnapshot@entry=false, dest=0x21efc08, qc=0x7fff98611960) at pquery.c:1156
No locals.
#16 0x000000000086e603 in PortalRunMulti (portal=portal@entry=0x227a308, isTopLevel=isTopLevel@entry=true, setHoldSnapshot=setHoldSnapshot@entry=false, dest=dest@entry=0x21efc08, altdest=altdest@entry=0x21efc08, qc=qc@entry=0x7fff98611960) at pquery.c:1313
pstmt = 0x21ef868
stmtlist_item__state = {l = 0x21efbc0, i = 0}
active_snapshot_set = <optimized out>
stmtlist_item = 0x21efbd8
#17 0x000000000086eb5b in PortalRun (portal=0x227a308, count=9223372036854775807, isTopLevel=<optimized out>, run_once=<optimized out>, dest=0x21efc08, altdest=0x21efc08, qc=0x7fff98611960) at pquery.c:789
_save_exception_stack = 0x7fff98611c30
_save_context_stack = 0x0
_local_sigjmp_buf = {{__jmpbuf = {0, -511047682348831431, 36152072, 35585032, 0, 35584032, 510965219468487993, -511050912626528967}, __mask_was_saved = 0, __saved_mask = {__val = {36163608, 0, 0, 12209118, 36160280, 12209118, 36152072, 12209118, 1, 1, 0, 35584032, 10290902, 35581112, 11859995704738950912, 35583992}}}}
_do_rethrow = <optimized out>
result = <optimized out>
nprocessed = <optimized out>
saveTopTransactionResourceOwner = 0x2239818
saveTopTransactionContext = 0x2217a00
saveActivePortal = 0x0
saveResourceOwner = 0x2239818
savePortalContext = 0x0
saveMemoryContext = 0x2217a00
__func__ = "PortalRun"
#18 0x000000000086adab in exec_simple_query ()
No symbol table info available.
#19 0x000000000086c598 in PostgresMain ()
No symbol table info available.
#20 0x00000000008672b5 in BackendMain (startup_data=<optimized out>, startup_data_len=<optimized out>) at backend_startup.c:105
bsdata = <optimized out>
#21 0x00000000007d850f in postmaster_child_launch (child_type=child_type@entry=B_BACKEND, startup_data=startup_data@entry=0x7fff98611e40 "", startup_data_len=startup_data_len@entry=4, client_sock=client_sock@entry=0x7fff98611e60) at launch_backend.c:277
pid = <optimized out>
#22 0x00000000007dbe5c in BackendStartup (client_sock=0x7fff98611e60) at postmaster.c:3596
bn = 0x2218088
pid = <optimized out>
startup_data = {canAcceptConnections = CAC_OK}
bn = <optimized out>
pid = <optimized out>
startup_data = <optimized out>
__func__ = "BackendStartup"
__errno_location = <optimized out>
__errno_location = <optimized out>
save_errno = <optimized out>
__errno_location = <optimized out>
__errno_location = <optimized out>
#23 ServerLoop () at postmaster.c:1678
s = {sock = 12, raddr = {addr = {ss_family = 1, __ss_padding = "\000\000\000\000\000\000\001", '\000' <repeats 15 times>, "\377\377\377\377", '\000' <repeats 12 times>, "\300\350\060\062\221\177\000\000\340Sl5\221\177\000\000\000\000\000\000\000\000\000\000\340\036a\230\377\177\000\000@\271\036\002\000\000\000\000\005\000\000\000\000\000\000\000\360C!\002\000\000\000\000-\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000H\037a\230\377\177\000", __ss_align = 33912848}, salen = 2}}
i = <optimized out>
now = <optimized out>
last_lockfile_recheck_time = 1773767263
last_touch_time = 1773764548
events = {{pos = 3, events = 2, fd = 9, user_data = 0x0}, {pos = 0, events = 0, fd = 35762608, user_data = 0x0}, {pos = -1738465449, events = 32767, fd = 843181742, user_data = 0x7fff98611fac}, {pos = -1738465360, events = 32767, fd = 6, user_data = 0x221b1b1}, {pos = 0, events = 0, fd = -1432375552, user_data = 0x0}, {pos = -1738465308, events = 32767, fd = -1738464672, user_data = 0x7f913241f64b <__inet_pton_length+363>}, {pos = -1738464416, events = 32767, fd = -1738465308, user_data = 0x0}, {pos = 0, events = 16777216, fd = -1738465280, user_data = 0xa4972b41aa9faf00}, {pos = -1738463184, events = 32767, fd = -1738464672, user_data = 0x0}, {pos = 842963042, events = 32657, fd = 0, user_data = 0x0}, {pos = 10, events = 0, fd = 0, user_data = 0x1000000}, {pos = -1738465220, events = 32767, fd = 0, user_data = 0x3}, {pos = 0, events = 0, fd = -1738464032, user_data = 0x7fff98612000}, {pos = 2, events = 17, fd = 0, user_data = 0x2f7365726774736f}, {pos = -1738465248, events = 32767, fd = 1, user_data = 0x3631363200000000}, {pos = 542979894, events = 977751884, fd = 0, user_data = 0x221a2b0}, {pos = 111, events = 0, fd = 81, user_data = 0x4c2f382d4654552e}, {pos = 1162698563, events = 1195463507, fd = -1738465024, user_data = 0x0}, {pos = -1738464524, events = 32767, fd = 0, user_data = 0x2223f98}, {pos = 35798936, events = 0, fd = 10, user_data = 0x4c}, {pos = 28, events = 0, fd = 35771272, user_data = 0x7fff98612040}, {pos = -1738465328, events = 32767, fd = 0, user_data = 0x0}, {pos = 0, events = 0, fd = 0, user_data = 0x0}, {pos = 0, events = 0, fd = 0, user_data = 0x0}, {pos = 0, events = 0, fd = 0, user_data = 0x11}, {pos = 896234496, events = 32657, fd = 17, user_data = 0x0}, {pos = 0, events = 0, fd = 0, user_data = 0x0}, {pos = 0, events = 0, fd = 2, user_data = 0x80000000000000e6}, {pos = 0, events = 0, fd = 0, user_data = 0x0}, {pos = 0, events = 0, fd = 0, user_data = 0x0}, {pos = 35477512, events = 0, fd = 4144, user_data = 0xfffffffffffffef0}, {pos = 64, events = 0, fd = 257, user_data = 0x7c00000063}, {pos = 8, events = 0, fd = 0, user_data = 0x1}, {pos = 119, events = 111, fd = 0, user_data = 0xff}, {pos = 4096, events = 0, fd =-1432375552, user_data = 0x7fff98612440}, {pos = 35801856, events = 0, fd = 0, user_data = 0x7fff98612830}, {pos = -1738464400, events = 32767, fd = 35798936, user_data = 0x7fff986127b0}, {pos = 842969988, events = 32657, fd = 64514, user_data = 0x1002412d}, {pos = 1, events = 0, fd = 33152, user_data = 0x1a}, {pos = 0, events = 0, fd = 0, user_data = 0x7fff98612818}, {pos = 0, events = 0, fd = 1772535786, user_data = 0x3182e417f}, {pos = 0, events = 0, fd = 0, user_data = 0x7fff98612360}, {pos = 35479572, events = 0, fd = 0, user_data = 0x100008030}, {pos = 35763456, events = 0, fd = 0, user_data = 0x0}, {pos = -272, events = 4294967295, fd = 513,user_data = 0x23100000804}, {pos = 155, events = 124, fd = 64, user_data = 0x1}, {pos = 8, events = 0, fd = 120, user_data = 0x7fff98612440}, {pos = 2050, events = 0, fd = -1738464400, user_data = 0x400}, {pos = 1, events = 0, fd = 11854712, user_data = 0x2}, {pos = 842572510, events = 32657, fd = -1738464288, user_data = 0x8000}, {pos = 11, events = 0, fd = 842826346, user_data = 0x7fff986128f3}, {pos = 11, events = 0, fd = -1738464288, user_data = 0xa15c49}, {pos = 10574921, events = 0, fd = 842826605, user_data = 0xfc02}, {pos = 1739, events = 0, fd = 2, user_data = 0x1a000041c0}, {pos = 26, events = 0, fd = 0, user_data = 0x6}, {pos = 4096, events = 0, fd = 0, user_data = 0x69a6bd0a}, {pos = 11002984, events = 0, fd = 1772535049, user_data = 0x3689cf44}, {pos = 1772535338, events = 1, fd = 861859618, user_data = 0x0}, {pos = 0, events = 0, fd = -1432375552, user_data = 0x2219b90}, {pos = 11, events = 0, fd = 35788352, user_data = 0xa15c49}, {pos = 12101867, events = 0, fd = 10628966, user_data = 0x222169b}, {pos = 842826833, events = 32657, fd = 35589072, user_data = 0x83b28d <FreeDesc+29>}, {pos = -1738464048, events = 32767, fd = 842568043, user_data = 0x2222250}, {pos = 7, events = 0, fd = 35475982, user_data = 0x0}}
nevents = <optimized out>
__func__ = "ServerLoop"
#24 0x00000000007dda78 in PostmasterMain (argc=argc@entry=3, argv=argv@entry=0x21e7810) at postmaster.c:1376
opt = <optimized out>
status = <optimized out>
userDoption = <optimized out>
listen_addr_saved = <optimized out>
output_config_variable = <optimized out>
__func__ = "PostmasterMain"
#25 0x000000000050f843 in main (argc=3, argv=0x21e7810) at main.c:199
No locals.
Attachments:
[text/plain] bt_core_postgresql.txt (19.5K, 3-bt_core_postgresql.txt)
download | inline:
(gdb) bt full
#0 BlockIdGetBlockNumber (blockId=0x7f915c757010, blockId=0x7f915c757010) at ../../../src/include/postgres.h:405
No locals.
#1 ItemPointerGetBlockNumberNoCheck (pointer=<optimized out>) at ../../../src/include/storage/itemptr.h:95
No locals.
#2 ItemPointerGetBlockNumber (pointer=<optimized out>) at ../../../src/include/storage/itemptr.h:106
No locals.
#3 itemptr_encode (itemptr=<optimized out>) at ../../../src/include/catalog/index.h:191
block = <error reading variable block (Cannot access memory at address 0x7f915c757010)>
offset = <error reading variable offset (Cannot access memory at address 0x7f915c757014)>
encoded = <optimized out>
block = <optimized out>
offset = <optimized out>
encoded = <optimized out>
#4 validate_index_callback (itemptr=0x7f915c757010, opaque=0x7fff98611030) at index.c:3425
state = 0x7fff98611030
encoded = <error reading variable encoded (Cannot access memory at address 0x7f915c757010)>
#5 0x00000000005738bd in btreevacuumposting (nremaining=<synthetic pointer>, updatedoffset=2, posting=0x7f912c453fe0, vstate=0x7fff98610e50) at nbtree.c:1418
i = 0
live = 0
nitem = 48
items = <optimized out>
vacposting = 0x0
live = <optimized out>
nitem = <optimized out>
items = <optimized out>
vacposting = <optimized out>
i = <optimized out>
#6 btvacuumpage (vstate=vstate@entry=0x7fff98610e50, scanblkno=scanblkno@entry=504524) at nbtree.c:1262
vacposting = <optimized out>
nremaining = <optimized out>
itup = 0x7f912c453fe0
ndeletable = 0
nupdatable = 0
nhtidsdead = 0
nhtidslive = 0
deletable = {44328, 559, 0, 0, 44336, 559, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 2432, 39009, 32767, 0, 53151, 159, 0, 0, 4, 0, 0, 0, 7, 0, 0, 0, 24596, 541, 0, 0, 0, 0, 0, 0, 32816, 0, 0, 0, 118, 0, 0, 0, 36896, 541,
0, 0, 32864, 0, 0, 0, 65264, 65535, 65535, 65535, 513, 0, 0, 0, 2052, 0, 21004, 50815, 1, 0, 1, 0, 64, 0, 1, 0, 58862, 2, 0, 0, 1, 0, 58862, 2, 0, 0, 1, 0, 58862, 2, 0, 0, 44800, 43679, 11073, 42135, 32816,
0, 0, 0, 58862, 2, 0, 0, 1, 0 <repeats 11 times>, 64, 39009, 32767, 0, 26232, 562, 0, 0, 9322, 136, 0, 0, 109, 39009, 32767, 0, 16384, 11143, 0, 0, 64, 39009, 32767, 0, 26112, 562, 0, 0, 0, 0, 0, 0, 15128,
136, 0, 0, 16384, 11143, 0, 0, 45556, 131, 0, 0, 64514, 0, 0, 0, 64, 39009, 32767, 0, 1, 0, 0, 0, 50050, 131, 0, 0, 64514, 0, 0, 0, 48140, 159, 0, 0, 1, 0, 0, 0, 6, 0, 0, 0, 58, 0, 0, 0, 1696, 39009, 32767,
0, 0...}
updatable = {0x7fff98610840, 0x0, 0xa16761, 0xa1675c, 0x7f0000000101, 0x0, 0x1, 0x100030000, 0x3b600000000, 0x56b350 <btoidcmp>, 0x1000200000164, 0x2, 0x0, 0x2217a00, 0x22bc038, 0x2fb3c, 0x1c, 0x0, 0x0,
0x7f91356b7400, 0x1c, 0x2fb3e, 0x200030000, 0x3b600000000, 0x56b1d0 <btint2cmp>, 0x100020000015e, 0x2, 0x0, 0x2217a00, 0x22a9700, 0x2, 0x100030000, 0x3b600000000, 0x56b350 <btoidcmp>, 0x1000200000164, 0x2,
0x0, 0x2217a00, 0x22bc038, 0x2fb3e, 0x7fff986103ff, 0x7fff986103e0, 0x7fff986107df, 0x0, 0x3631000000000000, 0x3836323133383733, 0x4b0010000010000b, 0xa4972b41aa9faf00, 0x0, 0x0, 0x7fff986109a0, 0x0,
0xb4f455, 0xb4f453, 0x7fff98610950, 0x9fc5df <dopr+1647>, 0x0, 0x0, 0x7fff98610950, 0x9fbfe7 <dopr+119>, 0x101, 0x0, 0x1, 0x100030000, 0x3b600000000, 0x56b350 <btoidcmp>, 0x1000200000164, 0x2, 0x101, 0x0,
0x1, 0x100030000, 0x3b600000000, 0x56b350 <btoidcmp>, 0x1000200000164, 0x2, 0x0, 0x2217a00, 0x22ab898, 0x2fb3c, 0x7fff98610e40, 0x9fcf9f <pg_vsnprintf+95>, 0x7fff98610969, 0x7fff98610940, 0x7f0001000101,
0x0, 0x7f0000000002, 0x100030000, 0x3b600000000, 0x56b350 <btoidcmp>, 0x1000200000164, 0x2, 0x0, 0x2217a00, 0x22a96b8, 0x2fb3c, 0x200020000, 0x3b600000000, 0x56b1d0 <btint2cmp>, 0x100020000015e, 0x2, 0x0,
0x2217a00, 0x22a9700, 0x0, 0x7fff98610b90, 0x1, 0x9fbd71 <fmtint+289>, 0x1000101, 0x0, 0x7fff98610530, 0x1, 0xa000011, 0x83ca70 <FileReadV+96>, 0x0, 0x0, 0x3a000, 0x9fbc0c <dostr+124>, 0x1d, 0x1, 0x3f,
0x7fff98610c10, 0x1, 0x9fbd71 <fmtint+289>, 0x3a, 0x98610c30, 0x0, 0x9fbd71 <fmtint+289>, 0x7f9126230000, 0x2000, 0x14000, 0x2226fe0, 0x7fff986108d0, 0x343833353931000a, 0x7f912615c000, 0xa4972b41aa9faf00,
0x7f9126110000, 0x0, 0x7fff98610c90, 0x0, 0xa16761, 0xa1675c, 0x7fff98610c10, 0x9fc5df <dopr+1647>, 0x0, 0x0, 0x7fff98610c10, 0x9fbfe7 <dopr+119>, 0x0, 0x0, 0x98610c30, 0x0, 0x0, 0x7f91356b7400, 0x1c, 0x0,
0x0, 0x7f91356b7400, 0x1c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xa4972b41aa9faf00, 0x0, 0x80, 0xbbfd9b, 0x7f91356b7400, 0x1, 0x0, 0xbbfd9b, 0x0, 0x7fff98610730, 0x1, 0xa000011, 0x83ca70 <FileReadV+96>, 0x0, 0x0,
0x80000, 0x7fff98610730, 0x40, 0x1, 0x22a6450, 0x832f25 <LockBufHdr+133>, 0x0, 0x0, 0xb4d907, 0x166e, 0xb4d970 <__func__.20452>, 0xa4972b41aa9faf00, 0x7f9124961340, 0x1, 0x1000000,
0x832fdc <TerminateBufferIO+140>, 0x0, 0x1d, 0x7fff986107d0, 0x7f9126230000...}
offnum = 2
minoff = 2
maxoff = 367
info = 0x7fff98611050
stats = 0x2217c30
callback = 0x5d67a0 <validate_index_callback>
callback_state = 0x7fff98611030
rel = <optimized out>
heaprel = 0x7f912340ff58
attempt_pagedel = false
blkno = 504524
backtrack_to = 0
buf = 15633
page = 0x7f912c452000 ""
opaque = 0x7f912c453ff0
__func__ = "btvacuumpage"
#7 0x0000000000573d8a in btvacuumscan (info=info@entry=0x7fff98611050, stats=stats@entry=0x2217c30, callback=callback@entry=0x5d67a0 <validate_index_callback>, callback_state=callback_state@entry=0x7fff98611030, cycleid=<optimized out>) at nbtree.c:1036
rel = 0x7f9135531a78
vstate = {info = 0x7fff98611050, stats = 0x2217c30, callback = 0x5d67a0 <validate_index_callback>, callback_state = 0x7fff98611030, cycleid = 49620, pagedelcontext = 0x22d5cb0, bufsize = 256, maxbufsize = 262144, pendingpages = 0x2218500, npendingpages = 0}
num_pages = 525666
scanblkno = 504524
needLock = true
#8 0x0000000000573f00 in btbulkdelete (info=0x7fff98611050, stats=0x2217c30, callback=0x5d67a0 <validate_index_callback>, callback_state=0x7fff98611030) at nbtree.c:837
_save_exception_stack = <optimized out>
_save_context_stack = <optimized out>
_local_sigjmp_buf = {{__jmpbuf = {140261338447704, 561272429210479929, 35750360, 140735749886080, 140735749886112, 35748600, 510965219158109497, -511052709365174983}, __mask_was_saved = 0, __saved_mask = {__val= {11859995704738950912, 36577824, 0, 20, 10346183, 0, 35748352, 1769526525952, 0, 2252899325313024, 11859995704738950912, 0, 140261338447704, 140261641624184, 5680483, 140261338447704}}}}
_do_rethrow = <optimized out>
rel = <optimized out>
cycleid = <optimized out>
#9 0x00000000005d9873 in validate_index (heapId=<optimized out>, indexId=<optimized out>, snapshot=snapshot@entry=0x2217af8) at index.c:3367
heapRelation = 0x7f912340ff58
indexRelation = 0x7f9135531a78
indexInfo = 0x22181d8
ivinfo = {index = 0x7f9135531a78, heaprel = 0x7f912340ff58, analyze_only = false, report_progress = true, estimated_count = true, message_level = 13, num_heap_tuples = 72923720, strategy = 0x0}
state = {tuplesort = 0x22e1e18, htups = 0, itups = 69990900, tups_inserted = 0}
save_userid = 10
save_sec_context = 0
save_nestlevel = 2
__func__ = "validate_index"
#10 0x000000000066b583 in ReindexRelationConcurrently (stmt=0x21ef740, relationOid=<optimized out>, params=<optimized out>, params=<optimized out>) at indexcmds.c:4056
newidx = 0x2222100
limitXmin = <optimized out>
snapshot = 0x2217af8
lc__state = {l = <optimized out>, i = 1}
heapRelationIds = 0x2221f48
indexIds = <optimized out>
newIndexIds = <optimized out>
relationLocks = 0x22220a8
lockTags = <optimized out>
lc = <optimized out>
lc2 = <optimized out>
private_context = 0x2221e50
oldcontext = <optimized out>
relkind = 114 'r'
relationName = 0x0
relationNamespace = 0x0
ru0 = {tv = {tv_sec = 140735749886432, tv_usec = 10029632}, ru = {ru_utime = {tv_sec = 1690, tv_usec = 8704357}, ru_stime = {tv_sec = 4, tv_usec = -6586748368970600704}, {ru_maxrss = 2919286719, __ru_maxrss_word = 2919286719}, {ru_ixrss = -6586748368970600704, __ru_ixrss_word = -6586748368970600704}, {ru_idrss = 4, __ru_idrss_word = 4}, {ru_isrss = 193366, __ru_isrss_word = 193366}, {ru_minflt = 4, __ru_minflt_word = 4}, {ru_majflt = 0, __ru_majflt_word = 0}, {ru_nswap = 1690, __ru_nswap_word = 1690}, {ru_inblock = 8724663, __ru_inblock_word = 8724663}, {ru_oublock = 1690, __ru_oublock_word = 1690}, {ru_msgsnd = 35740584, __ru_msgsnd_word =35740584}, {ru_msgrcv = 830500646348270, __ru_msgrcv_word = 830500646348270}, {ru_nsignals = 10015845, __ru_nsignals_word = 10015845}, {ru_nvcsw = 193366, __ru_nvcsw_word = 193366}, {ru_nivcsw = -6586748368970600704, __ru_nivcsw_word = -6586748368970600704}}}
progress_index = {0, 9, 6, 8}
progress_vals = {4, 4, 195388, 403}
__func__ = "ReindexRelationConcurrently"
#11 0x000000000066c784 in ReindexTable (isTopLevel=true, params=0x7fff98611314, stmt=0x21ef740) at indexcmds.c:2943
heapOid = 193366
result = <optimized out>
relation = 0x21ef6f8
heapOid = <optimized out>
result = <optimized out>
relation = <optimized out>
__func__ = "ReindexTable"
__errno_location = <optimized out>
newparams = <optimized out>
__errno_location = <optimized out>
#12 ExecReindex (pstate=pstate@entry=0x2219f48, stmt=stmt@entry=0x21ef740, isTopLevel=isTopLevel@entry=true) at indexcmds.c:2758
params = {options = 8, tablespaceOid = 0}
lc = <optimized out>
concurrently = <optimized out>
verbose = <optimized out>
tablespacename = <optimized out>
__func__ = "ExecReindex"
#13 0x0000000000870d2f in ProcessUtilitySlow (pstate=0x2219f48, pstmt=0x21ef868, queryString=0x21eecb8 "REINDEX TABLE CONCURRENTLY myschema.mytable;", context=PROCESS_UTILITY_TOPLEVEL, params=0x0, queryEnv=0x0, qc=0x7fff98611960, dest=<optimized out>) at utility.c:1567
_save_exception_stack = 0x7fff98611810
_save_context_stack = 0x0
_local_sigjmp_buf = {{__jmpbuf = {0, -511047682296402631, 35581112, 0, 35757896, 35583808, 510965219321687353, -511050922500313799}, __mask_was_saved = 0, __saved_mask = {__val = {35693816, 140261501560768, 140261501569088, 1, 8913126, 140261501536240, 140735749887328, 140261501560768, 8914115, 0, 0, 0, 0, 0, 0, 0}}}}
_do_rethrow = false
parsetree = 0x21ef740
isTopLevel = true
isCompleteQuery = true
needCleanup = false
commandCollected = false
address = {classId = 10018115, objectId = 0, objectSubId = 894507120}
secondaryObject = {classId = 0, objectId = 0, objectSubId = 0}
__func__ = "ProcessUtilitySlow"
#14 0x000000000086fa60 in standard_ProcessUtility (pstmt=0x21ef868, queryString=0x21eecb8 "REINDEX TABLE CONCURRENTLY myschema.mytable;", readOnlyTree=<optimized out>, context=PROCESS_UTILITY_TOPLEVEL, params=0x0, queryEnv=0x0, dest=0x21efc08, qc=0x7fff98611960) at utility.c:1067
parsetree = 0x21ef740
isTopLevel = <optimized out>
isAtomicContext = false
pstate = 0x2219f48
readonly_flags = <optimized out>
__func__ = "standard_ProcessUtility"
#15 0x000000000086e4cf in PortalRunUtility (portal=portal@entry=0x227a308, pstmt=pstmt@entry=0x21ef868, isTopLevel=isTopLevel@entry=true, setHoldSnapshot=setHoldSnapshot@entry=false, dest=0x21efc08, qc=0x7fff98611960) at pquery.c:1156
No locals.
#16 0x000000000086e603 in PortalRunMulti (portal=portal@entry=0x227a308, isTopLevel=isTopLevel@entry=true, setHoldSnapshot=setHoldSnapshot@entry=false, dest=dest@entry=0x21efc08, altdest=altdest@entry=0x21efc08, qc=qc@entry=0x7fff98611960) at pquery.c:1313
pstmt = 0x21ef868
stmtlist_item__state = {l = 0x21efbc0, i = 0}
active_snapshot_set = <optimized out>
stmtlist_item = 0x21efbd8
#17 0x000000000086eb5b in PortalRun (portal=0x227a308, count=9223372036854775807, isTopLevel=<optimized out>, run_once=<optimized out>, dest=0x21efc08, altdest=0x21efc08, qc=0x7fff98611960) at pquery.c:789
_save_exception_stack = 0x7fff98611c30
_save_context_stack = 0x0
_local_sigjmp_buf = {{__jmpbuf = {0, -511047682348831431, 36152072, 35585032, 0, 35584032, 510965219468487993, -511050912626528967}, __mask_was_saved = 0, __saved_mask = {__val = {36163608, 0, 0, 12209118, 36160280, 12209118, 36152072, 12209118, 1, 1, 0, 35584032, 10290902, 35581112, 11859995704738950912, 35583992}}}}
_do_rethrow = <optimized out>
result = <optimized out>
nprocessed = <optimized out>
saveTopTransactionResourceOwner = 0x2239818
saveTopTransactionContext = 0x2217a00
saveActivePortal = 0x0
saveResourceOwner = 0x2239818
savePortalContext = 0x0
saveMemoryContext = 0x2217a00
__func__ = "PortalRun"
#18 0x000000000086adab in exec_simple_query ()
No symbol table info available.
#19 0x000000000086c598 in PostgresMain ()
No symbol table info available.
#20 0x00000000008672b5 in BackendMain (startup_data=<optimized out>, startup_data_len=<optimized out>) at backend_startup.c:105
bsdata = <optimized out>
#21 0x00000000007d850f in postmaster_child_launch (child_type=child_type@entry=B_BACKEND, startup_data=startup_data@entry=0x7fff98611e40 "", startup_data_len=startup_data_len@entry=4, client_sock=client_sock@entry=0x7fff98611e60) at launch_backend.c:277
pid = <optimized out>
#22 0x00000000007dbe5c in BackendStartup (client_sock=0x7fff98611e60) at postmaster.c:3596
bn = 0x2218088
pid = <optimized out>
startup_data = {canAcceptConnections = CAC_OK}
bn = <optimized out>
pid = <optimized out>
startup_data = <optimized out>
__func__ = "BackendStartup"
__errno_location = <optimized out>
__errno_location = <optimized out>
save_errno = <optimized out>
__errno_location = <optimized out>
__errno_location = <optimized out>
#23 ServerLoop () at postmaster.c:1678
s = {sock = 12, raddr = {addr = {ss_family = 1, __ss_padding = "\000\000\000\000\000\000\001", '\000' <repeats 15 times>, "\377\377\377\377", '\000' <repeats 12 times>, "\300\350\060\062\221\177\000\000\340Sl5\221\177\000\000\000\000\000\000\000\000\000\000\340\036a\230\377\177\000\000@\271\036\002\000\000\000\000\005\000\000\000\000\000\000\000\360C!\002\000\000\000\000-\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000H\037a\230\377\177\000", __ss_align = 33912848}, salen = 2}}
i = <optimized out>
now = <optimized out>
last_lockfile_recheck_time = 1773767263
last_touch_time = 1773764548
events = {{pos = 3, events = 2, fd = 9, user_data = 0x0}, {pos = 0, events = 0, fd = 35762608, user_data = 0x0}, {pos = -1738465449, events = 32767, fd = 843181742, user_data = 0x7fff98611fac}, {pos = -1738465360, events = 32767, fd = 6, user_data = 0x221b1b1}, {pos = 0, events = 0, fd = -1432375552, user_data = 0x0}, {pos = -1738465308, events = 32767, fd = -1738464672, user_data = 0x7f913241f64b <__inet_pton_length+363>}, {pos = -1738464416, events = 32767, fd = -1738465308, user_data = 0x0}, {pos = 0, events = 16777216, fd = -1738465280, user_data = 0xa4972b41aa9faf00}, {pos = -1738463184, events = 32767, fd = -1738464672, user_data = 0x0}, {pos = 842963042, events = 32657, fd = 0, user_data = 0x0}, {pos = 10, events = 0, fd = 0, user_data = 0x1000000}, {pos = -1738465220, events = 32767, fd = 0, user_data = 0x3}, {pos = 0, events = 0, fd = -1738464032, user_data = 0x7fff98612000}, {pos = 2, events = 17, fd = 0, user_data = 0x2f7365726774736f}, {pos = -1738465248, events = 32767, fd = 1, user_data = 0x3631363200000000}, {pos = 542979894, events = 977751884, fd = 0, user_data = 0x221a2b0}, {pos = 111, events = 0, fd = 81, user_data = 0x4c2f382d4654552e}, {pos = 1162698563, events = 1195463507, fd = -1738465024, user_data = 0x0}, {pos = -1738464524, events = 32767, fd = 0, user_data = 0x2223f98}, {pos = 35798936, events = 0, fd = 10, user_data = 0x4c}, {pos = 28, events = 0, fd = 35771272, user_data = 0x7fff98612040}, {pos = -1738465328, events = 32767, fd = 0, user_data = 0x0}, {pos = 0, events = 0, fd = 0, user_data = 0x0}, {pos = 0, events = 0, fd = 0, user_data = 0x0}, {pos = 0, events = 0, fd = 0, user_data = 0x11}, {pos = 896234496, events = 32657, fd = 17, user_data = 0x0}, {pos = 0, events = 0, fd = 0, user_data = 0x0}, {pos = 0, events = 0, fd = 2, user_data = 0x80000000000000e6}, {pos = 0, events = 0, fd = 0, user_data = 0x0}, {pos = 0, events = 0, fd = 0, user_data = 0x0}, {pos = 35477512, events = 0, fd = 4144, user_data = 0xfffffffffffffef0}, {pos = 64, events = 0, fd = 257, user_data = 0x7c00000063}, {pos = 8, events = 0, fd = 0, user_data = 0x1}, {pos = 119, events = 111, fd = 0, user_data = 0xff}, {pos = 4096, events = 0, fd =-1432375552, user_data = 0x7fff98612440}, {pos = 35801856, events = 0, fd = 0, user_data = 0x7fff98612830}, {pos = -1738464400, events = 32767, fd = 35798936, user_data = 0x7fff986127b0}, {pos = 842969988, events = 32657, fd = 64514, user_data = 0x1002412d}, {pos = 1, events = 0, fd = 33152, user_data = 0x1a}, {pos = 0, events = 0, fd = 0, user_data = 0x7fff98612818}, {pos = 0, events = 0, fd = 1772535786, user_data = 0x3182e417f}, {pos = 0, events = 0, fd = 0, user_data = 0x7fff98612360}, {pos = 35479572, events = 0, fd = 0, user_data = 0x100008030}, {pos = 35763456, events = 0, fd = 0, user_data = 0x0}, {pos = -272, events = 4294967295, fd = 513,user_data = 0x23100000804}, {pos = 155, events = 124, fd = 64, user_data = 0x1}, {pos = 8, events = 0, fd = 120, user_data = 0x7fff98612440}, {pos = 2050, events = 0, fd = -1738464400, user_data = 0x400}, {pos = 1, events = 0, fd = 11854712, user_data = 0x2}, {pos = 842572510, events = 32657, fd = -1738464288, user_data = 0x8000}, {pos = 11, events = 0, fd = 842826346, user_data = 0x7fff986128f3}, {pos = 11, events = 0, fd = -1738464288, user_data = 0xa15c49}, {pos = 10574921, events = 0, fd = 842826605, user_data = 0xfc02}, {pos = 1739, events = 0, fd = 2, user_data = 0x1a000041c0}, {pos = 26, events = 0, fd = 0, user_data = 0x6}, {pos = 4096, events = 0, fd = 0, user_data = 0x69a6bd0a}, {pos = 11002984, events = 0, fd = 1772535049, user_data = 0x3689cf44}, {pos = 1772535338, events = 1, fd = 861859618, user_data = 0x0}, {pos = 0, events = 0, fd = -1432375552, user_data = 0x2219b90}, {pos = 11, events = 0, fd = 35788352, user_data = 0xa15c49}, {pos = 12101867, events = 0, fd = 10628966, user_data = 0x222169b}, {pos = 842826833, events = 32657, fd = 35589072, user_data = 0x83b28d <FreeDesc+29>}, {pos = -1738464048, events = 32767, fd = 842568043, user_data = 0x2222250}, {pos = 7, events = 0, fd = 35475982, user_data = 0x0}}
nevents = <optimized out>
__func__ = "ServerLoop"
#24 0x00000000007dda78 in PostmasterMain (argc=argc@entry=3, argv=argv@entry=0x21e7810) at postmaster.c:1376
opt = <optimized out>
status = <optimized out>
userDoption = <optimized out>
listen_addr_saved = <optimized out>
output_config_variable = <optimized out>
__func__ = "PostmasterMain"
#25 0x000000000050f843 in main (argc=3, argv=0x21e7810) at main.c:199
No locals.
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Segmentation fault in PostgreSQL 17.7 during REINDEX TABLE CONCURRENTLY
2026-03-20 12:26 RE: Segmentation fault in PostgreSQL 17.7 during REINDEX TABLE CONCURRENTLY Ana Almeida <[email protected]>
@ 2026-03-26 23:44 ` Michael Paquier <[email protected]>
0 siblings, 0 replies; 2+ messages in thread
From: Michael Paquier @ 2026-03-26 23:44 UTC (permalink / raw)
To: Ana Almeida <[email protected]>; +Cc: Tomas Vondra <[email protected]>; Jim Jones <[email protected]>; [email protected] <[email protected]>; Nuno Azevedo <[email protected]>
On Fri, Mar 20, 2026 at 12:26:36PM +0000, Ana Almeida wrote:
> We executed DELETE, VACUUM, and REINDEX commands multiple
> times. During one of the executions, the REINDEX operation failed
> with the error: "could not open file". After this, we dropped and
> recreated the database and repeated the tests. In one of the
> executions, the same REINDEX command resulted in segmentation fault,
> which caused the database to crash. When the REINDEX command failed,
> it left behind temporary index copies with the _ccnew suffix. We
> manually dropped these indexes and re-ran the REINDEX command, which
> then completed successfully.
I am afraid that it is one of these cases where having a
self-contained workload to be able to reproduce the issue, even if the
issue can be hit at a very low rate, would be super useful before we
could categorize that as a backend core issue. I could buy that there
is an in-core problem, but it's hard to justify the time investment
based on an assumption that we may have a problem.
FWIW, I have not seen such problematic error patterns lately, so it's
hard to say. I'll double-check around me and see if there is some data
to fish. Perhaps there is something matching with a portion of your
problematic patterns, or that has a similar smell.
--
Michael
Attachments:
[application/pgp-signature] signature.asc (833B, 2-signature.asc)
download
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2026-03-26 23:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-03-20 12:26 RE: Segmentation fault in PostgreSQL 17.7 during REINDEX TABLE CONCURRENTLY Ana Almeida <[email protected]>
2026-03-26 23:44 ` Michael Paquier <[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