[GENERAL] how is text-equality handled in postgresql?

2014-01-15 Thread Gábor Farkas
hi, when i create an unique-constraint on a varchar field, how exactly does postgresql compare the texts? i'm asking because in UNICODE there are a lot of complexities about this.. or in other words, when are two varchars equal in postgres? when their bytes are? or some algorithm is applied?

Re: [GENERAL] how is text-equality handled in postgresql?

2014-01-15 Thread Ivan Voras
On 15/01/2014 10:10, Gábor Farkas wrote: hi, when i create an unique-constraint on a varchar field, how exactly does postgresql compare the texts? i'm asking because in UNICODE there are a lot of complexities about this.. or in other words, when are two varchars equal in postgres? when

Re: [GENERAL] pg_basebackup failing

2014-01-15 Thread Sameer Kumar
The error you are seeing is triggered because this relation file exceeds MAX_TAR_MEMBER_FILELEN or 8GB for a single tar member, which is as well the norm for tar. I thought PostgreSQL would break the file if it grows beyond 1GB (1GB is segment size which one can modify while compiling). Am I

Re: [GENERAL] pg_basebackup failing

2014-01-15 Thread Magnus Hagander
On Jan 15, 2014 12:07 PM, Sameer Kumar sameer.ku...@ashnik.com wrote: The error you are seeing is triggered because this relation file exceeds MAX_TAR_MEMBER_FILELEN or 8GB for a single tar member, which is as well the norm for tar. I thought PostgreSQL would break the file if it grows

Re: [GENERAL] how is text-equality handled in postgresql?

2014-01-15 Thread Amit Langote
On Wed, Jan 15, 2014 at 7:39 PM, Ivan Voras ivo...@freebsd.org wrote: On 15/01/2014 10:10, Gábor Farkas wrote: hi, when i create an unique-constraint on a varchar field, how exactly does postgresql compare the texts? i'm asking because in UNICODE there are a lot of complexities about this..

Re: [GENERAL] how is text-equality handled in postgresql?

2014-01-15 Thread Ivan Voras
On 15/01/2014 12:36, Amit Langote wrote: On Wed, Jan 15, 2014 at 7:39 PM, Ivan Voras ivo...@freebsd.org wrote: On 15/01/2014 10:10, Gábor Farkas wrote: hi, when i create an unique-constraint on a varchar field, how exactly does postgresql compare the texts? i'm asking because in UNICODE

Re: [GENERAL] how is text-equality handled in postgresql?

2014-01-15 Thread Amit Langote
On Wed, Jan 15, 2014 at 9:02 PM, Ivan Voras ivo...@freebsd.org wrote: On 15/01/2014 12:36, Amit Langote wrote: On Wed, Jan 15, 2014 at 7:39 PM, Ivan Voras ivo...@freebsd.org wrote: On 15/01/2014 10:10, Gábor Farkas wrote: hi, when i create an unique-constraint on a varchar field, how exactly

Re: [GENERAL] how is text-equality handled in postgresql?

2014-01-15 Thread Ivan Voras
On 15/01/2014 13:29, Amit Langote wrote: On Wed, Jan 15, 2014 at 9:02 PM, Ivan Voras ivo...@freebsd.org wrote: On 15/01/2014 12:36, Amit Langote wrote: * In some locales strcoll() can claim that nonidentical strings are * equal. Believing that would be bad

[GENERAL] Londiste3 (SkyTools3)

2014-01-15 Thread Leonardo M . Ramé
Hi, I've installed SkyTools3 on Ubuntu 12.04 Server, and got stuck when trying to execute pgqadm.py (Step 5: http://manojadinesh.blogspot.com.ar/2012/11/skytools-londiste-replication.html). Does anyone know if pgqadm.py was replaced in SkyTools3?. Any up-to-date tutorial?. Regards, -- Leonardo

Re: [GENERAL] How to know server status variable in postgresql?

2014-01-15 Thread ambilalmca
because that is also one of the important counter to know postgresql server status. thats why i am asking @sameer Thanks Regards, A.Mohamed Bilal On Sat, Jan 11, 2014 at 7:15 PM, Sameer Kumar [via PostgreSQL] ml-node+s1045698n5786458...@n5.nabble.com wrote: On Fri, Jan 10, 2014 at 2:57 PM,

Re: [GENERAL] How to know server status variable in postgresql?

2014-01-15 Thread ambilalmca
@sameer, can you tell me the full query for that? because in pg_stat_all_tables contains many fields. i dont know whats the correct one to get the result. Thanks Regards, A.Mohamed Bilal On Wed, Jan 15, 2014 at 10:57 AM, Mohamed Bilal ambilal...@gmail.comwrote: because that is also one of

