Re: serial + db key, or guid?

2020-08-11 Thread Christopher Browne
On Tue, 11 Aug 2020 at 12:40, Christophe Pettus wrote: > > On Aug 11, 2020, at 09:37, Mark Phillips > wrote: > > > > I posed the question on the chance things had evolved since 2012, > specifically as it relates to postgres. > > The essentials haven't changed. Keys (such as UUIDs, especially

Re: Efficiently advancing a sequence without risking it going backwards.

2020-07-09 Thread Christopher Browne
On Thu, 9 Jul 2020 at 12:59, Jeremy Schneider wrote: > > > On Jul 6, 2020, at 19:06, Paul McGarry wrote: > > > > I don't think I can use setval(), because it risks making sequences go > backwards, eg: > > > > 1) Check values > > DB1sequence: 1234 > > DB2sequence: 1233 (1 behind) > > 2)

Re: Kerberos-Postgresql implementation for user authentication

2020-07-09 Thread Christopher Browne
On Thu, 9 Jul 2020 at 10:15, Brajendra Pratap Singh < singh.bpratap...@gmail.com> wrote: > Hi Niels, > > Thanks for your prompt response and I apologise for the incomplete > information. > Actually we are trying to implement the Kerberos authentication while > anyone trying to connect with

Re: Table partitioning for cloud service?

2020-05-21 Thread Christopher Browne
On Thu, 21 May 2020 at 11:53, Israel Brewster wrote: > On May 21, 2020, at 7:36 AM, Adrian Klaver > wrote: > > On 5/21/20 8:29 AM, Israel Brewster wrote: > > I’m working on my first cloud service, which will be backed by a > postgresql database. Currently I only have a single customer, but of

Re: Loading 500m json files to database

2020-03-23 Thread Christopher Browne
On Mon, 23 Mar 2020 at 06:24, pinker wrote: > Hi, do you have maybe idea how to make loading process faster? > > I have 500 millions of json files (1 json per file) that I need to load to > db. > My test set is "only" 1 million files. > > What I came up with now is: > > time for i in

Re: Could postgres12 support millions of sequences? (like 10 million)

2020-03-22 Thread Christopher Browne
On Sun, 22 Mar 2020 at 17:54, pabloa98 wrote: > > So the question may actually be: >> >> How do we improve our locking code, so we don't have to spawn millions >> of sequences? >> >> What is the locking method you are using? >> > > I am not using locking with the million sequence solution. I do

Re: Setting up an environment of EDB Advance server

2020-01-08 Thread Christopher Browne
On Wed, 8 Jan 2020 at 02:15, Daulat Ram wrote: > Hi team, > > > > We would need your help in setting up an environment of EDB Advance Server > 11 on Dev CentOS 7 VM. > > > >1. We need to create three database with separate table spaces : > > > > Test1 > > Test2 > > Test3 > > What would be

Re: UPDATE many records

2020-01-06 Thread Christopher Browne
On Mon, 6 Jan 2020 at 17:38, Israel Brewster wrote: > > Sure. But I feel we are getting a bit off track. Optimizing the runtime of > the update is great, but this is a one-off (hopefully) event. I want to > accomplish it as quickly as possible, of course, but at the same time it > doesn’t make

Re: UPDATE many records

2020-01-06 Thread Christopher Browne
On Mon, Jan 6, 2020, 3:15 PM Israel Brewster wrote: > On Jan 6, 2020, at 10:08 AM, Christopher Browne > wrote: > > On Mon, 6 Jan 2020 at 13:36, Israel Brewster > wrote: > >> Thanks to a change in historical data, I have a need to update a large >> number

Re: UPDATE many records

