Re: [GENERAL] NpgsqlCopySerializer blows up if no rows are saved

2013-12-02 Thread Francisco Figueiredo Jr.
Whooops. Sorry for not replying. :-( I'll check the problem and reply you back. Em 02/12/2013 20:21, "AK" escreveu: > I did a week ago - and got no replies at all. Thank you. > > > > -- > View this message in context: > http://postgresql.1045698.n5.nabble.com/NpgsqlCopySerializer-blows-up-if-n

Re: [GENERAL] Inserting boolean types as an alias?

2013-12-02 Thread John R Pierce
On 12/2/2013 5:18 PM, David Johnston wrote: Not sure an enum would work since the source table has the "status" column defined as boolean... well, you'd need to alter the table to use an enum, of course. -- john r pierce 37N 122W somewhere on the middle o

Re: [GENERAL] Inserting boolean types as an alias?

2013-12-02 Thread David Johnston
John R Pierce wrote > On 12/2/2013 3:46 PM, Nick wrote: >> Hello I am new to this site and also a student. I am working on an >> assignment >> and was wondering if there is a way to make an alias for a boolean? For >> example when I am making a table called club_games and it must contain >> the >>

Re: [GENERAL] Mismatched pg_class.reltuples between table and primary key

2013-12-02 Thread bricklen
Hi Alvaro, Thanks for the link. On Mon, Dec 2, 2013 at 4:35 PM, Alvaro Herrera wrote: > bricklen escribió: > > We recently experienced a hard crash of a dev server due to lack of > > resources (we think, still investigating). > > That resulted in an interesting scenario where one of the tables w

Re: [GENERAL] Mismatched pg_class.reltuples between table and primary key

2013-12-02 Thread Alvaro Herrera
bricklen escribió: > We recently experienced a hard crash of a dev server due to lack of > resources (we think, still investigating). > That resulted in an interesting scenario where one of the tables was > returning 12 rows from "select * from tbl", but "select * from tbl order by > " was only ret

Re: [GENERAL] Mismatched pg_class.reltuples between table and primary key

2013-12-02 Thread Tom Lane
bricklen writes: > We recently experienced a hard crash of a dev server due to lack of > resources (we think, still investigating). > That resulted in an interesting scenario where one of the tables was > returning 12 rows from "select * from tbl", but "select * from tbl order by > " was only retu

Re: [GENERAL] Inserting boolean types as an alias?

2013-12-02 Thread John R Pierce
On 12/2/2013 3:46 PM, Nick wrote: Hello I am new to this site and also a student. I am working on an assignment and was wondering if there is a way to make an alias for a boolean? For example when I am making a table called club_games and it must contain the memberID, gameID, count, and status as

Re: [GENERAL] Inserting boolean types as an alias?

2013-12-02 Thread Adrian Klaver
On 12/02/2013 03:46 PM, Nick wrote: Hello I am new to this site and also a student. I am working on an assignment and was wondering if there is a way to make an alias for a boolean? For example when I am making a table called club_games and it must contain the memberID, gameID, count, and status

[GENERAL] Does "--no-unlogged-table-data" prevent table locking?

2013-12-02 Thread Steve Crawford
If a database has an unlogged table and that table is truncated during while a database dump with the "--no-unlogged-table-data" option is running, will the table be locked against a truncate or will the truncate succeed? The documentation is unclear on this detail. Background: We have a regu

[GENERAL] Inserting boolean types as an alias?

2013-12-02 Thread Nick
Hello I am new to this site and also a student. I am working on an assignment and was wondering if there is a way to make an alias for a boolean? For example when I am making a table called club_games and it must contain the memberID, gameID, count, and status as column fields. When I enter the dat

Re: [GENERAL] query creates a huge toast tables

2013-12-02 Thread Jeff Janes
On Thu, Nov 28, 2013 at 8:25 AM, wrote: > > Hi, > This query (postgis) didn't endup after 4 hoursand eat 40gig of disk > space > SELECT id, gridcode, ST_Difference(a.geom32198_s,b.geom32198_s) as > geom32198_s > into potentialite > FROM province as a, potentialite_tmp as b; > > I stopped t

Re: [GENERAL] NpgsqlCopySerializer blows up if no rows are saved

2013-12-02 Thread AK
I did a week ago - and got no replies at all. Thank you. -- View this message in context: http://postgresql.1045698.n5.nabble.com/NpgsqlCopySerializer-blows-up-if-no-rows-are-saved-tp5781300p5781316.html Sent from the PostgreSQL - general mailing list archive at Nabble.com. -- Sent via pgsq

Re: [GENERAL] NpgsqlCopySerializer blows up if no rows are saved

2013-12-02 Thread Francisco Figueiredo Jr.
Hi! You should post Npgsql questions to our user's forums : http://forums.npgsql.org In this case I think it is a bug in Npgsql. Please add this test program to your post when talking about this problem. Thanks in advance. Em 02/12/2013 19:29, "AK" escreveu: > I am not sure if this is the cor

[GENERAL] PgAgent Error 1053 on Windows 2008 R2 Server

2013-12-02 Thread Mark Street
Dear Sir/Madam, PgAgent is failing to start, giving an "Error 1053: The service did not respond to the start or control request in a timely fashion" on a Windows 2008 R2 server. I can run pgagent no problems in DEBUG mode. I have un-installed and re-installed PgAgent multiple times. I have check

[GENERAL] Mismatched pg_class.reltuples between table and primary key

2013-12-02 Thread bricklen
We recently experienced a hard crash of a dev server due to lack of resources (we think, still investigating). That resulted in an interesting scenario where one of the tables was returning 12 rows from "select * from tbl", but "select * from tbl order by " was only returning 11. Looking at pg_clas

[GENERAL] NpgsqlCopySerializer blows up if no rows are saved

2013-12-02 Thread AK
I am not sure if this is the correct place to post my question to. If this is a wrong list, can you tell me the right one. I am bulk loading rows using the following code: const string connString = "myConnString"; using(var conn = new NpgsqlConnection(connString)) { conn.Open(); var command = con

Re: [GENERAL] Help ! FAILOVER with Slony-I.

2013-12-02 Thread John R Pierce
On 12/2/2013 4:11 AM, Tobadao wrote: I'm using Slony-I and Streaming Replication. those are two completely different and incompatible replication methods. a streaming replication MASTER could participate in slony table replication with a 3rd server, but afaik a streaming SLAVE can't/should

[GENERAL] Help ! FAILOVER with Slony-I.

2013-12-02 Thread Tobadao
Hi, everyone. I'm using Slony-I and Streaming Replication. how to failover with slony-i ? I have an example FAILOVER ( ID = 1, BACKUP NODE = 2 ); but how to use it ? pl, help me ! -- View this message in context: http://postgresql.1045698.n5.nabble.com/Help-FAILOVER-with-Slony-I-tp5781156

Re: [GENERAL] unnest on multi-dimensional arrays

2013-12-02 Thread Tom Lane
Zev Benjamin writes: > This actually looks to mostly be a parser limitation: Well, you'd also need some execution-time infrastructure to evaluate an expression, if we allowed one there, but I agree it wouldn't be a tremendously complicated patch. We'd just not foreseen a good reason to support a

Re: [GENERAL] unnest on multi-dimensional arrays

2013-12-02 Thread Zev Benjamin
This actually looks to mostly be a parser limitation: foreach_slice : { $$ = 0; } | K_SLICE ICONST

Re: [GENERAL] unnest on multi-dimensional arrays

2013-12-02 Thread Pavel Stehule
2013/12/2 Zev Benjamin > Hrm. Conceptually, I think you actually want something like: > > > CREATE OR REPLACE FUNCTION public.reduce_dim(anyarray) > RETURNS SETOF anyarray > LANGUAGE plpgsql > AS $function$ > DECLARE > s $1%type; > d int; > BEGIN > d := array_ndims($1) - 1; > FOREACH s

Re: [GENERAL] unnest on multi-dimensional arrays

2013-12-02 Thread Zev Benjamin
Hrm. Conceptually, I think you actually want something like: CREATE OR REPLACE FUNCTION public.reduce_dim(anyarray) RETURNS SETOF anyarray LANGUAGE plpgsql AS $function$ DECLARE s $1%type; d int; BEGIN d := array_ndims($1) - 1; FOREACH s SLICE d IN ARRAY $1 LOOP RETURN NEXT s;

Re: [GENERAL] unnest on multi-dimensional arrays

2013-12-02 Thread Zev Benjamin
Thanks for the explanation and examples! Zev On 11/28/2013 10:03 AM, Tom Lane wrote: David Johnston writes: Zev Benjamin wrote It appears that unnest, when called on a multi-dimensional array, effectively flattens the array first. For example: ... Multidimensional arrays do have shortco

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

2013-12-02 Thread Jeff Janes
On Mon, Dec 2, 2013 at 6:22 AM, Spiros Ioannou wrote: > We are dumping a 4TB postgres database using pg_dump. The source is on a > copy-on-write snapshot filesystem, and the target is an external drive. > > While the pg_dump is running we get about 4-5MB/sec writes on the > filesystem where postg

Re: [GENERAL] Streaming replication and WAL archives

2013-12-02 Thread Tree
On Mon, 25 Nov 2013, Tree wrote: TLDR: We want to be able to use streaming replication, WAL archiving, and have the ability to restore from a backup made before a failover using the WAL archive. (cutting rest of long description) So, is it possible to use a "long-term WAL archive area" (as t

Re: [GENERAL] Use environment variables in postgresql.conf

2013-12-02 Thread Andrew Sullivan
Hi, On Sat, Nov 30, 2013 at 08:43:53PM -0500, imagene...@gmail.com wrote: > The questions are: > > 1. Has var expansion in configuration files been contemplated? > 2. Why not do it? Several years ago on the -hackers list (I couldn't say how many, but I was still supervising the database operatio

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

2013-12-02 Thread Spiros Ioannou
We are dumping a 4TB postgres database using pg_dump. The source is on a copy-on-write snapshot filesystem, and the target is an external drive. While the pg_dump is running we get about 4-5MB/sec writes on the filesystem where postgresql data is (iostat), and specifically inside the base/ directo