Re: SELECT all the rows where id is children of other node.

2019-08-19 Thread Rob Sargent
> On Aug 19, 2019, at 7:42 PM, pabloa98 wrote: > > Hello, > > I have a huge table (100 million rows) of relations between nodes by id in a > Postgresql 11 server. Like this: > > CREATE TABLE relations ( > pid INTEGER NOT NULL, > cid INTEGER NOT NULL, > ) > > This table has parent-c

Re: postmaster utilization

2019-08-19 Thread Kyotaro Horiguchi
At Mon, 19 Aug 2019 10:07:30 -0400, Stephen Frost wrote in <20190819140730.gh16...@tamriel.snowman.net> > Greetings, > > * Ron (ronljohnso...@gmail.com) wrote: > > On 8/19/19 5:40 AM, Shiwangini Shishulkar wrote: > > >We have scheduled postgres full backup on centos 7 machine. DB size is > > >ar

Re: SELECT all the rows where id is children of other node.

2019-08-19 Thread Rob Sargent
> On Aug 19, 2019, at 7:42 PM, pabloa98 wrote: > > Hello, > > I have a huge table (100 million rows) of relations between nodes by id in a > Postgresql 11 server. Like this: > > CREATE TABLE relations ( > pid INTEGER NOT NULL, > cid INTEGER NOT NULL, > ) > > This table has parent-c

Re: SELECT all the rows where id is children of other node.

2019-08-19 Thread Rob Sargent
> On Aug 19, 2019, at 7:42 PM, pabloa98 wrote: > > Hello, > > I have a huge table (100 million rows) of relations between nodes by id in a > Postgresql 11 server. Like this: > > CREATE TABLE relations ( > pid INTEGER NOT NULL, > cid INTEGER NOT NULL, > ) > > This table has parent-

SELECT all the rows where id is children of other node.

2019-08-19 Thread pabloa98
Hello, I have a huge table (100 million rows) of relations between nodes by id in a Postgresql 11 server. Like this: CREATE TABLE relations ( pid INTEGER NOT NULL, cid INTEGER NOT NULL, ) This table has parent-child relations references between nodes by id. Like: *pid -> cid* n1 -> n2 n

Re: Retroactively adding send and recv functions to a type?

2019-08-19 Thread Vik Fearing
On 19/08/2019 19:32, Tom Lane wrote: > "Johann 'Myrkraverk' Oskarsson" writes: >> I meant ALTER TYPE. Adding the send and recv functions doesn't seem >> to supported by ALTER TYPE. >> Is there a workaround for this? > You could manually update the pg_type row, and then if you were > being fussy,

Can't install postgresql from official postgresql repo on RedHat 8?

2019-08-19 Thread Ubence Quevedo
Hi Everyone, My apologies first in case this has been posted, but I couldn't find a thread related to my problem. I can't seem to install postgresql from the office PostgreSQL repository? I installed the main repository info, but any attempt to install the server executable or related software

Re: Collumn level permissions ?

2019-08-19 Thread Adrian Klaver
On 8/19/19 12:17 PM, stan wrote: I do know a way to solve this. I could create a view "B" that is a view of tab;e "A" without column "C" on the select, and give a user permissions on B, but not on A, or at least I think that would work. What I specifically need to do is "hide" one column of a ta

Collumn level permissions ?

2019-08-19 Thread stan
I do know a way to solve this. I could create a view "B" that is a view of tab;e "A" without column "C" on the select, and give a user permissions on B, but not on A, or at least I think that would work. What I specifically need to do is "hide" one column of a table from a set of users. Any bette

Re: Retroactively adding send and recv functions to a type?

2019-08-19 Thread Tom Lane
"Johann 'Myrkraverk' Oskarsson" writes: > On Tue, Aug 20, 2019 at 1:32 AM Tom Lane wrote: >> You could manually update the pg_type row, and then if you were >> being fussy, add pg_depend entries showing the type depends on >> the functions. > Can I do this in a future proof way? That is, is the

Re: Pgsql resource agent of pacemaker

2019-08-19 Thread Shital A
On Mon, 19 Aug 2019, 18:47 Shital A, wrote: > Hello, > > Need advise on below situation: > > Postgres 9.6 > Pacemaker 1.1.19 > Corosync 2.4.3 > > We are testing HA setup on a two node cluster using pacemaker, corosync > stack. The replication is streaming replication in async mode. > Whenever the

Re: Retroactively adding send and recv functions to a type?

2019-08-19 Thread Johann 'Myrkraverk' Oskarsson
On Tue, Aug 20, 2019 at 1:32 AM Tom Lane wrote: > > "Johann 'Myrkraverk' Oskarsson" writes: > > I meant ALTER TYPE. Adding the send and recv functions doesn't seem > > to supported by ALTER TYPE. > > Is there a workaround for this? > > You could manually update the pg_type row, and then if you w

Retroactively adding send and recv functions to a type?

