Re: Advancing the archiver position safely

2020-08-06 Thread Christophe Pettus
> On Aug 6, 2020, at 18:45, Jerry Sievers wrote: > Deleting the .ready file should allow the archiver to get past the > missing file. Ah, excellent, yes. -- -- Christophe Pettus x...@thebuild.com

Re: Advancing the archiver position safely

2020-08-06 Thread Jerry Sievers
Christophe Pettus writes: > I've encountered a rather unusual situation (PostgreSQL 9.6). On a > particular server, for reasons I've not fully diagnosed, the archiver > thinks that the current WAL segment to be archived is > 00023B680062. This is unfortunate, because the oldest WAL

Advancing the archiver position safely

2020-08-06 Thread Christophe Pettus
I've encountered a rather unusual situation (PostgreSQL 9.6). On a particular server, for reasons I've not fully diagnosed, the archiver thinks that the current WAL segment to be archived is 00023B680062. This is unfortunate, because the oldest WAL segment that actually exists on d

Re: Can PAF be used to provide zero downtime while primary and backup servers are being patched?

2020-08-06 Thread Bruce Momjian
On Thu, Aug 6, 2020 at 10:01:21AM -0400, David Gauthier wrote: > Our IT dept needs to install a patch on both primary and backup servers for > our > Postgres Automatic Failover configured DB (version 9.6 on linux).  From the > standpoint of the DB users, can a strategy be implemented such that th

Standard practices for granting privileges

2020-08-06 Thread Lokesh Vij
Hello, I have experience with Microsoft SQL Server and trying to migrate to PostGreSQL. Wanted to reach out to community experts to guide me define or follow best practices when granting privileges to the database users. We have a bunch of stored procedures which will be executed by the applicati

Re: privileges oddity

2020-08-06 Thread Scott Ribe
FYI, REVOKE ALL ON SCHEMA... followed by GRANT ALL ON SCHEMA... did not change anything

Re: privileges oddity

2020-08-06 Thread Scott Ribe
> On Aug 6, 2020, at 12:53 PM, Stephen Frost wrote: > > Are you 110% sure that you're actually connecting to the same instance > in both cases (I'd say database too, but hopefully psql isn't lying to > you about that on your prompt, but maybe double-check anyway...). yes--double checked > Have

Re: privileges oddity

2020-08-06 Thread Stephen Frost
Greetings, * Scott Ribe (scott_r...@elevated-dev.com) wrote: > when user akanzler tries to run query "SELECT * FROM zoewang.sometable...", > it triggers this error: > > 2020-08-06 17:27:27.664 UTC [15914]: [3] > user=akanzler,db=risk_oltp_prod,app=[unknown],client=10.8.170.24: ERROR: > permis

Re: privileges oddity

2020-08-06 Thread Scott Ribe
> On Aug 6, 2020, at 12:38 PM, Tom Lane wrote: > > Hmph. Any chance of getting a stack trace from the point of the error? possibly > Also, which PG version is this? 12.3 It is probably relevant that we cleaned up roles & privs yesterday, lots of REVOKE & GRANT, and some DROP ROLE. I started

Re: privileges oddity

2020-08-06 Thread Adrian Klaver
On 8/6/20 11:39 AM, Scott Ribe wrote: On Aug 6, 2020, at 12:36 PM, Adrian Klaver wrote: No triggers or FOREIGN KEYS? No. No keys or indexes either--that was the entire table def. echo "Hmph" -- Adrian Klaver adrian.kla...@aklaver.com

Re: privileges oddity

2020-08-06 Thread Scott Ribe
> On Aug 6, 2020, at 12:36 PM, Adrian Klaver wrote: > > No triggers or FOREIGN KEYS? No. No keys or indexes either--that was the entire table def.

Re: privileges oddity

2020-08-06 Thread Tom Lane
Scott Ribe writes: > On Aug 6, 2020, at 12:22 PM, Tom Lane wrote: >> Gonna need more context. The session-level user seems to have the >> right privileges, but maybe something is happening inside a >> security-definer function that doesn't have privileges? > The only security definer function i

Re: privileges oddity

2020-08-06 Thread Scott Ribe
On Aug 6, 2020, at 12:22 PM, Tom Lane wrote: > > Gonna need more context. The session-level user seems to have the > right privileges, but maybe something is happening inside a > security-definer function that doesn't have privileges? The only security definer function in the db is a simple pg_

Re: privileges oddity

2020-08-06 Thread Adrian Klaver
On 8/6/20 11:35 AM, Scott Ribe wrote: On Aug 6, 2020, at 12:22 PM, Adrian Klaver wrote: Schema for the table? Nothing relevant: Column| Type | Collation | Nullable | Default -+---+---+--+- curve_name | characte

Re: privileges oddity

2020-08-06 Thread Scott Ribe
> On Aug 6, 2020, at 12:22 PM, Adrian Klaver wrote: > > Schema for the table? Nothing relevant: Column| Type | Collation | Nullable | Default -+---+---+--+- curve_name | character varying(30) | |

Re: privileges oddity

2020-08-06 Thread Adrian Klaver
On 8/6/20 11:11 AM, Scott Ribe wrote: when user akanzler tries to run query "SELECT * FROM zoewang.sometable...", it triggers this error: 2020-08-06 17:27:27.664 UTC [15914]: [3] user=akanzler,db=risk_oltp_prod,app=[unknown],client=10.8.170.24: ERROR: permission denied for schema zoewang at

Re: privileges oddity

2020-08-06 Thread Tom Lane
Scott Ribe writes: > when user akanzler tries to run query "SELECT * FROM zoewang.sometable...", > it triggers this error: > 2020-08-06 17:27:27.664 UTC [15914]: [3] > user=akanzler,db=risk_oltp_prod,app=[unknown],client=10.8.170.24: ERROR: > permission denied for schema zoewang at character 1

privileges oddity

2020-08-06 Thread Scott Ribe
when user akanzler tries to run query "SELECT * FROM zoewang.sometable...", it triggers this error: 2020-08-06 17:27:27.664 UTC [15914]: [3] user=akanzler,db=risk_oltp_prod,app=[unknown],client=10.8.170.24: ERROR: permission denied for schema zoewang at character 15 --- YET --- risk_oltp_pro

Can PAF be used to provide zero downtime while primary and backup servers are being patched?

2020-08-06 Thread David Gauthier
Our IT dept needs to install a patch on both primary and backup servers for our Postgres Automatic Failover configured DB (version 9.6 on linux). From the standpoint of the DB users, can a strategy be implemented such that they see zero downtime during this process as the 2 servers are taken down