Re: [GENERAL] DROP [TEMP] TABLE syntax, as reason why not?

2017-08-24 Thread Vincenzo Romano
2017-08-24 3:08 GMT+02:00 Tom Lane : > "David G. Johnston" writes: >> I'm wondering if there is anything technical preventing someone from making: > >> DROP TEMP TABLE tablename; > > There is no great need for that because you can get the semantics you're > asking for with "DROP TABLE pg_temp.tabl

[GENERAL] Explain analyse and toasted data.

2017-08-24 Thread Benoit Lobréau
Hi, In this video (PostgreSQL at 10 TB and beyond: https://youtu.be/8mKpfutwD0U at 6mn05), the speaker says that on very big databases explain analyse can give unrealistic results because it doesn't read toasted data. I suppose it's because of this: "The big values of TOASTed attributes will only

Re: [GENERAL] DROP [TEMP] TABLE syntax, as reason why not?

2017-08-24 Thread Pavel Stehule
2017-08-24 9:11 GMT+02:00 Vincenzo Romano : > 2017-08-24 3:08 GMT+02:00 Tom Lane : > > "David G. Johnston" writes: > >> I'm wondering if there is anything technical preventing someone from > making: > > > >> DROP TEMP TABLE tablename; > > > > There is no great need for that because you can get th

Re: [GENERAL] DROP [TEMP] TABLE syntax, as reason why not?

2017-08-24 Thread Vincenzo Romano
2017-08-24 11:04 GMT+02:00 Pavel Stehule : > > > 2017-08-24 9:11 GMT+02:00 Vincenzo Romano : >> >> 2017-08-24 3:08 GMT+02:00 Tom Lane : >> > "David G. Johnston" writes: >> >> I'm wondering if there is anything technical preventing someone from >> >> making: >> > >> >> DROP TEMP TABLE tablename; >>

[GENERAL] plpython2.dll missing from Enterprise DB Postgres distribution

2017-08-24 Thread Alan Millington
There were several queries in 2014 regarding the absence of plpython2.dll from the Enterprise DB Postgres distribution for Win32. I should have thought that this omission was simply an oversight, which would have been rectified by now. However, I find that plpython2.dll is still missing from the

[GENERAL] Postgresql_for_odoo

2017-08-24 Thread Fadhel J Muhammad
Service Postgresql_for_odoo not found and Server internal error while open localhost:8069. If I uninstall postgresql, Error stopping and delete postgresql_for_odoo. Thanks

[GENERAL] plpython2.dll missing from Enterprise DB Postgres distribution

2017-08-24 Thread Alan Millington
There were several queries in 2014 regarding the absence of plpython2.dll from the Enterprise DB Postgres distribution for Win32. I should have thought that this omission was simply an oversight, which would have been rectified by now. However, I find that plpython2.dll is still missing from the

[GENERAL] Re: Repmgr + pgbouncer - Notification of master promotion to application level ...

2017-08-24 Thread Daniel Silva
Hi Andreas, in my pgbouncer configured as: ;auth_file=/test/user.txt auth_query = SELECT usename, passwd FROM pg_shadow WHERE usename=$1 Of course. When try connect with command " psql -p postgres -U dba" Print erro in screen. psql: ERROR: No such user: dba But, exists user and passwd in

[GENERAL] Cluster, repmgr, pgbouncer, pgpool, ha proxy, virtual IP, replication, failover and load balance

2017-08-24 Thread Juliano
Hi guys > I would like to deploy load balance on Postgres master/slave(RW/R) servers > and also use a virtual IP on this cluster > > I currently have Postgres 9.4 using Repmgr for replication and manual > failover to avoid split-brain problems and save a witness server. Also, there > is Pgbounc

Re: [GENERAL] DROP [TEMP] TABLE syntax, as reason why not?

2017-08-24 Thread Pavel Stehule
2017-08-24 11:46 GMT+02:00 Vincenzo Romano : > 2017-08-24 11:04 GMT+02:00 Pavel Stehule : > > > > > > 2017-08-24 9:11 GMT+02:00 Vincenzo Romano : > >> > >> 2017-08-24 3:08 GMT+02:00 Tom Lane : > >> > "David G. Johnston" writes: > >> >> I'm wondering if there is anything technical preventing someo

Re: [GENERAL] plpython2.dll missing from Enterprise DB Postgres distribution

2017-08-24 Thread Devrim Gündüz
Hi Alan, On Sun, 2017-08-20 at 16:50 +, Alan Millington wrote: > I have raised this with EDB. I received an acknowledgment, but I have not > heard anything more. That is not surprising, as I am a person of no > importance. I just raised this again with our support team. Apologies for that

Re: [GENERAL] DROP [TEMP] TABLE syntax, as reason why not?

2017-08-24 Thread Vincenzo Romano
2017-08-24 12:06 GMT+02:00 Pavel Stehule : > > > 2017-08-24 11:46 GMT+02:00 Vincenzo Romano : >> >> 2017-08-24 11:04 GMT+02:00 Pavel Stehule : >> > >> > >> > 2017-08-24 9:11 GMT+02:00 Vincenzo Romano : >> >> >> >> 2017-08-24 3:08 GMT+02:00 Tom Lane : >> >> > "David G. Johnston" writes: >> >> >> I'

Re: [GENERAL] DROP [TEMP] TABLE syntax, as reason why not?

2017-08-24 Thread Francisco Olarte
On Thu, Aug 24, 2017 at 11:46 AM, Vincenzo Romano wrote: > Once you accept that Postgres is already extending the standard, I > would focus on syntax consistency and symmetry as a yet-another-extra > value from Postgres. > > Moreover, "DROP TEMP TABLE..." would make it clear and explicit that > th

Re: [GENERAL] DROP [TEMP] TABLE syntax, as reason why not?

2017-08-24 Thread Francisco Olarte
On Thu, Aug 24, 2017 at 12:48 PM, Vincenzo Romano wrote: > Isn't a CHOICE for better syntax enough? > Aren't symmetry and consistency valuable arguments? > Syntactic sugar is not evil on its own. > It can help people writing code that can be better understood. Valid arguments, but those extensio

Re: [GENERAL] 'value too long' and before insert/update trigger

2017-08-24 Thread Tom Lane
"David G. Johnston" writes: > On Wednesday, August 23, 2017, Kevin Golding > wrote: >> Presumably the length validation is being done before the trigger is run. >> Is there some way this could be changed so the trigger happens first? > The input tuple passed into the trigger is a valid record of

Re: [GENERAL] DROP [TEMP] TABLE syntax, as reason why not?

2017-08-24 Thread Tom Lane
Francisco Olarte writes: > On Thu, Aug 24, 2017 at 12:48 PM, Vincenzo Romano > wrote: >> Isn't a CHOICE for better syntax enough? >> Aren't symmetry and consistency valuable arguments? >> Syntactic sugar is not evil on its own. >> It can help people writing code that can be better understood. >

Re: [GENERAL] Explain analyse and toasted data.

2017-08-24 Thread Tom Lane
=?UTF-8?Q?Benoit_Lobr=C3=A9au?= writes: > In this video (PostgreSQL at 10 TB and beyond: https://youtu.be/8mKpfutwD0U > at 6mn05), the speaker says that on very big databases explain analyse can > give unrealistic results because it doesn't read toasted data. > I suppose it's because of this: "Th

Re: [GENERAL] Retrieving query results

2017-08-24 Thread Tom Lane
Michael Paquier writes: > On Wed, Aug 23, 2017 at 3:19 AM, Igor Korot wrote: >> [quote] >> PQntuples >> >> Returns the number of rows (tuples) in the query result. Because it >> returns an integer result, large result sets might overflow the return >> value on 32-bit operating systems. >> >> in

Re: [GENERAL] Retrieving query results

2017-08-24 Thread Igor Korot
Hi, guys, On Thu, Aug 24, 2017 at 8:51 AM, Tom Lane wrote: > Michael Paquier writes: >> On Wed, Aug 23, 2017 at 3:19 AM, Igor Korot wrote: >>> [quote] >>> PQntuples >>> >>> Returns the number of rows (tuples) in the query result. Because it >>> returns an integer result, large result sets migh

Re: [GENERAL] Retrieving query results

2017-08-24 Thread Tom Lane
Igor Korot writes: > On Thu, Aug 24, 2017 at 8:51 AM, Tom Lane wrote: >> I think what we need is to (1) introduce some error checking in libpq so >> that it reports an error if the resultset exceeds 2G rows --- right now >> it'll just crash, I fear, and (2) change the documentation so that this >

Re: [GENERAL] DROP [TEMP] TABLE syntax, as reason why not?

2017-08-24 Thread David G. Johnston
On Wed, Aug 23, 2017 at 6:08 PM, Tom Lane wrote: > "David G. Johnston" writes: > > I'm wondering if there is anything technical preventing someone from > making: > > > DROP TEMP TABLE tablename; > > There is no great need for that because you can get the semantics you're > asking for with "DROP

[GENERAL] Change location of function/type installed from C-extension

2017-08-24 Thread Dmitry Lazurkin
Hello. I have database with installed pg_trgm extension with module path '/usr/lib/pg_trgm' (yes, this is mistake without $libdir (: ). Now I want upgrade postgresql to new major version. I keep old version 9.3 in /opt/postgresql/9.3 and new version 9.6 in /usr. Old version $libdir - /opt/postgres

[GENERAL] creating tables in tablespace

2017-08-24 Thread Tiffany Thang
Hi, I'm not able to create tables in a specific tablespace. I'm not sure what I have missed. According to the documentation, a table can be created in a specific tablespace by performing the following: 1. Specify the tablespace parameter in the create database statement. 2. Specify the tablespace

Re: [GENERAL] creating tables in tablespace

2017-08-24 Thread Tom Lane
Tiffany Thang writes: > According to the documentation, a table can be created in a specific > tablespace by performing the following: > 1. Specify the tablespace parameter in the create database statement. > 2. Specify the tablespace parameter in the create table statement. > I've tried both but

Re: [GENERAL] creating tables in tablespace

2017-08-24 Thread Tiffany Thang
Thanks Tom. As the superuser, I'm able to create the table in the specific tablespace. Does myuser require additional privileges? My aim is to be able to create table in a specific tablespace (in this case, mytablespace) by default without having to explicitly specific one. I would think that is p

Re: [GENERAL] creating tables in tablespace

2017-08-24 Thread Tom Lane
Tiffany Thang writes: > Thanks Tom. As the superuser, I'm able to create the table in the specific > tablespace. Does myuser require additional privileges? Yes, USAGE on the tablespace if memory serves (check the GRANT man page for details). > My aim is to be able to create table in a specific t

Re: [GENERAL] Multixact members limit exceeded

2017-08-24 Thread Peter Hunčár
Hello it took 10 days to autovacuum the 32TB toast table and after restarting with previous (but slightly tuned autovacuum) parameters, the database works just fine. The data import is almost done, there are just several hundred thousands of rows to add :) The next headache will the the backup of

Re: [GENERAL] Retrieving query results

2017-08-24 Thread Michael Paquier
On Thu, Aug 24, 2017 at 11:56 PM, Tom Lane wrote: > I haven't tried it, but it sure looks like it would, if you don't hit > OOM first. pqAddTuple() isn't doing anything to guard against integer > overflow. The lack of reports implies that no one has ever tried to > retrieve even 1G rows, let alo

Re: [GENERAL] Retrieving query results

2017-08-24 Thread Igor Korot
Michael et al, On Thu, Aug 24, 2017 at 6:57 PM, Michael Paquier wrote: > On Thu, Aug 24, 2017 at 11:56 PM, Tom Lane wrote: >> I haven't tried it, but it sure looks like it would, if you don't hit >> OOM first. pqAddTuple() isn't doing anything to guard against integer >> overflow. The lack of

Re: [GENERAL] Retrieving query results

2017-08-24 Thread Tom Lane
Michael Paquier writes: > On Thu, Aug 24, 2017 at 11:56 PM, Tom Lane wrote: >> I haven't tried it, but it sure looks like it would, if you don't hit >> OOM first. pqAddTuple() isn't doing anything to guard against integer >> overflow. The lack of reports implies that no one has ever tried to >>

Re: [GENERAL] Retrieving query results

2017-08-24 Thread Tom Lane
Igor Korot writes: > So there is no way to retrieve an arbitrary number of rows from the query? > That sucks... The restriction is on the number of rows in one PGresult, not the total size of the query result. You could use single-row mode, or use a cursor and fetch some reasonable number of row

Re: [GENERAL] Retrieving query results

2017-08-24 Thread Igor Korot
Hi, On Thu, Aug 24, 2017 at 7:18 PM, Tom Lane wrote: > Igor Korot writes: >> So there is no way to retrieve an arbitrary number of rows from the query? >> That sucks... > > The restriction is on the number of rows in one PGresult, not the total > size of the query result. You could use single-r