[GENERAL] noobie join question

2015-05-11 Thread Steve Clark
Hi List, I am having trouble trying to figure out how to get the result listed at the bottom. I have 3 tables units, types of units which has a description of the units, and a table that list associations of the units. I can't figure out how to do the proper joins. Any pointers would be appreciat

[GENERAL] Restarting DB after moving to another drive

2015-05-11 Thread Daniel Begin
I am working on windows and I had to move my database on another hard drive after the original one started overheating. In order to move the DB I did the following. -Stop postgresql-x64-9.3 service - and wait until there were no more system access to on the original drive -Copy the entire cont

Re: [GENERAL] noobie join question

2015-05-11 Thread Oliver Elphick
On Mon, 2015-05-11 at 06:46 -0400, Steve Clark wrote: > Hi List, > I am having trouble trying to figure out > how to get the result listed at the bottom. > > I have 3 tables units, types of units which has a description of the units, > and a table that list associations of the units. I can't figur

Re: [GENERAL] noobie join question

2015-05-11 Thread Albe Laurenz
Steve Clark wrote: > I am having trouble trying to figure out > how to get the result listed at the bottom. That's a bit tough, since you don't describe the desired result. > I have 3 tables units, types of units which has a description of the units, > and a table that list associations of the un

Re: [GENERAL] Restarting DB after moving to another drive

2015-05-11 Thread Raymond O'Donnell
On 11/05/2015 12:03, Daniel Begin wrote: > I am working on windows and I had to move my database on another hard > drive after the original one started overheating. In order to move the > DB I did the following… > > > > -Stop postgresql-x64-9.3 service – and wait until there were no more > syst

Re: [GENERAL] Restarting DB after moving to another drive

2015-05-11 Thread Daniel Begin
I just get it back running with the old drive - was some Windows hidden behavior! However, does someone could tell me what went wrong with the procedure I used to move the DB? And/or what procedure I should have used in order to get it right? Daniel -Original Message- From: Raymond O'D

Re: [GENERAL] noobie join question

2015-05-11 Thread Steve Clark
On 05/11/2015 07:16 AM, Oliver Elphick wrote: On Mon, 2015-05-11 at 06:46 -0400, Steve Clark wrote: Hi List, I am having trouble trying to figure out how to get the result listed at the bottom. I have 3 tables units, types of units which has a description of the units, and a table that list ass

[GENERAL] Comparing txid and xmin (under BDR)

2015-05-11 Thread Peter Mogensen
Hi, I would really like to be able to externally to Postgres at some point in time later, be able to compare the txid of 2 queries. Namely: The INSERT transaction for a certain row in a table, and The SELECT transaction reading some other data. With the one caveat that this has to work with

Re: [GENERAL] Restarting DB after moving to another drive

2015-05-11 Thread Raymond O'Donnell
On 11/05/2015 13:38, Daniel Begin wrote: > I just get it back running with the old drive - was some Windows hidden > behavior! > > However, does someone could tell me what went wrong with the procedure I > used to move the DB? > And/or what procedure I should have used in order to get it right?

[GENERAL] How to clean/truncate / VACUUM FULL pg_largeobject without (much) downtime?

2015-05-11 Thread Muthusamy, Sivaraman
Hi Group, Facing a problem where pg_catalog.pg_largetobject has been growing fast recently, in last two weeks. The actual data itself, in user tables, is about 60GB, but pg_catalog.pg_largeobject table is 200GB plues. Please let me know how to clean/truncate this table without losing any user d

Re: [GENERAL] Restarting DB after moving to another drive

2015-05-11 Thread Daniel Begin
Thank for the link! Just to make sure I understand properly... When I installed Postgresql, I set $PGDATA to point on my old drive and I must now move everything on the new one. In order to move everything on the new drive I must create a tablespace on the new drive and then explicitly define t

Re: [GENERAL] Restarting DB after moving to another drive

2015-05-11 Thread Francisco Olarte
( OOps, forgot to cc the list again in previous, quoting all message for context ). On Mon, May 11, 2015 at 3:14 PM, Daniel Begin wrote: > Makes sense considering the error message! Maybe an image backup would make > the job... I do not know how they are, made in windows, but it should. Also, I

Re: [GENERAL] Restarting DB after moving to another drive

2015-05-11 Thread Francisco Olarte
Hi Daniel. On Mon, May 11, 2015 at 4:42 PM, Daniel Begin wrote: > Just to make sure I understand properly... > When I installed Postgresql, I set $PGDATA to point on my old drive and I > must now move everything on the new one. > In order to move everything on the new drive I must create a tables

Re: [GENERAL] How to clean/truncate / VACUUM FULL pg_largeobject without (much) downtime?

