how to get list of sequences owned by a user/role

2018-03-09 Thread Charlin Barak
Hi, I can find sequences owned by a schema from information_schema.sequences and pg_class but how do I find sequences owned by a user/role? What pg table should I be looking at? Thanks. Charlin

Re: ERROR could not access transaction/Could not open file pg_commit_ts

2018-03-09 Thread Alvaro Herrera
Jeremy Finzel wrote: > UPDATE: what is actually failing is a call to > pg_xact_commit_timestamp(xmin) on a given table under the view. We still > think we must have some corruption though with pg_commit_ts. This is not a valid query, because the xmin may belong to a frozen tuple. pg_commit_ts

Re: how to get list of sequences owned by a user/role

2018-03-09 Thread Adrian Klaver
On 03/09/2018 02:22 PM, Adrian Klaver wrote: On 03/09/2018 12:08 PM, Charlin Barak wrote: Hi, I can find sequences owned by a schema from information_schema.sequences and pg_class but how do I find sequences owned by a user/role? What pg table should I be looking at?

Re: how to get list of sequences owned by a user/role

2018-03-09 Thread Adrian Klaver
On 03/09/2018 12:08 PM, Charlin Barak wrote: Hi, I can find sequences owned by a schema from information_schema.sequences and pg_class but how do I find sequences owned by a user/role? What pg table should I be looking at? https://www.postgresql.org/docs/10/static/view-pg-sequences.html

Re: ERROR could not access transaction/Could not open file pg_commit_ts

2018-03-09 Thread Jerry Sievers
Alvaro Herrera writes: > Jeremy Finzel wrote: > >> UPDATE: what is actually failing is a call to >> pg_xact_commit_timestamp(xmin) on a given table under the view. We still >> think we must have some corruption though with pg_commit_ts. > > This is not a valid query,

Re: ERROR could not access transaction/Could not open file pg_commit_ts

2018-03-09 Thread Jeremy Finzel
On Fri, Mar 9, 2018 at 10:43 AM, Jeremy Finzel wrote: > Hello - > > Here is our cluster setup: > > cluster_a 9.5.11 Ubuntu 16.04.4 LTS > --> cluster_b (streamer) 9.5.11 Ubuntu 16.04.4 LTS > --> cluster_c (streamer) 9.5.11 Ubuntu 16.04.4 LTS > > Very recently, we started

Re: Ability to create tables

2018-03-09 Thread Ron Johnson
On 03/09/2018 05:46 PM, Tom Lane wrote: Ron Johnson writes: Even though I revoked the  CREATE priv on role ABCREADONLY, it's still able to create tables.  What can I do to prevent this? $ psql -c 'revoke create on database "ABC123" from "ABCREADONLY";' That revokes the

Re: pgpass hostname and IP address

2018-03-09 Thread Ron Johnson
On 03/09/2018 10:26 PM, David G. Johnston wrote: On Friday, March 9, 2018, Ron Johnson > wrote: (8.4 and 9.2, but soon to 9.6) If we sometimes access a db server by IP address, and sometimes by hostname, must we have two entries

pgpass hostname and IP address

2018-03-09 Thread Ron Johnson
(8.4 and 9.2, but soon to 9.6) If we sometimes access a db server by IP address, and sometimes by hostname, must we have two entries for each server+user (one with the hostname and the other with IP address), or is there a way to put them both on the same line? -- Angular momentum makes the

Re: Ability to create tables

2018-03-09 Thread Tom Lane
Ron Johnson writes: > Even though I revoked the  CREATE priv on role ABCREADONLY, it's still able > to create tables.  What can I do to prevent this? > $ psql -c 'revoke create on database "ABC123" from "ABCREADONLY";' That revokes the ability to create new schemas

Re: pgpass hostname and IP address

2018-03-09 Thread Adrian Klaver
On 03/09/2018 08:19 PM, Ron Johnson wrote: (8.4 and 9.2, but soon to 9.6) If we sometimes access a db server by IP address, and sometimes by hostname, must we have two entries for each server+user (one with the hostname and the other with IP address), or is there a way to put them both on

Ability to create tables

2018-03-09 Thread Ron Johnson
Hi, Archaic v9.2.7 Even though I revoked the  CREATE priv on role ABCREADONLY, it's still able to create tables.  What can I do to prevent this? \c postgres CREATE ROLE "ABCREADONLY" LOGIN INHERIT PASSWORD 'Flying.Fox'; GRANT CONNECT ON DATABASE "ABC123" TO "ABCREADONLY"; \c ABC123 GRANT

Need followup setup instructions to postgresql-10.3-1-linux-x64.run

2018-03-09 Thread Sherman Willden
Name: Sherman Platform: HP Compaq 6710b Operating System: Ubuntu 17.10 Fresh Install postgresql: 10 Fresh Install. No other versions What post-setup must I perform to get postgresql 10 running. I used postgresql-10.3-1-linux-x64.run which ran great. It place postgresql in /opt/PostgreSql. I am

