Re: pgbouncer with ldap

2019-09-22 Thread Achilleas Mantzios
On 23/9/19 9:10 π.μ., Ayub M wrote: Achilleas, I am struggling with libpam_ldap package install. Does its setup also involves sssd daemon with nss and pam? I am seeing many different ways of dealing with ldap with pam and different modules which I am not familiar with (nscld, sssd etc). If you ha

Re: Help: Postgres Replication issues with pacemaker

2019-09-22 Thread Shital A
On Mon, 23 Sep 2019, 00:46 Shital A, wrote: > > Hello, > > We have setup active-passive cluster using streaming replication on Rhe > 7.5. We are testing pacemaker for automated failover. > We are seeing below issues with the setup : > > 1. When a failoveris triggered when data is being added to t

Re: How to represent a bi-directional list in db?

2019-09-22 Thread Pankaj Jangid
Francisco Olarte writes: > On Sun, Sep 22, 2019 at 4:25 PM Pankaj Jangid wrote: >> CREATE TABLE stages ( >>id SERIAL PRIMARY KEY, >>name VARCHAR(80) NOT NULL, >>created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, >>updated_at TIMESTAMP NOT NULL DEFAULT CURRE

Re: When does Postgres use binary I/O?

2019-09-22 Thread Tom Lane
Paul A Jungwirth writes: > On Sun, Sep 22, 2019 at 11:53 AM Tom Lane wrote: >> I thought of an easier-to-maintain approach to that part than having >> a reference file. > I just finished my multirange patch (well, "finished" :-), so I might > be willing to sign up for this. Would you scatter the

Re: When does Postgres use binary I/O?

2019-09-22 Thread Paul A Jungwirth
On Sun, Sep 22, 2019 at 11:53 AM Tom Lane wrote: > I thought of an easier-to-maintain approach to that part than having > a reference file. Binary send functions are invokable from SQL, > so we could just imagine adding test cases along the lines of > > regression=# select int8send(42); > i

Re: Extend inner join to fetch not yet connected rows also

2019-09-22 Thread Michael Lewis
Just a side note, that the below can be written more simply- CASE WHEN UserSkills.craftsmanship_id IS NULL THEN FALSE ELSE TRUE as has If you want to be direct- UserSkills.craftsmanship_id IS NOT NULL as has

Re: Use of ?get diagnostics'?

2019-09-22 Thread Adrian Klaver
On 9/22/19 11:33 AM, Thiemo Kellner wrote: Hi Andrew Paste sites are for IRC, on the mailing list you should always attach the necessary details to your message. Ok, I was under the impression that paste site were preferable to attachments which generates traffic not everyone is interested i

Help: Postgres Replication issues with pacemaker

2019-09-22 Thread Shital A
Hello, We have setup active-passive cluster using streaming replication on Rhe 7.5. We are testing pacemaker for automated failover. We are seeing below issues with the setup : 1. When a failoveris triggered when data is being added to the primary by killing primary (killall -9 postgres), the sta

Re: When does Postgres use binary I/O?

2019-09-22 Thread Tom Lane
I wrote: > The major thing that this style of test misses, IMO, is that it > proves nothing at all about the stability of the binary representation. > In particular, it'd be almost trivially easy for someone to screw up > the expectation of endianness independence for the binary format. > To addre

Re: Use of ?get diagnostics'?

2019-09-22 Thread Thiemo Kellner
Hi Andrew Paste sites are for IRC, on the mailing list you should always attach the necessary details to your message. Ok, I was under the impression that paste site were preferable to attachments which generates traffic not everyone is interested in. Thiemo> the following exception wa

Re: Extend inner join to fetch not yet connected rows also

2019-09-22 Thread Jan Kohnert
Hi Arup, Am Sonntag, 22. September 2019, 15:30:38 CEST schrieb Arup Rakshit: > When someone adds a craftsmanship to their skill set, the contractor_skills > table holds that relationship. I don’t think distinct is the correct tool, > as it will eliminate the correct data. users and craftsmanship h

Re: Extend inner join to fetch not yet connected rows also

2019-09-22 Thread John W Higgins
On Sun, Sep 22, 2019 at 6:30 AM Arup Rakshit wrote: > > > SELECT > craftsmanships.id, > craftsmanships.name, > CASE WHEN contractor_skills.user_id IS NULL THEN > FALSE > ELSE > TRUE > END AS has > FROM > "craftsmanshi

Re: Extend inner join to fetch not yet connected rows also

2019-09-22 Thread Adrian Klaver
On 9/22/19 6:30 AM, Arup Rakshit wrote: On 22-Sep-2019, at 6:55 PM, Jan Kohnert wrote: Hi Arup, Am Sonntag, 22. September 2019, 14:48:20 CEST schrieb Arup Rakshit: Hi Jan, On 22-Sep-2019, at 5:38 PM, Jan Kohnert wrote: maybe something like select c.id, c.name, case when cs.use

Re: How to represent a bi-directional list in db?

2019-09-22 Thread Francisco Olarte
Pankaj: On Sun, Sep 22, 2019 at 4:25 PM Pankaj Jangid wrote: > CREATE TABLE stages ( >id SERIAL PRIMARY KEY, >name VARCHAR(80) NOT NULL, >created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, >updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, >pr

How to represent a bi-directional list in db?

2019-09-22 Thread Pankaj Jangid
I am creating an application for a manufacturing scenario. To represent stages in an assembly line, I wanted to create following table, CREATE TABLE stages ( id SERIAL PRIMARY KEY, name VARCHAR(80) NOT NULL, created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, up

Re: Extend inner join to fetch not yet connected rows also

2019-09-22 Thread Arup Rakshit
> On 22-Sep-2019, at 6:55 PM, Jan Kohnert > wrote: > > Hi Arup, > > Am Sonntag, 22. September 2019, 14:48:20 CEST schrieb Arup Rakshit: >> Hi Jan, >> >>> On 22-Sep-2019, at 5:38 PM, Jan Kohnert >>> wrote: >>> maybe something like >>> >>> select >>> >>> c.id, >>> c.name, >>> case whe

Re: Extend inner join to fetch not yet connected rows also

2019-09-22 Thread Jan Kohnert
Hi Arup, Am Sonntag, 22. September 2019, 14:48:20 CEST schrieb Arup Rakshit: > Hi Jan, > > > On 22-Sep-2019, at 5:38 PM, Jan Kohnert > > wrote: > > maybe something like > > > > select > > > >c.id, > >c.name, > >case when cs.user_id = 8 then true else false end as has > > > > from

Re: Extend inner join to fetch not yet connected rows also

2019-09-22 Thread Arup Rakshit
Hi Jan, > On 22-Sep-2019, at 5:38 PM, Jan Kohnert > wrote: > > Hey, > > Am Sonntag, 22. September 2019, 13:21:46 CEST schrieb Arup Rakshit: >> I have craftsmanships table which has (id, name) and users table (id, email, >> ..). When a user has some craftsmanships, they are stored inside the >>

Re: Extend inner join to fetch not yet connected rows also

2019-09-22 Thread Arup Rakshit
Hi Jan, I was close and came up with: SELECT craftsmanships.id, craftsmanships.name, CASE WHEN contractor_skills.user_id IS NULL THEN FALSE ELSE TRUE END AS has FROM "craftsmanships" LEFT JOIN "contractor_skil

Re: Extend inner join to fetch not yet connected rows also

2019-09-22 Thread Jan Kohnert
Hey, Am Sonntag, 22. September 2019, 13:21:46 CEST schrieb Arup Rakshit: > I have craftsmanships table which has (id, name) and users table (id, email, > ..). When a user has some craftsmanships, they are stored inside the > contractor_skills(user_id, craftsmanship_id, id) table. [...] > But I w

Extend inner join to fetch not yet connected rows also

2019-09-22 Thread Arup Rakshit
I have craftsmanships table which has (id, name) and users table (id, email, ..). When a user has some craftsmanships, they are stored inside the contractor_skills(user_id, craftsmanship_id, id) table. What I want here is that to list all the available craftsmanships with id, name and has colum