2015-05-11 Thread Francisco Olarte
Hi Muthusamy: On Mon, May 11, 2015 at 11:48 AM, Muthusamy, Sivaraman wrote: > With regards to this pg_largeobject, I have the following questions: > - What is this pg_largetobject ? Just seeking it in the alpha index leads you here: http://www.postgresql.org/docs/9.4/static/catalog-pg-larg

Re: [GENERAL] Restarting DB after moving to another drive

2015-05-11 Thread Daniel Begin
Francisco wrote: "How big/critical is your database?" How big? According to PgAdmin my personal database is about 2TB... How critical? Well, about a year of work!-) Francisco wrote: "just did a stop/cp/change pgdata /restart, I suppose windows must have comparable ways" This is what I have just

Re: [GENERAL] Restarting DB after moving to another drive

2015-05-11 Thread Marc Mamin
Hi, have you checked that the links in $PGDATA\pg_tblspc on the new drive are valid ? They possibly still point to the old drive. I guess you have to correct them per hand before starting the moved DB. regards, Marc Mamin Von: pgsql-general-ow...@postgres

Re: [GENERAL] Restarting DB after moving to another drive

2015-05-11 Thread Daniel Begin
Interesting, The symbolic links on the old drive -still used by the DB- look like windows' shortcuts to parent folder, while they are empty folders in the copy of the database I have on the new drive... When I do a plane copy of those links on another drive I also get the same empty folders. I

[GENERAL] Why does this SQL work?

2015-05-11 Thread Anil Menon
Hi, I have the following setup : manualscan=> set search_path=ver736,public; SET manualscan=> \d courier; Table "ver736.courier" Column | Type |Modifiers ---++---

Re: [GENERAL] Why does this SQL work?

2015-05-11 Thread hubert depesz lubaczewski
On Tue, May 12, 2015 at 12:26:15AM +0800, Anil Menon wrote: > manualscan=> select count(*) From msgtxt where msgid in ( > manualscan(> select msgid From courier where org_id=3 > manualscan(> ) > manualscan-> ; > count > --- > 10225 > (1 row) > manualscan=> select count(*) Fro

Re: [GENERAL] Why does this SQL work?

2015-05-11 Thread Victor Yegorov
2015-05-11 19:26 GMT+03:00 Anil Menon : > manualscan=> select count(*) From public.msgtxt where msgid in (select > msgid From ver736.courier where org_id=3); > count > --- > 10225 > (1 row) > > Please note, there is no msgid col in courier table. Which brings the > question why does this SQL

Re: [GENERAL] RPM building tools and info missing?

2015-05-11 Thread Peter Eisentraut
On 5/9/15 10:47 AM, Bill Moran wrote: > https://wiki.postgresql.org/wiki/RPM_Packaging > > The link to the specfiles and other data at > http://svn.pgrpms.org/repo/ gives a 404. It's been move to git. I have updated the wiki page with the new URL. -- Sent via pgsql-general mailing list (pgsq

Re: [GENERAL] Comparing txid and xmin (under BDR)

2015-05-11 Thread Craig Ringer
On 11 May 2015 at 21:10, Peter Mogensen wrote: > Hi, > > I would really like to be able to externally to Postgres at some point in > time later, be able to compare the txid of 2 queries. > > Namely: > The INSERT transaction for a certain row in a table, and > The SELECT transaction reading some

Re: [GENERAL] Comparing txid and xmin (under BDR)

2015-05-11 Thread Peter Mogensen
On 2015-05-12 06:06, Craig Ringer wrote: On 11 May 2015 at 21:10, Peter Mogensen wrote: So ... I can easily get the current txid of the SELECT transaction by calling txid_current(). Note that by doing so, you force txid allocation for a read-only query that might otherwise not need one, wh

[GENERAL] [BDR] Node Join Question

2015-05-11 Thread Wayne E. Seguin
To the wonderful BDR folks, I have a 5 node pg+bdr cluster that I've spun up. I have verified that each node can connect via psql to each other node. I am having an issue creating the bdr group and having the nodes join each other. The steps I am taking are as follows (I used pg compiled using ge

Re: [GENERAL] [BDR] Node Join Question

2015-05-11 Thread Wayne E. Seguin
Also, Is there a way to remove these things from the init target node easier? d= p=504 a=ERROR: 55000: previous init failed, manual cleanup is required d= p=504 a=DETAIL: Found bdr.bdr_nodes entry for bdr (6147869128174526660,1,16908,) with state=i in remote bdr.bdr_nodes d= p=504 a=HINT: Remo

Re: [GENERAL] [BDR] Node Join Question

2015-05-11 Thread Wayne E. Seguin
Also, what is the proper way to locate and remove these replication slots as mentioned in this log? On Mon, May 11, 2015 at 11:36 PM, Wayne E. Seguin wrote: > Also, > > Is there a way to remove these things from the init target node easier? > > d= p=504 a=ERROR: 55000: previous init failed, man