[GENERAL] pg_depend OBJID not found

2014-01-15 Thread saggarwal
http://postgresql.1045698.n5.nabble.com/file/n5787214/ScreenShot.jpg hi Any help appreciated (newbie to pgsql) I have a function f_Sanjeev and create a view create view v_sanjeev as select * from f_sanjeev() the view has and OBJID of 5134719 oid reltype relname relnamespacereltype

Re: [GENERAL] How to know server status variable in postgresql?

2014-01-15 Thread Marti Raudsepp
On Wed, Jan 15, 2014 at 7:36 AM, ambilalmca ambilal...@gmail.com wrote: can you tell me the full query for that? because in pg_stat_all_tables contains many fields. i dont know whats the correct one to get the result. *Number of cached blocks read, Number of cached index blocks read,

[GENERAL] How are pg_operator and pg_type related with each other?

2014-01-15 Thread Felix . 徐
Hi all, I'm studying pg_statistic table and I find that column staop is related to pg_operator, and different data types relate to different staop, but I don't know where pgsql stores the mapping between pg_type and pg_operator, does anyone have any idea about it? thanks!

Re: [GENERAL] pg_depend OBJID not found

2014-01-15 Thread Amit Langote
On Wed, Jan 15, 2014 at 8:37 PM, saggarwal sanj.aggar...@gmail.com wrote: http://postgresql.1045698.n5.nabble.com/file/n5787214/ScreenShot.jpg hi Any help appreciated (newbie to pgsql) I have a function f_Sanjeev and create a view create view v_sanjeev as select * from f_sanjeev() the view

Re: [GENERAL] pg_basebackup failing

2014-01-15 Thread Michael Paquier
On Wed, Jan 15, 2014 at 8:05 PM, Sameer Kumar sameer.ku...@ashnik.comwrote: The error you are seeing is triggered because this relation file exceeds MAX_TAR_MEMBER_FILELEN or 8GB for a single tar member, which is as well the norm for tar. I thought PostgreSQL would break the file if it

Re: [GENERAL] how is text-equality handled in postgresql?

2014-01-15 Thread Tom Lane
Ivan Voras ivo...@freebsd.org writes: On 15/01/2014 12:36, Amit Langote wrote: Just to add to this, whenever strcoll() (a locale aware comparator) says two strings are equal, postgres re-compares them using strcmp(). That seems odd and inefficient. Why would it be necessary? I would think

Re: [GENERAL] How are pg_operator and pg_type related with each other?

2014-01-15 Thread Amit Langote
On Wed, Jan 15, 2014 at 11:08 PM, Felix.徐 ygnhz...@gmail.com wrote: Hi all, I'm studying pg_statistic table and I find that column staop is related to pg_operator, and different data types relate to different staop, but I don't know where pgsql stores the mapping between pg_type and

[GENERAL] Need Help to implement Proximity search feature

2014-01-15 Thread itishree sukla
Deal all, In my project, there is a requirement to implement proximity search feature. We are running a mobile app, for which proximity search is require. Can any one guide me how i can achieve this using postgis, or is there any other way i can achieve this. We are using postgresql 9.2. Thanks

Re: [GENERAL] How are pg_operator and pg_type related with each other?

2014-01-15 Thread Felix . 徐
Hi Amit I understand, I've read the source code of analyze.c and implemented a java version. Stakind1(most common values) indicates = operator and stakind2(histogram) indicates operator by default, I'm wondering where I can find the corresponding operatorID of eq/lt for a specific data type. For

Re: [GENERAL] how is text-equality handled in postgresql?

2014-01-15 Thread Vick Khera
On Wed, Jan 15, 2014 at 4:10 AM, Gábor Farkas gabor.far...@gmail.comwrote: or in other words, when are two varchars equal in postgres? when their bytes are? or some algorithm is applied? On this topic, when I write my strings to the DB and search from the DB, should I canonicalize them first

Re: [GENERAL] non-zero xmax yet visible

2014-01-15 Thread Ming Li
On Wed, Jan 15, 2014 at 10:48 AM, Michael Paquier michael.paqu...@gmail.com wrote: On Wed, Jan 15, 2014 at 1:26 AM, Ming Li mli89...@gmail.com wrote: I'm a little bit confused by the meaning of xmax. The documentation at http://www.postgresql.org/docs/current/static/ddl-system-columns.html

Re: [GENERAL] How are pg_operator and pg_type related with each other?