2020-01-06 Thread Christopher Browne
On Mon, 6 Jan 2020 at 13:36, Israel Brewster wrote: > Thanks to a change in historical data, I have a need to update a large > number of records (around 50 million). The update itself is straight > forward, as I can just issue an "UPDATE table_name SET > changed_field=new_value();" (yes,

Re: Work hours?

2019-08-28 Thread Christopher Browne
On Wed, 28 Aug 2019 at 01:02, Ron wrote: > We did something similar to that, except all the columns were in one > single table. It wasn't a data warehouse, though: the RDBMS we used could > be coerced into using a date index when large ranges were needed in detail > tables by joining it to

Re: Work hours?

2019-08-27 Thread Christopher Browne
On Tue, Aug 27, 2019, 6:27 PM stan wrote: > I am just starting to explore the power of PostgreSQL's time and date > functionality. I must say they seem very powerful. > > I need to write a function that, given a month, and a year as input returns > the "work hours" in that month. In other words

Re: Postgres 10.7 Systemd Startup Issue

2019-06-06 Thread Christopher Browne
On Thu, Jun 6, 2019, 8:19 PM Tom Lane wrote: > Francisco Olarte writes: > > On Thu, Jun 6, 2019 at 6:57 PM Kelly, Kevin wrote: > >> We’re attempting to launch postgres via systemd and noticing that when > invoking via systemctl start postgres.service the prompt never returns. If > we switch to

Re: Converting yes or no to one letter strings.

2019-06-05 Thread Christopher Browne
On Tue, 4 Jun 2019 at 18:30, Lou wrote: > Hi everyone, > > Is it possible to convert a boolean yes or no field to hold a one letter > string? For example, the strings: 's' 'f' 'p' 'e' > > To start off, I just need to convert true to 's'. false will have to be > manually changed to 'f' or 'p' or

Re: Feature request (or at least discussion): enable autovaccum on temp tables

2019-05-31 Thread Christopher Browne
On Fri, May 31, 2019, 12:26 PM Ivan Voras wrote: > Hi, > On Fri, 31 May 2019 at 17:43, Andrew Gierth > wrote: > >> > "Ivan" == Ivan Voras writes: >> >> Ivan> Since AFAIK temp tables are very close to unlogged ordinary >> Ivan> tables, what would stop this feature from being implemented?

Re: Feature request (or at least discussion): enable autovaccum on temp tables

2019-05-31 Thread Christopher Browne
On Fri, 31 May 2019 at 11:26, Ivan Voras wrote: > Hello, > > The reason why we are using temp tables is to allow concurrent runs on > some very large reports which involve creating and heavily churning dozens > of very large tables. > > The problem we're facing is that if we DON'T use temp

Re: User Details for PostgreSQL

2019-05-09 Thread Christopher Browne
On Thu, 9 May 2019 at 16:43, Kumar, Virendra wrote: > Hello Team, > > > > We are looking for some audit information about user creation. We need a > few audit fields which we did not find in PostgreSQL. I would be happy if > someone help us in finding these details. Besically we need information

Re: plctl extension issue postgresql 11.2

2019-03-28 Thread Christopher Browne
On Thu, 28 Mar 2019 at 17:11, Prakash Ramakrishnan < prakash.ramakrishnan...@nielsen.com> wrote: > Hi Tom, > > Thanks for your big help i did yum install plctl and extension below path > but still am getting error please find the below details, > > ==> psql > psql (11.2) > Type "help" for help. >

Re: Where to store Blobs?

2019-03-13 Thread Christopher Browne
On Wed, 13 Mar 2019 at 10:27, Thomas Güttler wrote: > I guess most people do not store Blobs in PostgresSQL. > > Where do you store Blobs? Things have changed, but at one time, we were using RT as our ticketing system (https://bestpractical.com/request-tracker) and it would capture documents as

Re: POSTGRES/MYSQL

2019-03-12 Thread Christopher Browne
On Tue, 12 Mar 2019 at 12:53, Benedict Holland wrote: > I am not saying it is not well documented. I am saying that it isn't ACID > compliant, which it isn't, as they document. I *love* the notion of being able to roll back DDL, but it has long been common for DDL to *not* be transactional even

Re: POSTGRES/MYSQL

2019-03-11 Thread Christopher Browne
On Mon, 11 Mar 2019 at 12:36, Michael Nolan wrote: > There isn't a simple answer to this, it's like asking 'which is better for > cooking: aluminum or stainless steel'. The answer is 'it depends on what > you're trying to do'.i Metaphors can be dangerous (especially when automotive ones get

Re: Multiple LDAP Servers for ldap Authentication

2018-12-20 Thread Christopher Browne
On Thu, 20 Dec 2018 at 16:17, Kumar, Virendra wrote: > > I figured it out, this is how it works: > -- > hostall all0.0.0.0/0 ldap > ldapserver=server1.com ldapserver=server2.com ldapprefix=PROD01\ > > So documentation need some update. Looking at

Re: psql is hanging

2018-12-02 Thread Christopher Browne
I like the "add an analyze" idea; the two most likely causes of the phenomenon (to my mind) are either: a) Something's getting locked and Tom Lane's idea of checking pg_locks when you notice it's stopped can help track down the problem. Further to that, the thing I'd be expecting to see if the

Re: VM Instance to Google Cloud SQL Migration

2018-11-15 Thread Christopher Browne
On Thu, 15 Nov 2018 at 07:06, Ian Lawrence Barwick wrote: > > 2018年11月15日(木) 17:19 Andreas Kretschmer : > > > > Am 15.11.2018 um 08:54 schrieb Sathish Kumar: > > > We would like to migrate our Postgresql VM instance on Google Cloud > > > Platform to Google Cloud SQL with a minimal downtime. As I

Re: Please let me know which configuration setting we need to modify to speedup the pg_dump backup.

2018-10-10 Thread Christopher Browne
On Wed, Oct 10, 2018, 10:32 PM Raghavendra Rao J S V < raghavendra...@gmail.com> wrote: > Hi All, > > pg_dump is taking more time. Please let me know which configuration > setting we need to modify to speedup the pg_dump backup.We are using 9.2 > version on Centos Box. > There certainly isn't a

Re: COPY threads

2018-10-10 Thread Christopher Browne
On Wed, 10 Oct 2018 at 16:22, Ravi Krishna wrote: > You obviously are referring to multiple connections running COPY on different > tables, right? Like what pg_restore does with -j option. > Doesn't copy take an exclusive lock on the table which makes it incompatible > with parallelization.

Re: How can I get and handle the status of sql statements that run in plpgsql ?

2018-10-02 Thread Christopher Browne
On Tue, 2 Oct 2018 at 16:48, David Gauthier wrote: > > Hi: > psql (9.6.7, server 9.5.2) on linux > > How does one get the status of an sql statement executed in plpgsql? If that > status is cryptic, how can that be translated to something which someone > could understand? Finally, how can I

Re: Weird procedure question

2018-09-25 Thread Christopher Browne
On Tue, Sep 25, 2018, 2:19 AM digimer wrote: > Oh, this is a very interesting approach! I didn't realize any UUIDs > could be created in a predictable way. Thank you, this might be what I need. > Yep, DCE defined about 5 different versions of UUIDs, each with somewhat differing

Re: Multiple COPY on the same table

2018-08-21 Thread Christopher Browne
On Mon, 20 Aug 2018 at 16:23, Adrian Klaver wrote: > > On 08/20/2018 08:56 AM, Nicolas Paris wrote: > >> Can I split a large file into multiple files and then run copy using > >> each file. > > > > AFAIK, copy command locks the table[1] while there is no mention of this > > in the

Re: [External] Multiple COPY on the same table

2018-08-20 Thread Christopher Browne
On Mon, 20 Aug 2018 at 12:53, Ravi Krishna wrote: > > What is the goal you are trying to achieve here. > > To make pgdump/restore faster? > > To make replication faster? > > To make backup faster ? > > None of the above. > > We got csv files from external vendor which are 880GB in total size,

Re: Postgres - search for value throughout many tables?

2018-08-08 Thread Christopher Browne
On Wed, 8 Aug 2018 at 10:14, David G. Johnston wrote: > > On Wednesday, August 8, 2018, czezz wrote: >> >> Hi everyone, >> I want to aks if anyone knows is there a way to search for specific "value" >> throughout list of tables OR all tables in databse? > > > Can you pg_dump your database to

Re: User documentation vs Official Docs

2018-07-16 Thread Christopher Browne
On Mon, 16 Jul 2018 at 20:14, Joshua D. Drake wrote: > > On 07/16/2018 05:08 PM, Alvaro Herrera wrote: > > > > Sounds like wiki pages could solve need this pretty conveniently. If > > and when the content is mature enough and migrates to the tutorial main > > documentation pages, the wiki pages

Re: Building a notification system.

2018-07-15 Thread Christopher Browne
On Sun, Jul 15, 2018, 5:30 AM Anto Aravinth, wrote: > Hello Everyone, > > > I'm playing around with postgresql with SO datasets. In the process, I > have dumped 60M questions data onto the postgresql. I'm trying to build a > notification system on top of this, so that, when a user edits a

Re: Open Source tool to deploy/promote PostgreSQL DDL

2018-07-11 Thread Christopher Browne
On Wed, 11 Jul 2018 at 16:37, Ron wrote: > > On 07/11/2018 03:21 PM, Christopher Browne wrote: > > I have built one that I call Mahout > > (https://github.com/cbbrowne/mahout) which has the merit of involving > > just two shell scripts, one of which is

Re: Open Source tool to deploy/promote PostgreSQL DDL

2018-07-11 Thread Christopher Browne
I have built one that I call Mahout (https://github.com/cbbrowne/mahout) which has the merit of involving just two shell scripts, one of which is an auditing tool (pgcmp). It implements a "little language" to indicate dependencies between the SQL scripts that implement the DDL changes. The

Re: large numbers of inserts out of memory strategy

2017-11-30 Thread Christopher Browne
On 30 November 2017 at 05:22, Peter J. Holzer wrote: > On 2017-11-29 08:32:02 -0600, Ted Toth wrote: >> Yes I did generate 1 large DO block: >> >> DO $$ >> DECLARE thingid bigint; thingrec bigint; thingdataid bigint; >> BEGIN >> INSERT INTO thing >>

Re: large numbers of inserts out of memory strategy

2017-11-30 Thread Christopher Browne
On 30 November 2017 at 05:22, Peter J. Holzer wrote: > On 2017-11-29 08:32:02 -0600, Ted Toth wrote: >> Yes I did generate 1 large DO block: >> >> DO $$ >> DECLARE thingid bigint; thingrec bigint; thingdataid bigint; >> BEGIN >> INSERT INTO thing >>