Re: [GENERAL] Case sensitivity

2013-12-10 Thread John R Pierce
On 12/10/2013 10:31 PM, Dev Kumkar wrote: I know about CITEXT data type, but what am looking for is if there any parameter at database level which just makes the database case insensitive. there's nothing that will do that in postgres. whats wrong with using CITEXT ? -- john r pierce

[GENERAL] Case sensitivity

2013-12-10 Thread Dev Kumkar
How to create case insensitive database? I know about CITEXT data type, but what am looking for is if there any parameter at database level which just makes the database case insensitive. I mean both values 'ABC' and 'abc' are treated same for inserts and also all the comparisons by default are c

Re: [GENERAL] Trigger Firing Order

2013-12-10 Thread Tom Lane
Sameer Kumar writes: > Is it possible for me to define the order in which triggers will be fired? Sure: choose their names so that their alphabetical ordering is the firing order you want. But I see you knew that. > But with certain packaged products who create their own triggers, I won't > hav

Re: [GENERAL] Trigger Firing Order

2013-12-10 Thread David Johnston
Sameer Kumar wrote > Hi, > > Is it possible for me to define the order in which triggers will be fired? > > So far what I have understood from PostgreSQL documentation, in order to > fire 2 triggers in sequence (say trigger1 and trigger2) on a table, I need > to name them in that way. > But with

Re: [Postgres-xc-general] [GENERAL] "Tuple not found error" during Index creation

2013-12-10 Thread Michael Paquier
On Wed, Dec 11, 2013 at 1:17 PM, Sandeep Gupta wrote: > Hi Michael, > > I can provide the table schema and the data over which indexing almost > always fails with tuple not found error. > Would this be of help. The other issue is that file is 3.2GB so we would > have work some logistics to tran

Re: [Postgres-xc-general] [GENERAL] "Tuple not found error" during Index creation

2013-12-10 Thread Sandeep Gupta
Hi Michael, I can provide the table schema and the data over which indexing almost always fails with tuple not found error. Would this be of help. The other issue is that file is 3.2GB so we would have work some logistics to transfer this across. Let me know. -Sandeep On Mon, Dec 9, 2013 a

[GENERAL] Trigger Firing Order

2013-12-10 Thread Sameer Kumar
Hi, Is it possible for me to define the order in which triggers will be fired? So far what I have understood from PostgreSQL documentation, in order to fire 2 triggers in sequence (say trigger1 and trigger2) on a table, I need to name them in that way. But with certain packaged products who creat

Re: [Postgres-xc-general] [GENERAL] "Tuple not found error" during Index creation

2013-12-10 Thread Michael Paquier
On Tue, Dec 10, 2013 at 11:00 PM, Mason Sharp wrote: > In our StormDB fork (now TransLattice Storm) I made some changes to address > some issues that were uncovered with XC. I am not sure if it will address > this specific issue above, but in most cases we make it an error instead of > falling bac

Re: [GENERAL] Zero dead tuples, when significant apparent bloat

2013-12-10 Thread Tom Lane
John Melesky writes: > It seems clear that there were dead tuples, since the table size shrank to > an eighth of its previous size. Why did analyze not pick that up? Dead tuples and empty space are not the same thing. regards, tom lane -- Sent via pgsql-general mailing

Re: [GENERAL] Zero dead tuples, when significant apparent bloat

2013-12-10 Thread bricklen
On Tue, Dec 10, 2013 at 5:05 PM, John Melesky wrote: > It seems clear that there were dead tuples, since the table size shrank to > an eighth of its previous size. Why did analyze not pick that up? > Am I missing something? > This is a very large database, so we want to introspect against live/dea

[GENERAL] Zero dead tuples, when significant apparent bloat

2013-12-10 Thread John Melesky
Here's the situation: relation_size | indexes_size | total_relation_size ++- 997 MB | 2073 MB| 3070 MB (1 row) If I select n_dead_tup from pg_stat_user_tables, I get: n_dead_tup 0 Okay, so I run ANA

Re: [GENERAL] validate synatax

2013-12-10 Thread Jerry Sievers
Peter Kroon writes: > Hi, > > How can I validate any query on PostgreSQL without executing the sql. > I was able with EXPLAIN to find some errors. However this only worked with a > SELECT statement. When i tried to create a TABLE it would not run. > I do not wish to install external packages. Pr

Re: [GENERAL] validate synatax

2013-12-10 Thread Peter Kroon
>Why do you want to do that? I want to validate the SQL syntax and preferably in the browser using some kind of linter. >You can always run it inside transaction and rollback at the end. Sounds dangerous and will make the server very active because it is executing the SQL. Yes, the SQL should be

