public inbox for [email protected]
help / color / mirror / Atom feedFrom: Konstantin Knizhnik <[email protected]>
To: Pavel Stehule <[email protected]>
Cc: Craig Ringer <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: Global temporary tables
Date: Wed, 21 Aug 2019 11:54:29 +0300
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAFj8pRCMmU7XPYpfA7FZS4pFBPwHZ=+B6wF6Z72LTXHEzfkDFA@mail.gmail.com>
References: <[email protected]>
<CAMsr+YF-_ni33MWLEMc3jtbh_-SFSfBBpXCsPBfiB_bTYKoQug@mail.gmail.com>
<[email protected]>
<[email protected]>
<CAFj8pRDfDGReVdPcD_nXqnukMfY2gmi1mjkB3o1-KQgQz17mwA@mail.gmail.com>
<[email protected]>
<CAFj8pRBEVp-wp-EAbuHaTuefc1WPg897iBW_1r5-wZ2NKKkNOw@mail.gmail.com>
<[email protected]>
<[email protected]>
<CAFj8pRCScMe34apHZz7HL6tmzkVwBba_HbcqTBJAv9n=oq1ADA@mail.gmail.com>
<[email protected]>
<CAFj8pRAFbHvdOTyOjB2utcBQDojXBr+Uuw+yWRCsz9Rv7GYJhg@mail.gmail.com>
<[email protected]>
<CAFj8pRB5PPsNRCuihUvU192jDs1=Tb5khynoR73x69Rhupqe7Q@mail.gmail.com>
<[email protected]>
<CAFj8pRCMmU7XPYpfA7FZS4pFBPwHZ=+B6wF6Z72LTXHEzfkDFA@mail.gmail.com>
On 20.08.2019 20:01, Pavel Stehule wrote:
> Another solution is wait on ZHeap storage and replica can to have own
> UNDO log.
>
>>
> I thought about implementation of special table access method for
> temporary tables.
>
>
> +1
>
Unfortunately implementing special table access method for temporary
tables doesn't solve all problems.
XID generation is not part of table access methods.
So we still need to assign some XID to write transaction at replica
which will not conflict with XIDs received from master.
Actually only global temp tables can be updated at replica and so
assigned XIDs can be stored only in tuples of such relations.
But still I am not sure that we can use arbitrary XID for such
transactions at replica.
Also I upset by amount of functionality which has to be reimplemented
for global temp tables if we really want to provide access method for them:
1. CLOG
2. vacuum
3. MVCC visibility
And still it is not possible to encapsulate all changes need to support
writes to temp tables at replica inside table access method.
XID assignment, transaction commit and abort, subtransactions - all this
places need to be patched.
--
Konstantin Knizhnik
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
view thread (492+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Global temporary tables
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox