[GENERAL] SET PATH / DROP SCHEMA lock conflict

2012-10-31 Thread Christophe Pettus
Is there a potential lock conflict between SET PATH and DROP SCHEMA? I've observed (second-hand, so I haven't been able to check pg_locks) sessions piling up on a SET PATH while a DROP SCHEMA ... CASCADE is taking a long time to complete due to a large number of tables in the schema. Best, --

Re: [GENERAL] role does not exist

2012-10-31 Thread Craig Ringer
On 11/01/2012 06:54 AM, Kevin Burton wrote: > > I have successfully installed PostgreSQL on a Ubuntu Linux machine. > However right off the bat I type 'psql' and I get the error: 'role > "" does not exist'. > As with most Ubuntu packages, there's documentation on post-install setup steps in /u

[GENERAL] Corrupt Incrementally Updated Backup: missing pg_clog file

2012-10-31 Thread Jürgen Fuchsberger
Hi all, I have a problem with a corrupt backup, fortunately I was only testing so I did not loose any data. Unfortunetely what I did is to follow the backup guidelines in the documentation, which I thought should work reliably. Here are the details: I am running a postgreSQL 8.4 database on

Re: [GENERAL] role does not exist

2012-10-31 Thread Kevin Burton
What am I looking for? It is full of comments. If I am looking at the lines that don't begin with '#' I only see all and postgres as users. -Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Adrian Klaver Sent: Wednesday, Oc

Re: [GENERAL] role does not exist

2012-10-31 Thread Adrian Klaver
On 10/31/2012 06:01 PM, Kevin Burton wrote: I tried this and I get an error that 'psql: FATAL: role "postgres" does not exist' What is the content of /etc/postgresql/pg_hba.conf? -- Adrian Klaver adrian.kla...@gmail.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.

Re: [GENERAL] role does not exist

2012-10-31 Thread Kevin Burton
I tried this and I get an error that 'psql: FATAL: role "postgres" does not exist' -Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Joshua D. Drake Sent: Wednesday, October 31, 2012 6:33 PM To: Kevin Burton Cc: pgsql-gen

Re: [GENERAL] Why PGDLLIMPORT is needed

2012-10-31 Thread Xiong He
You can check the macro definition there: #ifdef BUILDING_DLL #define PGDLLIMPORT __declspec (dllexport) #else/* not BUILDING_DLL */ #define PGDLLIMPORT __declspec (dllimport) #endif #ifdef _MSC_VER #define PGDLLEXPORT __declspec (dllexport) #else #define PGDLLEXPORT #

Re: [GENERAL] Why SyncOneBuffer does not called frequently?

2012-10-31 Thread Xiong He
This perhaps proves that the bgwriter  doesn't need to call the SyncOneBuffer again on the same buffer.--Thanks&Regards,Xiong He-- Original --From:  "Xiong He";Date:  Thu, Nov 1, 2012 07:40 AMTo:  "高健"; "pgsql-general"; Subject:  Re: [GENERAL] Why Syn

Re: [GENERAL] dropdb breaks replication?

2012-10-31 Thread Edson Richter
Em 31/10/2012 20:47, Greg Williamson escreveu: Edson -- I've two PostgreSQL 9.1.6 running on Linux CentOS 5.8 64bit. They are replicated asynchronously. Yesterday, I've dropped a database of 20Gb, and then replication has broken, requiring me to manually synchronize both servers again. It is

Re: [GENERAL] Why SyncOneBuffer does not called frequently?