2019-08-19 Thread Johann 'Myrkraverk' Oskarsson
Dear PostgreSQL General, I wish to add the send and recv functions to a type I didn't write myself. The help for ALTER TABLE seems to indicate this is not supported directly. How can I achieve this? The extension in question is hashtypes on pgxn, https://pgxn.org/dist/hashtypes/ and I did n

Re: Retroactively adding send and recv functions to a type?

2019-08-19 Thread Tom Lane
"Johann 'Myrkraverk' Oskarsson" writes: > I meant ALTER TYPE. Adding the send and recv functions doesn't seem > to supported by ALTER TYPE. > Is there a workaround for this? You could manually update the pg_type row, and then if you were being fussy, add pg_depend entries showing the type depend

Re: Retroactively adding send and recv functions to a type?

2019-08-19 Thread Johann 'Myrkraverk' Oskarsson
On Tue, Aug 20, 2019 at 1:03 AM Johann 'Myrkraverk' Oskarsson wrote: > The help for ALTER TABLE seems to indicate this is not supported directly. I meant ALTER TYPE. Adding the send and recv functions doesn't seem to supported by ALTER TYPE. Is there a workaround for this? -- Johann I'm not

Re: Sorry, real newbie question about connecting to a database

2019-08-19 Thread Adrian Klaver
On 8/19/19 7:44 AM, stan wrote: I am developinng an appliction usig Postgresql 11, installed on a UBUTU 18.14 machine. I ahve vreated a new database to do some testing on restricting access of specific users/roles to certain data. I have done the following: REVOKE ALL ON DATABASE pertest FROM e

Re: Sorry, real newbie question about connecting to a database

2019-08-19 Thread Tom Lane
stan writes: > But I cannot conect, or swith to user > employee: > stan@smokey:/etc/postgresql/11/main$ psql -U employee > psql: FATAL: Peer authentication failed for user "employee" This means that you've set pg_hba.conf to specify "peer" authentication, which by default only lets you connect

Sorry, real newbie question about connecting to a database

2019-08-19 Thread stan
I am developinng an appliction usig Postgresql 11, installed on a UBUTU 18.14 machine. I ahve vreated a new database to do some testing on restricting access of specific users/roles to certain data. I have done the following: REVOKE ALL ON DATABASE pertest FROM employee; GRANT CONNECT ON DATABASE

Re: postmaster utilization

2019-08-19 Thread Stephen Frost
Greetings, * Ron (ronljohnso...@gmail.com) wrote: > On 8/19/19 5:40 AM, Shiwangini Shishulkar wrote: > >We have scheduled postgres full backup on centos 7 machine. DB size is > >around 66 GB. We observed while backup is running, postmaster CPU % > >reaches to 90 - 100%,which results very strange b

RE: pg_basebackup exit codes

2019-08-19 Thread John Donath
Thanks a lot Magnus! I should have known better … ☺ But thanks for the PIPESTATUS hint which comes in uttermost handy Regards, John Van: Magnus Hagander Verzonden: maandag 19 augustus 2019 13:46 Aan: John Donath CC: pgsql-general@lists.postgresql.org Onderwerp: Re: pg_basebackup exit codes

Re: pg_basebackup exit codes

2019-08-19 Thread Magnus Hagander
On Mon, Aug 19, 2019 at 12:18 PM John Donath wrote: > Hi, > > > > I was unpleasantly surprised to see that pg_basebackup will return a zero > (Success) exit code even when it has actually failed like below: > > > > pg_basebackup: could not write to compressed file > "/var/lib/pgsql/10/inst1/backu

Re: postmaster utilization

2019-08-19 Thread Ron
On 8/19/19 5:40 AM, Shiwangini Shishulkar wrote: Hi, We have scheduled postgres full backup on centos 7 machine. DB size is around 66 GB. We observed while backup is running, postmaster CPU % reaches to 90 - 100%,which results very strange behavior: that we are not able to perform any DDL and

postmaster utilization

2019-08-19 Thread Shiwangini Shishulkar
Hi, We have scheduled postgres full backup on centos 7 machine. DB size is around 66 GB. We observed while backup is running, postmaster CPU % reaches to 90 - 100%,which results very strange behavior: that we are not able to perform any DDL and DML on to the database during the time. Please sugges

pg_basebackup exit codes

2019-08-19 Thread John Donath
Hi, I was unpleasantly surprised to see that pg_basebackup will return a zero (Success) exit code even when it has actually failed like below: pg_basebackup: could not write to compressed file "/var/lib/pgsql/10/inst1/backup/cust-pg02_inst1_Fri_20190816/base.tar.gz": No space left on device pg

Re: question about zeroes in the wal file names

2019-08-19 Thread Peter Eisentraut
On 2019-08-18 16:17, Luca Ferrari wrote: > I'm just curious to better understand the naming convention behind wal > files, because I've seen on a system of mine that the wals created > were: > > 0005020E00FF > 0005020F > > while I was expecting 20E0x100. You are in p