Lookup Primary Key of Foreign Server's Table

2019-10-22 Thread Chris Morris
I'm looking for a system query that will lookup the primary key column on a fdw table. It's possible we need to declare that part of the foreign table's schema in the local (is that the right term?) database? Here's the foreign table - I don't see anything showing a primary key, so my hunch is we

Re: Lookup Primary Key of Foreign Server's Table

2019-10-23 Thread Chris Morris
The foreign table has a primary key. Ruby on Rails uses a system query to lookup what the primary key on the table is, but it's querying the local database, and not finding anything. In a schema dump of the local database, I don't see a primary key defined, so I'm presuming I need to issue an ADD C

Re: Lookup Primary Key of Foreign Server's Table

2019-10-24 Thread Chris Morris
nston < david.g.johns...@gmail.com> wrote: > On Wed, Oct 23, 2019 at 8:47 AM Chris Morris > wrote: > >> The foreign table has a primary key. Ruby on Rails uses a system query to >> lookup what the primary key on the table is, but it's querying the local >> database,

PG 12: Partitioning across a FDW?

2020-03-24 Thread Chris Morris
Is it even possible to use PG partitioning across a Foreign Server?

Re: PG 12: Partitioning across a FDW?

2020-03-25 Thread Chris Morris
> > > Is it even possible to use PG partitioning across a Foreign Server? > I am not certain what you mean, but you can have foreign tables as > partitions > of a partitioned table. The partitions won't be processed in parallel > though. I have a large, growing table, that I'd like to start part

Re: PG 12: Partitioning across a FDW?

2020-03-25 Thread Chris Morris
> > Not yet.. There is ongoing work to make that happen though. Glad to hear it. :) Thx.

Re: PG 12: Partitioning across a FDW?

2020-03-25 Thread Chris Morris
Right now my dbs are hosted by Heroku, so I doubt I have any control over the dbs at that level. Thanks for the idea though! :) On Wed, Mar 25, 2020 at 12:04 PM Michael Lewis wrote: > Chris, > Does it actually need to be a different server and database, or would it > be possible to have another

Log Unique Queries without Params?

2020-04-11 Thread Chris Morris
I have a local script I've written that will scan a log of PG queries to extract out unique queries without any specific parameter data. For example, if these 2 queries are actually run: SELECT * FROM foo where bar = 1; SELECT * FROM foo where bar = 2; It will capture only: SELECT * FROM foo whe

Re: Log Unique Queries without Params?

2020-04-12 Thread Chris Morris
Thx! On Sat, Apr 11, 2020 at 11:55 PM Julien Rouhaud wrote: > On Sun, Apr 12, 2020 at 6:51 AM Chris Morris > wrote: > > > > I have a local script I've written that will scan a log of PG queries to > extract out unique queries without any specific parameter data.

Audit Role Connections

2020-05-29 Thread Chris Morris
We're using Heroku's PG, and it comes with a default, almost super-user. I'm wanting to restrict that account for only our production app servers, and have anyone connecting for personal queries to go through an assigned role by employee (that's all setup and working). Other than polling pg_stat_a

Re: Audit Role Connections

2020-05-29 Thread Chris Morris
Ah, I do appear to have that enabled (inside Heroku's config), but I can't find anything like that in the logs, so I've opened a ticket with them. Thx a lot! On Fri, May 29, 2020 at 2:25 PM Peter J. Holzer wrote: > On 2020-05-29 12:42:47 -0500, Chris Morris wrote: > >