From: | Jaime Casanova <jaime(dot)casanova(at)2ndquadrant(dot)com> |
---|---|
To: | Konstantin Knizhnik <k(dot)knizhnik(at)postgrespro(dot)ru> |
Cc: | Li Japin <japinli(at)hotmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Built-in connection pooler |
Date: | 2020-07-05 04:17:56 |
Message-ID: | CAJGNTePSpVRMApCq50-veJGtPcMBPDLio1NkwkNE3wnDsX0KwQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | Postg토토 핫SQL : |
On Wed, 7 Aug 2019 at 02:49, Konstantin Knizhnik
<k(dot)knizhnik(at)postgrespro(dot)ru> wrote:
>
> Hi, Li
>
> Thank you very much for reporting the problem.
>
> On 07.08.2019 7:21, Li Japin wrote:
> > I inspect the code, and find the following code in DefineRelation function:
> >
> > if (stmt->relation->relpersistence != RELPERSISTENCE_TEMP
> > && stmt->oncommit != ONCOMMIT_DROP)
> > MyProc->is_tainted = true;
> >
> > For temporary table, MyProc->is_tainted might be true, I changed it as
> > following:
> >
> > if (stmt->relation->relpersistence == RELPERSISTENCE_TEMP
> > || stmt->oncommit == ONCOMMIT_DROP)
> > MyProc->is_tainted = true;
> >
> > For temporary table, it works. I not sure the changes is right.
> Sorry, it is really a bug.
> My intention was to mark backend as tainted if it is creating temporary
> table without ON COMMIT DROP clause (in the last case temporary table
> will be local to transaction and so cause no problems with pooler).
> Th right condition is:
>
> if (stmt->relation->relpersistence == RELPERSISTENCE_TEMP
> && stmt->oncommit != ONCOMMIT_DROP)
> MyProc->is_tainted = true;
>
>
You should also allow cursors without the WITH HOLD option or there is
something i'm missing?
a few questions about tainted backends:
- why the use of check_primary_key() and check_foreign_key() in
contrib/spi/refint.c make the backend tainted?
- the comment in src/backend/commands/sequence.c needs some fixes, it
seems just quickly typed
some usability problem:
- i compiled this on a debian machine with "--enable-debug
--enable-cassert --with-pgport=54313", so nothing fancy
- then make, make install, and initdb: so far so good
configuration:
listen_addresses = '*'
connection_proxies = 20
and i got this:
"""
jcasanov(at)DangerBox:/opt/var/pgdg/14dev$ /opt/var/pgdg/14dev/bin/psql
-h 127.0.0.1 -p 6543 postgres
psql: error: could not connect to server: no se pudo conectar con el
servidor: No existe el fichero o el directorio
¿Está el servidor en ejecución localmente y aceptando
conexiones en el socket de dominio Unix «/var/run/postgresql/.s.PGSQL.54313»?
"""
but connect at the postgres port works well
"""
jcasanov(at)DangerBox:/opt/var/pgdg/14dev$ /opt/var/pgdg/14dev/bin/psql
-h 127.0.0.1 -p 54313 postgres
psql (14devel)
Type "help" for help.
postgres=# \q
jcasanov(at)DangerBox:/opt/var/pgdg/14dev$ /opt/var/pgdg/14dev/bin/psql
-p 54313 postgres
psql (14devel)
Type "help" for help.
postgres=#
"""
PS: unix_socket_directories is setted at /tmp and because i'm not
doing this with postgres user i can use /var/run/postgresql
--
Jaime Casanova www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Mitar | 2020-07-05 05:48:43 | Re: Persist MVCC forever - retain history |
Previous Message | vignesh C | 2020-07-05 01:43:10 | Re: Include access method in listTables output |