[BUGS] Cant start PostgreSQL Using command prompt

2013-09-11 Thread Saravanan Nagarajan
Hi,

I am using PostgreSQL. If am starting the db with System Account/ any
domain account using wrapper, the DB is starting fine.

If i am trying to start the PostgreSQL DB using command prompt, [Normal
mode or Run as administrator.], It wont start. I provided full permission
for everyone in Postgres DB Folder.

I didn't find any error in pg_log file. I installed DB in 2008 R2 windows
machine.

My command : *pg_ctl -D "..\data" -o -p3306 --log "D:\logs\pglog.txt" start
&*
*
*
Thanks in advance.

-- 
Regards
  Saravanan.N.


[BUGS] BUG #8443: duplicated oids after dump

2013-09-11 Thread b . rychtarski
The following bug has been logged on the website:

Bug reference:  8443
Logged by:  Bartłomiej Rychtarski
Email address:  b.rychtar...@teb-akademia.pl
PostgreSQL version: 9.2.4
Operating system:   debian
Description:

executed full dump of database without oids:
pg_dump -v -a -E UTF8  --disable-dollar-quoting --disable-triggers


after restoring database from dump in each table there are rows with
duplicated oids 


problem applies to about 2% of rows in each table




-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


Re: [BUGS] Cant start PostgreSQL Using command prompt

2013-09-11 Thread Michael Paquier
On Wed, Sep 11, 2013 at 4:00 AM, Saravanan Nagarajan
 wrote:
> Hi,
>
> I am using PostgreSQL. If am starting the db with System Account/ any domain
> account using wrapper, the DB is starting fine.
>
> If i am trying to start the PostgreSQL DB using command prompt, [Normal mode
> or Run as administrator.], It wont start. I provided full permission for
> everyone in Postgres DB Folder.
>
> I didn't find any error in pg_log file. I installed DB in 2008 R2 windows
> machine.
>
> My command : pg_ctl -D "..\data" -o -p3306 --log "D:\logs\pglog.txt" start &
What is exactly the version of Postgres you are trying to use?
What is the output of D:\logs\pglog.txt?
-- 
Michael


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


Re: [BUGS] Error by restore a database

2013-09-11 Thread Michael Paquier
On Mon, Sep 9, 2013 at 11:38 PM, Sbis-Partner  wrote:
> Hello!
>
> When you restore a database error occurs
>
> «Pg_restore: creating TABLE dbschema
>
> pg_restore: [archiver (db)] Error from TOC entry 1428; 1259 83487 TABLE
> dbschema User
>
> pg_restore: [archiver (db)] could not execute query: ERROR: role "User" does
> not exist
>
>  Command was: ALTER TABLE public.dbschema OWNER TO "User" ».
User and group information are missing in your dump, this information
can be retrieved with pg_dumpall. There are two possibilities in your
case:
- Use the dump you created previously and complete it with data from
pg_dumpall --globals-only containing only user and tablespace
information
- Use a global dump with pg_dumpall with the user information as well
as the database
The latter solution is more instinctive IMO, but the former solution
will work fine as well.
-- 
Michael


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


Re: [BUGS] BUG #8440: sevices not started automatically

2013-09-11 Thread Michael Paquier
On Mon, Sep 9, 2013 at 12:55 AM,   wrote:
> The following bug has been logged on the website:
>
> Bug reference:  8440
> Logged by:  Jitendra Sabat
> Email address:  sabat.jitendr...@gmail.com
> PostgreSQL version: Unsupported/Unknown
> Operating system:   Window server 2012
> Description:
>
> Currently i am running postgres8.3 but its services is not started
> automatically when I start the system. I have tried manually start everyday.
> But sometime it stopped automatically.
Note that 8.3 is EOL since February 2013 and is not actually supported
by community anymore. So in your case you should consider an upgrade
to the latest minor release of 8.3 (you didn't provide which version
you are using exactly), or an upgrade to a latest version.

It is however hard to have an idea of what is causing your server to
stop if you do not provide more information like the startup logs.
-- 
Michael


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


Re: [BUGS] BUG #8443: duplicated oids after dump

2013-09-11 Thread Andres Freund
On 2013-09-11 12:07:25 +, b.rychtar...@teb-akademia.pl wrote:
> executed full dump of database without oids:
> pg_dump -v -a -E UTF8  --disable-dollar-quoting --disable-triggers
> 
> 
> after restoring database from dump in each table there are rows with
> duplicated oids

So, just to make sure I understand you correctly: You dumped a database
in a form that doesn't contain oids, loaded it into a new one where the
preexisting schema uses oids in user tables? After loading that data
there were duplicate oids?

