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 jeff.ja...@gmail.com wrote: On Mon,

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 than

[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

Re: [GENERAL] PG replication across DataCenters

2013-12-10 Thread Bill Moran
On Mon, 09 Dec 2013 11:09:21 -0500 Thomas Harold thomas-li...@nybeta.com 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

Re: [GENERAL] Q: regarding backends

2013-12-10 Thread Bill Moran
On Mon, 09 Dec 2013 06:20:41 -1000 Stephan Fabel sfa...@hawaii.edu 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

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 spam_ea...@gmx.net wrote:

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?

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-based and

[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

[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

Re: [GENERAL] Q: regarding backends

2013-12-10 Thread Ian Lawrence Barwick
2013/12/10 Stephan Fabel sfa...@hawaii.edu: 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

Re: [GENERAL] add parameter to existing function

2013-12-10 Thread Merlin Moncure
On Tue, Dec 10, 2013 at 8:26 AM, Peter Kroon plakr...@gmail.com 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

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 table

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 yrusi...@gmail.com 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

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 9:44 AM, Yuriy Rusinov yrusi...@gmail.com 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)

Re: [GENERAL] DB Audit

2013-12-10 Thread bricklen
On Tue, Dec 10, 2013 at 6:53 AM, 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

[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,

Re: [GENERAL] Q: regarding backends

2013-12-10 Thread Merlin Moncure
On Tue, Dec 10, 2013 at 5:49 AM, Bill Moran wmo...@potentialtech.com wrote: On Mon, 09 Dec 2013 06:20:41 -1000 Stephan Fabel sfa...@hawaii.edu 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

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 michael.paqu...@gmail.comwrote: On Tue, Dec 10, 2013 at 7:17 AM, Sandeep Gupta gupta.sand...@gmail.com wrote: We are trying to trace cause and potential solution of tuple not found error with postgres-xc. The problem happens when indexing a

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: [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

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 felip...@gmx.net 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: 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. --

Re: [GENERAL] client that supports editing views

2013-12-10 Thread Richard Broersma
On Mon, Dec 9, 2013 at 7:16 AM, Adrian Klaver adrian.kla...@gmail.comwrote: 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

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

2013-12-10 Thread Kevin Grittner
Herouth Maoz hero...@unicell.co.il 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

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 hero...@unicell.co.il 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

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 siv...@inaccess.comwrote: 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?

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: postgresql.org inconsistent (Re: [GENERAL] PG replication across DataCenters)

2013-12-10 Thread Tom Lane
Wolfgang Keller felip...@gmx.net 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

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 sfa...@hawaii.edu 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

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

2013-12-10 Thread Kevin Grittner
Tom Lane t...@sss.pgh.pa.us wrote: Wolfgang Keller felip...@gmx.net 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

Re: [GENERAL] Q: regarding backends

2013-12-10 Thread Kevin Grittner
Stephan Fabel sfa...@hawaii.edu 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

[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] validate synatax

2013-12-10 Thread Szymon Guz
On 10 December 2013 22:40, Peter Kroon plakr...@gmail.com 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

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 Jerry Sievers
Peter Kroon plakr...@gmail.com 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

[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

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 john.mele...@rentrakmail.comwrote: 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

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

2013-12-10 Thread Tom Lane
John Melesky john.mele...@rentrakmail.com 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 --

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 msh...@translattice.com 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

[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

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

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 gupta.sand...@gmail.com 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

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 certain

Re: [GENERAL] Trigger Firing Order

2013-12-10 Thread Tom Lane
Sameer Kumar sameer.ku...@ashnik.com 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

[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

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