Re: pgpass hostname and IP address

2018-03-09 Thread David G. Johnston
On Friday, March 9, 2018, Ron Johnson wrote: > (8.4 and 9.2, but soon to 9.6) > > If we sometimes access a db server by IP address, and sometimes by > hostname, must we have two entries for each server+user (one with the > hostname and the other with IP address), or is

Application Dependency/Limitations of Postgres Version Upgrade

2018-03-09 Thread amitabh kumar
Hi, I would like to know about application dependency of PostgreSQL version upgrade. We have multiple servers with PG versions in 8.4, 9.2, 9.3, 9.4 and 9.5, that we want to upgrade to 9.6. We want to be sure that all applications will run smoothly after upgrade. Is there any dependency or

Re: Authentication?

2018-03-09 Thread Bjørn T Johansen
On Wed, 7 Mar 2018 10:19:35 -0500 Stephen Frost wrote: > Greetings, > > * Bjørn T Johansen (b...@havleik.no) wrote: > > Is it possible to use one authentication method as default, like LDAP, and > > if the user is not found, then try to authenticate using > >

Re: Feature request: min/max for macaddr type

2018-03-09 Thread Tom Lane
Herwin Weststrate writes: > ... I tried > adding some functions for macaddr_smaller/macaddr_larger to implement > the min/max. The code for it was very trivial, but then I got completely > lost in pg_proc.h/pg_aggregate.h. I fail to find the documentation for > this

Postgresql upgrade to 9.5.12/10.3 changes pg_dump format for cloning schemas

2018-03-09 Thread Aldrin Martoq Ahumada
Hi, For a multi tenant system, we are using the following command to blindly clone a schema into another: pg_dump -s -x -O -n #{default_tenant} #{dbname} This is done for us by a rails gem, which then feeds that script into the new created schema for the new tenant.

Re: Postgresql upgrade to 9.5.12/10.3 changes pg_dump format for cloning schemas

2018-03-09 Thread David G. Johnston
On Fri, Mar 9, 2018 at 6:26 AM, Aldrin Martoq Ahumada < aldrin.mar...@gmail.com> wrote: > Thinking in the long term, how could be the best way to clone a schema > into another? > Depends on why you are cloning schemas. Generally not cloning is the best bet - instead place the reference schema

Re: Postgresql upgrade to 9.5.12/10.3 changes pg_dump format for cloning schemas

2018-03-09 Thread Andre Oliveira Freitas
Hello Aldrin, I'm also using apartment with postgresql 9.6.6, and I don't see any issue with it. Are you using Apartment::Tenant.create? 2018-03-09 10:26 GMT-03:00 Aldrin Martoq Ahumada : > Hi, > > For a multi tenant system, we are using the following command to blindly

Re: Postgresql upgrade to 9.5.12/10.3 changes pg_dump format for cloning schemas

2018-03-09 Thread Aldrin Martoq Ahumada
Hi Andre, Yes, here is the issue: https://github.com/influitive/apartment/issues/532 It happens if you configured apartment with use_sql=true, which means it clones the schema from pg_dump. My first attempt was to “fix” the script generated

Re: Postgresql upgrade to 9.5.12/10.3 changes pg_dump format for cloning schemas

2018-03-09 Thread Melvin Davidson
On Fri, Mar 9, 2018 at 10:00 AM, Aldrin Martoq Ahumada < aldrin.mar...@gmail.com> wrote: > Hi Andre, > > Yes, here is the issue: https://github.com/influitive/apartment/issues/532 > > It happens if you configured apartment with use_sql=true, which means it > clones the schema from pg_dump. My

ERROR could not access transaction/Could not open file pg_commit_ts

2018-03-09 Thread Jeremy Finzel
Hello - Here is our cluster setup: cluster_a 9.5.11 Ubuntu 16.04.4 LTS --> cluster_b (streamer) 9.5.11 Ubuntu 16.04.4 LTS --> cluster_c (streamer) 9.5.11 Ubuntu 16.04.4 LTS Very recently, we started seeing these errors when running a query on a specific table on the streamer: 2018-03-09

pg/tcl performance related

2018-03-09 Thread wolfgang
Hi, suppose I want to create a tcl function that basically walks through a long list and compares its argument against all entries In plain tcl I would probably write set data { # lots of stuff here } proc check val { global data foreach d $data { # this does the work }

Re: pg/tcl performance related

2018-03-09 Thread Tom Lane
wolfg...@alle-noten.de writes: > Now, for pl/tcl, I could use either > create function check(text) returns text as $$ > set data { > # the data value > } > foreach d $data { ># the work > } > $$ language pltcl; > or > create function check(text) returns text as $$ > if ![info exists