Re: ERROR during end-of-xact/FATAL - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: ERROR during end-of-xact/FATAL
Date
Msg-id 20131106144012.GL5809@eldon.alvh.no-ip.org
Whole thread Raw
In response to ERROR during end-of-xact/FATAL  (Noah Misch <noah@leadboat.com>)
Responses Re: ERROR during end-of-xact/FATAL
List 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



pgsql-hackers by date:

Previous
From: Ian Lawrence Barwick
Date:
Subject: Re: FDW: possible resjunk columns in AddForeignUpdateTargets
Next
From: Peter Eisentraut
Date:
Subject: Re: shared memory message queues