2012-10-31 Thread Xiong He
HI, I just debug the code, find that the following stack will call the SyncOneBuffer. >postgres.exe!SyncOneBuffer(int buf_id=2, char skip_recently_used=0) Line > 1640C postgres.exe!BufferSync(int flags=64) Line 1284 + 0xb bytesC postgres.exe!CheckPointBuffers(int flags=

Re: [GENERAL] role does not exist

2012-10-31 Thread Joshua D. Drake
On 10/31/2012 03:54 PM, Kevin Burton wrote: I have successfully installed PostgreSQL on a Ubuntu Linux machine. However right off the bat I type ‘psql’ and I get the error: ‘role “” does not exist’. Where xxx is the user name logged in. How do I overcome this hurdle. Right now all of our dat

Re: [GENERAL] role does not exist

2012-10-31 Thread Adrian Klaver
On 10/31/2012 03:54 PM, Kevin Burton wrote: I have successfully installed PostgreSQL on a Ubuntu Linux machine. However right off the bat I type ‘psql’ and I get the error: ‘role “” does not exist’. Where xxx is the user name logged in. How do I overcome this hurdle. Right now all of our data

[GENERAL] role does not exist

2012-10-31 Thread Kevin Burton
I have successfully installed PostgreSQL on a Ubuntu Linux machine. However right off the bat I type 'psql' and I get the error: 'role "" does not exist'. Where xxx is the user name logged in. How do I overcome this hurdle. Right now all of our data is on a Windows SQL Server. Can someone give

Re: [GENERAL] dropdb breaks replication?

2012-10-31 Thread Greg Williamson
Edson -- >I've two PostgreSQL 9.1.6 running on Linux CentOS 5.8 64bit. >They are replicated asynchronously. > >Yesterday, I've dropped a database of 20Gb, and then replication has broken, >requiring me to manually synchronize both servers again. > >It is expected that dropdb (or, perhaps, created

Re: [GENERAL] Delay streaming replication using a paramter

2012-10-31 Thread Moshe Jacobson
You would like to delay the replication of data from the master to the slave in order to prevent the possibility of corrupted data being sent to the slave? I don't understand this strategy. Can you explain? On Wed, Oct 31, 2012 at 8:01 AM, Mahmoud Hakeem-Habeeb < mahmoud.hakeem.hab...@gmail.com> w

Re: [GENERAL] Unable to do a mailing list proper search

2012-10-31 Thread Joshua D. Drake
On 10/31/2012 12:59 PM, cr...@gtek.biz wrote: list all role privileges Google: site:archives.postgresql.org 'list all role privileges' -- Command Prompt, Inc. - http://www.commandprompt.com/ PostgreSQL Support, Training, Professional Services and Development High Availability, Oracle Convers

Re: [GENERAL] Unable to do a mailing list proper search

2012-10-31 Thread Adrian Klaver
On 10/31/2012 12:59 PM, cr...@gtek.biz wrote: Good afternoon all, I am trying to search the mailing list archives for the phrase "list all role privileges", and I would like to return only the matches containing that exact phrase, and nothing else. Yet nothing works. No matter what I enter, I

[GENERAL] Unable to do a mailing list proper search

2012-10-31 Thread craig
Good afternoon all, I am trying to search the mailing list archives for the phrase "list all role privileges", and I would like to return only the matches containing that exact phrase, and nothing else. Yet nothing works. No matter what I enter, I get all pages that contain any or all of the wo

Re: [GENERAL] dropdb breaks replication?

2012-10-31 Thread John R Pierce
On 10/31/12 11:34 AM, Edson Richter wrote: Sorry for the portguese text. Yes, your assumption is correct: WAL segment has been excluded before being able to replicate. I keep 80 WAL segments, but I was wondering if a drop database is being logged: it's just so fast, I thought it wasn't logged. A

Re: [GENERAL] dropdb breaks replication?

2012-10-31 Thread Edson Richter
Em 31/10/2012 16:34, Tom Lane escreveu: Lonni J Friedman writes: On Wed, Oct 31, 2012 at 11:01 AM, Edson Richter wrote: May the cause not having enough segments (currently 80) for dropdb command? Is dropdb logged in transaction log page-by-page excluded? I can't read portugese(?), but i thin

Re: [GENERAL] dropdb breaks replication?

2012-10-31 Thread Edson Richter
Em 31/10/2012 16:09, Lonni J Friedman escreveu: On Wed, Oct 31, 2012 at 11:01 AM, Edson Richter wrote: Em 31/10/2012 15:39, Lonni J Friedman escreveu: On Wed, Oct 31, 2012 at 10:32 AM, Edson Richter wrote: I've two PostgreSQL 9.1.6 running on Linux CentOS 5.8 64bit. They are replicated async

Re: [GENERAL] dropdb breaks replication?

2012-10-31 Thread Tom Lane
Lonni J Friedman writes: > On Wed, Oct 31, 2012 at 11:01 AM, Edson Richter > wrote: >> May the cause not having enough segments (currently 80) for dropdb command? >> Is dropdb logged in transaction log page-by-page excluded? > I can't read portugese(?), but i think the gist of the error is that

Re: [GENERAL] Boolean type storage format

2012-10-31 Thread Mike Christensen
It would also matter what columns were next to it, correct? For example, if you had 4 bools in a row, that could also be 1 byte.. On Wed, Oct 31, 2012 at 11:08 AM, Raghavendra < raghavendra@enterprisedb.com> wrote: > On Wed, Oct 31, 2012 at 8:52 PM, Alexander Gataric wrote: > >> What is the

Re: [GENERAL] dropdb breaks replication?

2012-10-31 Thread Lonni J Friedman
On Wed, Oct 31, 2012 at 11:01 AM, Edson Richter wrote: > Em 31/10/2012 15:39, Lonni J Friedman escreveu: >> >> On Wed, Oct 31, 2012 at 10:32 AM, Edson Richter >> wrote: >>> >>> I've two PostgreSQL 9.1.6 running on Linux CentOS 5.8 64bit. >>> They are replicated asynchronously. >>> >>> Yesterday,

Re: [GENERAL] Boolean type storage format

2012-10-31 Thread Raghavendra
On Wed, Oct 31, 2012 at 8:52 PM, Alexander Gataric wrote: > What is the data physically stored as for boolean type? I know that it is > one byte but is it char, int, or something else? > False represented by zero bytes and True by 1 byte with value 1. --- Regards, Raghavendra EnterpriseDB Corp

Re: [GENERAL] dropdb breaks replication?

2012-10-31 Thread Edson Richter
Em 31/10/2012 15:39, Lonni J Friedman escreveu: On Wed, Oct 31, 2012 at 10:32 AM, Edson Richter wrote: I've two PostgreSQL 9.1.6 running on Linux CentOS 5.8 64bit. They are replicated asynchronously. Yesterday, I've dropped a database of 20Gb, and then replication has broken, requiring me to m

Re: [GENERAL] dropdb breaks replication?

2012-10-31 Thread Lonni J Friedman
On Wed, Oct 31, 2012 at 10:32 AM, Edson Richter wrote: > I've two PostgreSQL 9.1.6 running on Linux CentOS 5.8 64bit. > They are replicated asynchronously. > > Yesterday, I've dropped a database of 20Gb, and then replication has broken, > requiring me to manually synchronize both servers again. >

[GENERAL] dropdb breaks replication?

2012-10-31 Thread Edson Richter
I've two PostgreSQL 9.1.6 running on Linux CentOS 5.8 64bit. They are replicated asynchronously. Yesterday, I've dropped a database of 20Gb, and then replication has broken, requiring me to manually synchronize both servers again. It is expected that dropdb (or, perhaps, createdb) break existi

Re: [GENERAL] Delay streaming replication using a paramter

2012-10-31 Thread Magnus Hagander
On Wed, Oct 31, 2012 at 1:01 PM, Mahmoud Hakeem-Habeeb < mahmoud.hakeem.hab...@gmail.com> wrote: > Hi, > Firstly is it possible for me to delay streaming replication using > > wal_sender_delay > > or any other parameter. > No, you can't do delayed replication on streaming. You can do it if you us

[GENERAL] When do archived WAL files gets removed after wal_keep_segments changed?

2012-10-31 Thread Christian Hammers
Hello I run two PostgreSQL servers in a master-slave setup and set wal_keep_segments=1000 on the master to allow long downtimes on the slave. Meanwhile the disk got fuller than I estimated and I changed the config to wal_keep_segments=500 and restarted the server afterwards. Yet, the number of

Re: [GENERAL] Why SyncOneBuffer does not called frequently?

2012-10-31 Thread Jeff Janes
On Wed, Oct 31, 2012 at 1:53 AM, 高健 wrote: > Hi all: > > I am trying to understand when the bgwriter is written. > > I thought that the bgwriter.c's calling turn is: > > BackgroundWriterMain ->BgBufferSync-> SyncOneBuffer SyncOneBuffer is called with skip_recently_used true, so the buffer will n

Re: [GENERAL] Parallel Insert and Delete operation

2012-10-31 Thread Moshe Jacobson
It is also possible that you will get a foreign key violation exception on the process inserting into table 2, but you will not get database inconsistency. On Wed, Oct 31, 2012 at 9:33 AM, Albe Laurenz wrote: > Yelai, Ramkumar IN BLR STS worte: > > Sent: Wednesday, October 31, 2012 12:40 PM > > T

[GENERAL] Boolean type storage format

2012-10-31 Thread Alexander Gataric
What is the data physically stored as for boolean type? I know that it is one byte but is it char, int, or something else? Sent from my smartphone

Re: [GENERAL] How to setup chained CA?

2012-10-31 Thread ChoonSoo Park
Hello Tom, Per your recommendation, I tried to append reverse order of certs. 1. On postgresql server side 1) create a self-signed root certificate 2) create an intermediate cert signed by root certificate 3) create a server.crt signed by the intermediate cert 4) append the intermediate cert to se

