pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feed From: David G. Johnston <david.g.johnston@gmail.com>
To: Michael Moore <michaeljmoore@gmail.com>
Cc: postgres list <pgsql-sql@postgresql.org>
Subject: Re: ERROR: out of shared memory
Date: Wed, 2 Nov 2016 16:08:54 -0700
Message-ID: <CAKFQuwYTM==F8sJuaOsc34WAkXNLyMFex96-up1MpMLX39Phsg@mail.gmail.com> (raw )
In-Reply-To: <CAKFQuwbqhhvNDmxrir6h7Lb190QxNsUbPum-XZoXqPS5Wnq=KA@mail.gmail.com >
References: <CACpWLjO6woc1jpLOQgB0rnu_CusfdxtMEKcFQ3Wg8dQWZZnNQg@mail.gmail.com >
<CAKFQuwYd3niX3cMNhuPQ9ETVTDEhHpRE8x=UgcBVpBu7kpWLZQ@mail.gmail.com >
<CACpWLjP89TxUeRB1OQTm7t0nTGY2osXL4w63u+5DUW+NTOuBPg@mail.gmail.com >
<CACpWLjMOXe4WR_vCc_ZXsnR16wdBAzq_zjkFfgQMOako9Ai7gA@mail.gmail.com >
<CAKFQuwaez25B57H9RVdBddPOGJrCMgYnshYMK5RNTD-6DyePbg@mail.gmail.com >
<CAKFQuwYbOp0GUR3ZDyKOxztyiF7L1ajFRLhgD1ihb87K5UHr5w@mail.gmail.com >
<CAKFQuwbzJ0WMtJNW2QeQ5Zdc-wWgguGxXrQEYSE061upZTML2g@mail.gmail.com >
<CACpWLjNM8Y1u53orm55m3S-K7UyR_eCKxSguzza5=LN_sUeb5Q@mail.gmail.com >
<CAKFQuwbqhhvNDmxrir6h7Lb190QxNsUbPum-XZoXqPS5Wnq=KA@mail.gmail.com >
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-sql>
On Wed, Nov 2, 2016 at 4:06 PM, David G. Johnston <
david.g.johnston@gmail.com> wrote:
> On Wed, Nov 2, 2016 at 3:55 PM, Michael Moore <michaeljmoore@gmail.com>
> wrote:
>
>> David,
>> I think that: ...
>>
>> Method 1
>> *create temporary table if not exists temp_rslt of
>> ypxportal2__fgetquestions on commit drop;*
>>
>> is not functionally equivalent to
>>
>> Method 2
>>
>> *drop table if exists temp_rslt;*
>> *create temporary table temp_rslt of ypxportal2__fgetquestions on
>> commit drop;*
>>
>> For example:
>>
>> step 1. A calls B
>> step 2. B creates *temp_rslt* table (substitute Method 1 or
>> Method 2 at this step)
>> step 3. B inserts one record into *temp_rslt*
>> step 4. B returns, without error, to A -- note, no commit is done
>> step 5. repeat #1
>>
>> If, at step 2, we use Method 1, then count(*) *temp_rslt* will never be
>> more than 1.
>> If, at step 2, we use Method 2, then count(*) *temp_rslt* will
>> increment with each iteration of steps 1 thru 5.
>>
>> Make sense?
>>
>>
> You missed the part where you immediately TRUNCATE the table after
> conditionally creating it...
>
>
And no, Method 2 will reset since you are continually dropping it.
Method 1, without Truncate, will do the incrementing while Method 2 will
not.
David J.
view thread (12+ messages) latest in thread
Message-ID: <CAKFQuwYTM==F8sJuaOsc34WAkXNLyMFex96-up1MpMLX39Phsg@mail.gmail.com>
Permalink: ../CAKFQuwYTM==F8sJuaOsc34WAkXNLyMFex96-up1MpMLX39Phsg@mail.gmail.com/
Also on: postgresql.org/message-id/CAKFQuwYTM==F8sJuaOsc34WAkXNLyMFex96-up1MpMLX39Phsg@mail.gmail.com
copy link · copy postgr.es
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: pgsql-sql@postgresql.org
Cc: david.g.johnston@gmail.com, michaeljmoore@gmail.com
Subject: Re: ERROR: out of shared memory
In-Reply-To: <CAKFQuwYTM==F8sJuaOsc34WAkXNLyMFex96-up1MpMLX39Phsg@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox