Re: ERROR during end-of-xact/FATAL

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Noah Misch <noah(at)leadboat(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: ERROR during end-of-xact/FATAL
Date: 2013-11-06 14:40:12
Message-ID: 20131106144012.GL5809@eldon.alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Noah Misch wrote:

> Incomplete list:
>
> - If smgrDoPendingDeletes() finds files to delete, mdunlink() and its callee
> relpathbackend() call palloc(); this is true in all supported branches. In
> 9.3, due to commit 279628a0, smgrDoPendingDeletes() itself calls palloc().
> (In fact, it does so even when the pending list is empty -- this is the only
> palloc() during a trivial transaction commit.) palloc() failure there
> yields a PANIC during commit.

I think we should fix this routine to avoid the palloc when not necessary.
That initial palloc is pointless.

Also, there have been previous discussions about having relpathbackend
not use palloc at all. That was only because we wanted to use it in
pg_xlogdump which didn't have palloc support at the time, so it's no
longer as pressing; but perhaps it's still worthy of consideration.

--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ants Aasma 2013-11-06 14:48:17 Re: better atomics
Previous Message Ian Lawrence Barwick 2013-11-06 14:32:26 Re: FDW: possible resjunk columns in AddForeignUpdateTargets