2014-01-15 Thread Tom Lane
=?GB2312?B?RmVsaXgu0Ow=?= ygnhz...@gmail.com writes: I'm wondering where I can find the corresponding operatorID of eq/lt for a specific data type. The ones ANALYZE uses are the members of the default btree opclass for the datatype. If there isn't one, it doesn't build a histogram. And

Re: [GENERAL] Need Help to implement Proximity search feature

2014-01-15 Thread Oleg Bartunov
check knn search, http://www.sai.msu.su/~megera/postgres/talks/pgcon-2010-1.pdf On Wed, Jan 15, 2014 at 8:04 PM, itishree sukla itishree.su...@gmail.com wrote: Deal all, In my project, there is a requirement to implement proximity search feature. We are running a mobile app, for which

[GENERAL] reading array[text] in C extension function

2014-01-15 Thread Rémi Cura
Hey, I'm trying to use an array of text as input in a C function in a custom extension. the prototype of the sql function is : CREATE OR REPLACE FUNCTION pc_subset( dimensions TEXT[]) it is called like : pc_subset( ARRAY['X'::text,'Y'::text]) and the C function trying to read the text array

Re: [GENERAL] pg_depend OBJID not found

2014-01-15 Thread saggarwal
thanks, exactly what I needed -- View this message in context: http://postgresql.1045698.n5.nabble.com/pg-depend-OBJID-not-found-tp5787214p5787260.html Sent from the PostgreSQL - general mailing list archive at Nabble.com. -- Sent via pgsql-general mailing list

Re: [GENERAL] Index space growing even after cleanup via autovacuum in Postgres 9.2

2014-01-15 Thread Tirthankar Barari
On 01/13/2014 01:38 PM, Francisco Olarte wrote: Hi: On Mon, Jan 13, 2014 at 5:26 PM, Tirthankar Barari tbar...@verizon.com wrote: On 01/10/2014 07:06 AM, Francisco Olarte wrote: Not related to your vacuum problem, but if your pattern is something like deleting everything inserted 15 days ago

Re: [GENERAL] pg_basebackup failing

2014-01-15 Thread Alan Nilsson
Thanks all alan On Jan 15, 2014, at 6:30 AM, Michael Paquier michael.paqu...@gmail.com wrote: On Wed, Jan 15, 2014 at 8:05 PM, Sameer Kumar sameer.ku...@ashnik.com wrote: The error you are seeing is triggered because this relation file exceeds MAX_TAR_MEMBER_FILELEN or 8GB for a single

[GENERAL] Is http://www.postgresql.org/docs/9.3/static/row-estimation-examples.html up to date?

2014-01-15 Thread Torsten Förtsch
Hi, I am asking because ... I have a table with relpages | 19164 reltuples | 194775 pg_relation_size / 8192 yields the same number as relpages. So, there is no need to scale reltuples. Relcardinality is therefore 194775. Statistics target is the default, 100. So, I assume each of the 100

[GENERAL] vacuum vs pg_repack for clearing bloat?

2014-01-15 Thread Lists
Our app makes extensive use of temp tables, and this causes a significant amount of bloat that can often only be cleared with a manual vacuum process. We're looking for a better way that doesn't involve locking, we found pg_repack and pg_reorg and were wondering if anybody here could weigh in

Re: [GENERAL] vacuum vs pg_repack for clearing bloat?

2014-01-15 Thread Tom Lane
Lists li...@benjamindsmith.com writes: Our app makes extensive use of temp tables, and this causes a significant amount of bloat that can often only be cleared with a manual vacuum process. We're looking for a better way that doesn't involve locking, we found pg_repack and pg_reorg and

Re: [GENERAL] vacuum vs pg_repack for clearing bloat?

2014-01-15 Thread Andrew Sullivan
On Wed, Jan 15, 2014 at 04:09:28PM -0800, Lists wrote: Our app makes extensive use of temp tables, and this causes a significant amount of bloat that can often only be cleared with a Note what Tom Lane said, but why do you have bloat that can only be cleared by vacuum? Why not drop them or

Re: [GENERAL] vacuum vs pg_repack for clearing bloat?

2014-01-15 Thread John R Pierce
On 1/15/2014 4:09 PM, Lists wrote: Our app makes extensive use of temp tables, and this causes a significant amount of bloat that can often only be cleared with a manual vacuum process. whats the persistence of these temporary tables?by design, they are meant for relatively short

Re: [GENERAL] vacuum vs pg_repack for clearing bloat?

2014-01-15 Thread Lists
On 01/15/2014 04:24 PM, Tom Lane wrote: Lists li...@benjamindsmith.com writes: Our app makes extensive use of temp tables, and this causes a significant amount of bloat that can often only be cleared with a manual vacuum process. We're looking for a better way that doesn't involve locking, we