Re: [GENERAL] validate synatax

2013-12-10 Thread Szymon Guz
On 10 December 2013 22:40, Peter Kroon wrote: > Hi, > > How can I validate any query on PostgreSQL without executing the sql. > I was able with EXPLAIN to find some errors. However this only worked with > a SELECT statement. When i tried to create a TABLE it would not run. > I do not wish to inst

[GENERAL] validate synatax

2013-12-10 Thread Peter Kroon
Hi, How can I validate any query on PostgreSQL without executing the sql. I was able with EXPLAIN to find some errors. However this only worked with a SELECT statement. When i tried to create a TABLE it would not run. I do not wish to install external packages. Preferably use only default present

Re: [GENERAL] Q: regarding backends

2013-12-10 Thread Kevin Grittner
Stephan Fabel wrote: > On Tuesday, December 10, 2013 06:49:01 AM you wrote: >> I'd much ratherĀ  have the focus stay on a tightly integrated, >> reliable system than have a bunch of weird choices that can >> improve my performance by .5% while causing unexpected breakage. > > Hardly .5%... - see h

Re: postgresql.org inconsistent (Re: [GENERAL] PG replication across DataCenters)

2013-12-10 Thread Kevin Grittner
Tom Lane wrote: > Wolfgang Keller writes: >>> postgresql-xc is not postgresql, its a fork. > >> It would at least merit being mentioned in the doc, just like >> other "forks" or whatever you may call it, as long as they're >> open-source. > > You seem to not realize how many forks of Postgres th

Re: [GENERAL] Q: regarding backends

2013-12-10 Thread Stephan Fabel
On Tuesday, December 10, 2013 06:49:01 AM you wrote: > On Mon, 09 Dec 2013 06:20:41 -1000 Stephan Fabel wrote: > > We'd be very interested in seeing the effects of integrating LMDB [*] in > > terms of performance gains. Has this avenue been explored before? > > I have to say that I'm VERY happy t

Re: postgresql.org inconsistent (Re: [GENERAL] PG replication across DataCenters)

2013-12-10 Thread Tom Lane
Wolfgang Keller writes: >> postgresql-xc is not postgresql, its a fork. > It would at least merit being mentioned in the doc, just like other > "forks" or whatever you may call it, as long as they're open-source. You seem to not realize how many forks of Postgres there are. There's no way that w

Re: postgresql.org inconsistent (Re: [GENERAL] PG replication across DataCenters)

2013-12-10 Thread Wolfgang Keller
> > Seems to me that the editing process of the different parts of > > postgresql.org somewhat lacks transactional semantics. > > postgresql-xc is not postgresql, its a fork. As an end-user, why would I care. Since, besides that it's still open-source (even same license as PostgreSQL itself...?)

Re: [GENERAL] While only running pg_dump, postgresql performs writes inside base/ directory. How can we stop this?

2013-12-10 Thread Jeff Janes
On Tue, Dec 10, 2013 at 12:43 AM, Spiros Ioannou wrote: > Hi Jeff, > autovacuum is off on the DB running on the filesystem snapshot. > Which probably makes sense on the snapshot, but is it also off on the pre-snapshot database? > What "hint bits" do you suppose it is setting? It's running only

Re: [GENERAL] Question about optimizing access to a table.

2013-12-10 Thread Jeff Janes
On Tue, Dec 10, 2013 at 8:23 AM, Herouth Maoz wrote: > > Hello. > > I have one particular table with very specialized use. I am sending > messages to some partner. The partner processes them asynchronously, and > then returns the status report to me. The table is used to store a > serialized vers

Re: [GENERAL] Question about optimizing access to a table.

2013-12-10 Thread Kevin Grittner
Herouth Maoz wrote: > The problem starts when our partner has some glitch, under high > load, and fails to send back a few hundred thousand reports. In > that case, the table grows to a few hundred records, and they are > not deleted until they hit their expiry date, at which point the > "garbage

Re: [GENERAL] client that supports editing views

2013-12-10 Thread Richard Broersma
On Mon, Dec 9, 2013 at 7:16 AM, Adrian Klaver wrote: > Is there a timestamp field in the view? This sounds like an issue Access > has with timestamp precision, where if you supply a timestamp that is too > precise it has problems. See here for more detail: > Updateable view can be a challenge du

Re: postgresql.org inconsistent (Re: [GENERAL] PG replication across DataCenters)