* Do you have a unique constraint over the oid columns?
* Was there any preexisting data?
* Were there any concurrent inserts?
* Are the "duplicates" rows in the same relation or in different ones?
* How many records do exist in the restore you made?

Greetings,

Andres Freund

-- 
 Andres Freund http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


Re: [BUGS] Cant start PostgreSQL Using command prompt

2013-09-11 Thread John R Pierce

On 9/11/2013 4:00 AM, Saravanan Nagarajan wrote:
I am using PostgreSQL. If am starting the db with System Account/ any 
domain account using wrapper, the DB is starting fine.


If i am trying to start the PostgreSQL DB using command prompt, 
[Normal mode or Run as administrator.], It wont start. I provided full 
permission for everyone in Postgres DB Folder.


I didn't find any error in pg_log file. I installed DB in 2008 R2 
windows machine.


My command : *pg_ctl -D "..\data" -o -p3306 --log "D:\logs\pglog.txt" 
start &*

*
*



NET START "postgres service name"


btw, afaik Windows command prompt has no idea what & means.

--
john r pierce  37N 122W
somewhere on the middle of the left coast



[BUGS] BUG #8444: ERROR: table name "tblb" specified more than once in subquery

2013-09-11 Thread maps . on
The following bug has been logged on the website:

Bug reference:  8444
Logged by:  Andreas
Email address:  maps...@gmx.net
PostgreSQL version: 9.3.0
Operating system:   openSUSE 12.3 64bit and Windows XP
Description:

I've got the binaries from EnterpriseDB for 64bit Linux as well as 32bit
Windows.


If a table name or alias appeares within and outside a subquery PG throws
the error that this table was specified more than once.


The error doesn't show if this table gets joined as last in the subquery.


The error stays even without aliases.




Sample:
ERROR:  table name "tblb" specified more than once
Switch tblB and tblC in the subquery and it works.


WITH
  tblA (a_id, a_val) AS ( VALUES (1::integer, 'one-1'::varchar) )
, tblB (b_id, b_val) AS ( VALUES (1::integer, 'one-b'::varchar) )
, tblC (c_id, c_val) AS ( VALUES (1::integer, 'one-c'::varchar) )


select  *
fromtblA
jointblBon  tblA.a_id = tblB.b_id
join(
tblB
jointblCon  tblC.c_id = tblB.b_id
)   as  x   on  tblA.a_id = x.c_id;




Another sample now with real foreign key constraints:


droptable if exists sub_tab;
droptable if exists main_tab;
droptable if exists flag_1;
droptable if exists flag_2;


create  temporary table flag_1 ( flag_1_id integer primary key, flag_1_t
text );
insert into flag_1 values (0, null ), ( 1, 'a' ), ( 2, 'b' ), ( 3, 'c' );


create  temporary table flag_2 ( flag_2_id integer primary key, flag_2_t
text );
insert into flag_2 values (0, null ), ( 1, 'a' ), ( 2, 'b' ), ( 3, 'c' );


create  temporary table main_tab ( main_id integer primary key, main_t text,
flag_1_id integer references flag_1 ( flag_1_id ) );
insert into main_tab values ( 1, 'Main 1', 1 ), ( 2, 'Main 2', 2 ), ( 3,
'Main 3', 3 );


create  temporary table sub_tab ( sub_id integer primary key, sub_t text,
main_id integer references main_tab ( main_id ), flag_1_id integer
references flag_1 ( flag_1_id ), flag_2_id integer references flag_2 (
flag_2_id ) );
insert into sub_tab values ( 1, 'Sub 1', 1, 3, 1 ), ( 2, 'Sub 2', 2, 2, 2 ),
( 3, 'Sub 3', 3, 1, 3 );




select  m.main_id, m.main_t, f.flag_1_t,
x.sub_id, x.sub_t, x.flag_1_t, x.flag_2_t
frommain_tabas  m
joinflag_1  as  f   using   ( flag_1_id )
left join
(
sub_tab as  s
--joinflag_2  as  f2  using   ( flag_2_id ) --  this way
works
joinflag_1  as  f   using   ( flag_1_id )
joinflag_2  as  f2  using   ( flag_2_id )   --  that way
doesn't work
)   as  x   using   ( main_id );




-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


Re: [BUGS] Cant start PostgreSQL Using command prompt

2013-09-11 Thread Thomas Kellerer
John R Pierce, 11.09.2013 19:19:
> btw, afaik Windows command prompt has no idea what & means.

No, that's not true.

See here for example:







-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs