Re: Temporary table already exists

From: mephysto <mephystoonhell(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Temporary table already exists
Date: 2014-02-06 10:11:46
Message-ID: CAG0sfBWE7oEr7OkbvgVcivpAuEBYBRWPpLYr-KyAaZYBoAptQg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I don't need local sorting, I only had to retrieve some objects from db
belongs to user.

A this point is it better unlogged tables or postgres object arrays?
Il 06/feb/2014 09:35 "alexandros_e [via PostgreSQL]" <
ml-node+s1045698n5790806h26(at)n5(dot)nabble(dot)com> ha scritto:

> @mephysto I think you are trying to solve the wrong type of problem.
> Creation of tables (temporary or not) are not supposed to run concurrently.
> So, this is not an issue of PostgreSQL but design. There are two ways to
> solve the problem.
>
> a) You could use the sessionID (provided The Glassfish server) to create
> unique names for the temporary table, if the temporary table is unique per
> session. If not, since you are talking about multiplayer game the temporary
> table name could include the userID, so it is unique per user. In that
> sense, it could be persistent per user, or temporary depending on your
> needs. In that case you will need EXECUTE command to CREATE the table in
> your pgsql code, since the table name must be a variable in your functions.
>
>
> b) I highly suspect that this temporary table is used for either caching
> or local sorting / ordering. In this case Postgres is again the wrong tool.
> You can use an embedded DB like SQLite, HSQLDB for the local database which
> may be used for this type of operations, which 'syncs' to the global
> PostgreSQL DB when connecting or disconnecting. Every client will have a
> separate copy of this DB, so no overhead to the server.
>
> Either way you will have solved your issue.
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://postgresql.1045698.n5.nabble.com/Temporary-table-already-exists-tp5789852p5790806.html
> To unsubscribe from Temporary table already exists, click here<http://postgresql.1045698.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5789852&code=bWVwaHlzdG9vbmhlbGxAZ21haWwuY29tfDU3ODk4NTJ8LTkwNDU5Mzg0Ng==>
> .
> NAML<http://postgresql.1045698.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>

--
View this message in context: http://postgresql.1045698.n5.nabble.com/Temporary-table-already-exists-tp5789852p5790819.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2014-02-06 11:47:29 Re: client encoding that psql command sets
Previous Message Vik Fearing 2014-02-06 09:55:24 Re: Ordering Results by a Supplied Order