2013-12-10 Thread John R Pierce
On 12/10/2013 8:47 AM, Wolfgang Keller wrote: Seems to me that the editing process of the different parts of postgresql.org somewhat lacks transactional semantics. postgresql-xc is not postgresql, its a fork.there's other forks that offer distributed databases, such as greenplum. -- jo

Re: postgresql.org inconsistent (Re: [GENERAL] PG replication across DataCenters)

2013-12-10 Thread Steve Atkins
On Dec 10, 2013, at 8:47 AM, Wolfgang Keller wrote: >> http://www.postgresql.org/docs/9.3/static/different-replication-solutions.html? > >> Synchronous Multimaster Replication > > *snip* > >> PostgreSQL does not offer this type of replication (...) > > Now I compare that statement with: > >

Re: [GENERAL] cannot delete some records [9.3] - semi-resolved

2013-12-10 Thread Frank Miles
I have a workaround for the mysterious inability to delete records from one particular table not notably different from many others. This does not explain the problem, but at least enables me to move on... Whether all of the following steps are necessary I can't say. Instead of loading the 9.3 D

postgresql.org inconsistent (Re: [GENERAL] PG replication across DataCenters)

2013-12-10 Thread Wolfgang Keller
> http://www.postgresql.org/docs/9.3/static/different-replication-solutions.html? > Synchronous Multimaster Replication *snip* > PostgreSQL does not offer this type of replication (...) Now I compare that statement with: http://wiki.postgresql.org/wiki/Postgres-XC > Project Overview *snip*

Re: [Postgres-xc-general] [GENERAL] "Tuple not found error" during Index creation

2013-12-10 Thread Mason Sharp
On Mon, Dec 9, 2013 at 8:49 PM, Michael Paquier wrote: > On Tue, Dec 10, 2013 at 7:17 AM, Sandeep Gupta > wrote: > > We are trying to trace cause and potential solution of "tuple not found" > > error with postgres-xc. The problem happens when indexing a large file. > It > > seems the autovaccum

Re: [GENERAL] Q: regarding backends

2013-12-10 Thread Merlin Moncure
On Tue, Dec 10, 2013 at 5:49 AM, Bill Moran wrote: > On Mon, 09 Dec 2013 06:20:41 -1000 Stephan Fabel wrote: > >> Hi all, >> >> and sorry if I'm asking a question that has been answered before; has the >> PostgreSQL community ever considered different key/value backends (sort of >> like >> MySQL

[GENERAL] Question about optimizing access to a table.

2013-12-10 Thread Herouth Maoz
Hello. I have one particular table with very specialized use. I am sending messages to some partner. The partner processes them asynchronously, and then returns the status report to me. The table is used to store a serialized version of the message object, together with a few identifiers, expi

Re: [GENERAL] DB Audit

2013-12-10 Thread bricklen
On Tue, Dec 10, 2013 at 6:53 AM, wrote: > I am using sybase ase as dbms and I would migrate to postgresql, but > the absence of a built in DB audit functionality is a show stopper for me. > > So I would know if there is a way to get information about DB events like: > > server boots > > login &

Re: [GENERAL] Return setof values from C-function

2013-12-10 Thread Merlin Moncure
On Tue, Dec 10, 2013 at 9:44 AM, Yuriy Rusinov wrote: > I have added code > > Oid * oids = (Oid *)palloc (2*sizeof (Oid)); > oids[0] = INT8OID; > oids[1] = FLOAT8OID; > if (get_call_result_type(fcinfo, oids, &tupdescRes) != > TYPEFUNC_COMPOSITE) > erepor

Re: [GENERAL] Return setof values from C-function

2013-12-10 Thread Yuriy Rusinov
I have added code Oid * oids = (Oid *)palloc (2*sizeof (Oid)); oids[0] = INT8OID; oids[1] = FLOAT8OID; if (get_call_result_type(fcinfo, oids, &tupdescRes) != TYPEFUNC_COMPOSITE) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),

Re: [GENERAL] Return setof values from C-function

2013-12-10 Thread Merlin Moncure
On Tue, Dec 10, 2013 at 1:30 AM, Yuriy Rusinov wrote: > Dear Colleagues ! > > I have to return setof values from C-function > > I wrote > > FuncCallContext *funcctx; > int call_cntr; > int max_calls; > AttInMetadata *attinmeta; > unsigned long il; > if (SRF_IS_FIRSTCALL())

Re: [GENERAL] DB Audit

2013-12-10 Thread Albe Laurenz
misspa...@tiscali.it wrote: > I am using sybase ase as dbms and I would migrate to postgresql, but the > absence of a built in DB > audit functionality is a show stopper for me. > > So I would know if there is a way to get information about DB events like: > > server boots > > login & logout >