Re: [GENERAL] Parallel Insert and Delete operation

2012-10-31 Thread Albe Laurenz
Yelai, Ramkumar IN BLR STS worte: > Sent: Wednesday, October 31, 2012 12:40 PM > To: pgsql-general@postgresql.org > Subject: [GENERAL] Parallel Insert and Delete operation > > Hi All, > > Please clarify me the following example. > > I have 2 tables > > Table1 - ( it has one primary key and few

Re: [GENERAL] Average Balance "life"

2012-10-31 Thread telenieko
Hi, On Tuesday, October 30, 2012 8:12:25 PM UTC+1, "David Johnston" wrote: > Start learning about Window functions/clauses: > http://www.postgresql.org/docs/9.2/interactive/tutorial-window.html > > The lag function over a window ordered by date will allow you to calculate > how many days since th

[GENERAL] Parallel Insert and Delete operation

2012-10-31 Thread Yelai, Ramkumar IN BLR STS
Hi All, Please clarify me the following example. I have 2 tables Table1 - ( it has one primary key and few columns ) Table2 - ( it has one primary key and few columns. It has one foreign key, which refers table1 primary key ). I have 2 operations, which are written in pl/pgsql procedure.

[GENERAL] Why SyncOneBuffer does not called frequently?

2012-10-31 Thread 高健
Hi all: I am trying to understand when the bgwriter is written. I thought that the bgwriter.c's calling turn is: BackgroundWriterMain ->BgBufferSync-> SyncOneBuffer And In my postgresql.conf , the bgwriter_delay=200ms. I did the following: postgres=# select * from testtab; id | val +--