Re: default partition and concurrent attach partition - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: default partition and concurrent attach partition
Date
Msg-id 20200908201752.GA6953@alvherre.pgsql
Whole thread Raw
In response to Re: default partition and concurrent attach partition  (Amit Langote <amitlangote09@gmail.com>)
Responses Re: default partition and concurrent attach partition
List pgsql-hackers
Hi,

Andres added to CC because of TTS interface: apparently calling
slot_getallattrs() on a virtual slot raises error that "getsomeattrs is
not required to be called on a virtual tuple table slot".  I'm thinking
that this exposes implementation details that should not be necessary
for a caller to know; patch 0001 fixes that at the problematic caller by
making the slot_getallatrs() call conditional on the slot not being
virtual, but I wonder if the better fix isn't to remove the elog(ERROR)
at tts_virtual_getsomeattrs.

Moving on from that -- this is a version of Amit's previous patch that I
like better.  I think the "prev_myslot" thing was a bit ugly, but it
turns out that with the above fix we can clear the slot before creating
the new one, making things more sensible.  I also changed the "do {}
while ()" into a simple "while {}" loop, which is sensible since the
condition is true on loop entrance.  Minor comment rewording also.

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

Attachment

pgsql-hackers by date:

Previous
From: Julien Rouhaud
Date:
Subject: Re: Collation versioning
Next
From: Magnus Hagander
Date:
Subject: Re: VACUUM (INTERRUPTIBLE)?