Re: [GENERAL] add parameter to existing function

2013-12-10 Thread Merlin Moncure
On Tue, Dec 10, 2013 at 8:26 AM, Peter Kroon wrote: > Hi, > > I can use: create or replace function etc > to alter a function. > > However, this will create a new function instead of replacing the old one > when adding a parameter. > Is this possible without the use of DROP and CASCADE? nope!

Re: [GENERAL] Q: regarding backends

2013-12-10 Thread Ian Lawrence Barwick
2013/12/10 Stephan Fabel : > Hi all, > > and sorry if I'm asking a question that has been answered before; has the > PostgreSQL community ever considered different key/value backends (sort of > like > MySQL with its many different options)? > > We'd be very interested in seeing the effects of inte

[GENERAL] DB Audit

2013-12-10 Thread misspaola
Hi, I am using sybase ase as dbms and I would migrate to postgresql, but the absence of a built in DB audit functionality is a show stopper for me. So I would know if there is a way to get information about DB events like: server boots login & logout table access. attempt to access p

[GENERAL] add parameter to existing function

2013-12-10 Thread Peter Kroon
Hi, I can use: create or replace function etc to alter a function. However, this will create a new function instead of replacing the old one when adding a parameter. Is this possible without the use of DROP and CASCADE? The function that I'm trying to alter is on some tables a default value.

Re: [GENERAL] PG replication across DataCenters (section 25 in the manual)

2013-12-10 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 > Columns 1-3 and 5 could say "Entire Cluster". Column 4 might say > "Selected tables (Slony)", and I'm not sure off-hand what granularity #6 > (Bucardo) is capable of. Column #7 might just say "Varies". Bucardo and Slony are both table-bas

Re: [GENERAL] client that supports editing views

2013-12-10 Thread Thomas Kellerer
Willy-Bas Loos, 10.12.2013 13:30: > cool, SQL Workbench/J: does the job. > It's too bad that it doesn't list the lables/views, so that you can't just > open them with a click > (i use select * from table to get the data), but it works well. > Did you check the "Database Explorer"? http://www.s

Re: [GENERAL] client that supports editing views

2013-12-10 Thread Willy-Bas Loos
cool, SQL Workbench/J: does the job. It's too bad that it doesn't list the lables/views, so that you can't just open them with a click (i use select * from table to get the data), but it works well. thanks Thomas. On Mon, Dec 9, 2013 at 11:51 PM, Thomas Kellerer wrote: > Willy-Bas Loos wrote o

Re: [GENERAL] Q: regarding backends

2013-12-10 Thread Bill Moran
On Mon, 09 Dec 2013 06:20:41 -1000 Stephan Fabel wrote: > Hi all, > > and sorry if I'm asking a question that has been answered before; has the > PostgreSQL community ever considered different key/value backends (sort of > like > MySQL with its many different options)? > > We'd be very inter

Re: [GENERAL] PG replication across DataCenters

2013-12-10 Thread Bill Moran
On Mon, 09 Dec 2013 11:09:21 -0500 Thomas Harold wrote: > On 11/22/2013 5:57 AM, Albe Laurenz wrote: > > Kaushal Shriyan wrote: > >> I have read on the web that Postgresql DB supports replication > >> across data centers. Any real life usecase examples if it has been > >> implemented by anyone.

[GENERAL] Bitmap Heap Scan slowdown

2013-12-10 Thread Wojciech Skaba
I have a query that results in the folowing EXPLAIN ANALYZE: - Limit (cost=0.00..537.96 rows=1 width=46) (actual time=53.869..53.871 rows=1 loops=1) -> Index Scan using addr_order_idx on addr (cost=0.00..234014.08 rows=435 width=46) (actual time=53.862..53.862 rows=1 l

Re: [GENERAL] [pgadmin-support] Lost database

2013-12-10 Thread Albe Laurenz
John R Pierce wrote: > if the postgresql server was running when that file backup was made(*), > its pretty much worthless, it will have data corruption and errors > throughout. Well, it would be better than nothing. You can pg_resetxlog and manually clean up the inconsistencies. That's better tha

Re: [GENERAL] While only running pg_dump, postgresql performs writes inside base/ directory. How can we stop this?

2013-12-10 Thread Spiros Ioannou
Hi Jeff, autovacuum is off on the DB running on the filesystem snapshot. What "hint bits" do you suppose it is setting? It's running only one COPY command for days. Do you have any suggestions to make it more "read only" ? On 2 December 2013 18:14, Jeff Janes wrote: > On Mon, Dec 2, 2013 at 6:2