For a detailed understanding of the DB IO lifecycle during a SAN outage, refer to the following workflow:

Healthy IO flow: The Write
The Database Layer (PostgreSQL fsync)
When a user executes a COMMIT command, PostgreSQL must guarantee that data is safe. It takes the transaction data from its memory (WAL buffers) and issues a system call (usually fsync() or fdatasync()) to force the Write-Ahead Log (WAL) to permanent storage.
The Guest OS & Virtual Hardware (PVSCSI)
The Linux operating system inside your VM takes that fsync() request, translates it into block-level SCSI commands, and hands it to the virtual storage controller—in this case, the VMware Paravirtual SCSI (PVSCSI) adapter.
The Hypervisor Layer (ESXi & VMHBA5)
The ESXi host kernel intercepts the SCSI command from the VM. The host's multipathing software (NMP) looks at its routing table, sees that VMHBA5 is the active, healthy path, and pushes the Fibre Channel frames out of that physical host bus adapter port.
The SAN Fabric Layer (Cisco SAN Switch)
The light pulses travel over the fiber cable and enter the Cisco SAN switch. Because the XBAR (Crossbar Fabric) is healthy, the switch instantly processes the routing header and forwards the frames out of the correct port toward the storage array without dropping a single packet.
The Storage Array Layer (EMC Cache)
The EMC Storage Array receives the frames. Enterprise arrays like EMC do not write directly to the spinning disks or flash cells immediately. Instead, the write lands in the array's highly redundant, battery-backed Write Cache (NVRAM).
The Acknowledgement
As soon as that data hits the EMC Cache, it is considered mathematically safe. Now, the system races back up the stack to tell PostgreSQL the good news.
The "SCSI Good Ack"
The EMC array instantly generates a SCSI Good acknowledgement and sends it back up the wire. It travels back through the healthy Cisco SAN switch, hits VMHBA5 on the ESXi host, and is passed through the hypervisor back to the PVSCSI controller.
The OS Confirmation
The Linux OS receives the hardware acknowledgement and tells the PostgreSQL process, "fsync() request is complete."
- Transaction Committed
PostgreSQL officially marks the transaction record as COMMITTED in its internal state. It then sends a success message back to the end-user or application that initiated the query.
Note: In a healthy state, this entire round-trip (from Step 1 to Step 8) happens in sub-millisecond times (often less than 0.5ms on modern All-Flash arrays). PostgreSQL's entire data integrity model relies on the assumption that if it receives that "SCSI Good Ack" from the OS, the data is permanently safe on disk.
Impacted IO flow
Fluctuating Link
- When a Cisco MDS switch enters this specific type of "black hole" state, it becomes the worst-case scenario for any database.
- Because the line card lasers are still emitting light, the ESXi host is completely blind to the fact that the switch's brain (the SUP) has died.
- Here is the exact flow of what happened to your PostgreSQL database:
- I/O Drop
- PostgreSQL issues the fsync() command to write the Write-Ahead Log (WAL) to disk.
- The Linux OS hands the command to the ESXi host.
- Because the physical link to the Cisco switch still shows "UP", ESXi's Native Multipathing Plugin (NMP) happily sends the SCSI write frames down VMHBA5.
- The frames hit the Cisco switch and vanish into the black hole. No SCSI Good ACK is ever generated.
- Database Timeout
- ESXi does not immediately failover because the link is still physically up. It simply waits for an ACK that will never come.
- Inside the VM, the Linux OS waits.
- PostgreSQL hits its internal or application-level statement_timeout.
- The database assumes the transaction failed, aborts the write in its memory, and rolls the transaction back.
- Path Failover
- Eventually, the ESXi host realizes the I/O has been stuck for too long. It triggers a "Dead Path, Dead I/O" (DPDO) sequence.
- ESXi sends a TEST_UNIT_READY (TUR) probe. Because the switch is in a black hole, the probe fails.
- Only now does ESXi officially mark VMHBA5 as DEAD and fail over to the healthy VMHBA2.
- Result
- This delayed failover creates the exact window for Logical Inconsistency.
- If PostgreSQL rolled back the transaction out of frustration, but the delayed SAN failover suddenly allowed that trapped I/O packet to reach the EMC array via the secondary path, the storage array will write data that the database believes was aborted.
- If this happens, PostgreSQL's built-in data integrity checks will often detect the torn page or mismatched WAL sequence upon the next read, which can trigger a deliberate database condition to prevent further silent corruption.
- Summary:
- With faulty SUP module, a switch silently drops packets while keeping the optical link "UP," database will suffer the timeouts and rollback risks shown on the right side of the diagram.
- As DB support team explains it is not a corruption but it can be a logical mismatch between storage data and the DB data.