Re: Date created for tables

2019-12-05 Thread Ron
On 12/5/19 7:40 PM, Michael Paquier wrote: On Thu, Dec 05, 2019 at 07:12:22PM -0600, Ron wrote: On 12/5/19 1:01 PM, Tom Lane wrote: It's been considered, and rejected, many times. Aside from the overhead involved, there are too many different ideas of what such dates ought to mean (e.g., what

Re: archiving question

2019-12-05 Thread Michael Paquier
On Thu, Dec 05, 2019 at 03:04:55PM +, Zwettler Markus (OIZ) wrote: > What do you mean hear? > > Afaik, Postgres runs the archive_command per log, means log by log by log. > > How should we parallelize this? You can, in theory, skip the archiving for a couple of segments and then do the opera

Re: Date created for tables

2019-12-05 Thread Michael Paquier
On Thu, Dec 05, 2019 at 07:12:22PM -0600, Ron wrote: > On 12/5/19 1:01 PM, Tom Lane wrote: >> It's been considered, and rejected, many times. Aside from the overhead >> involved, there are too many different ideas of what such dates ought to >> mean (e.g., what should happen during dump/restore? d

Re: Date created for tables

2019-12-05 Thread Ron
On 12/5/19 1:01 PM, Tom Lane wrote: Chloe Dives writes: Having moved to PostgreSQL from Oracle a few years ago I have been generally very impressed by Postgres, but there are a few things that I still miss. One of those is being able to see the created and last modified dates for database

Re: Date created for tables

2019-12-05 Thread Adrian Klaver
On 12/5/19 9:10 AM, Chloe Dives wrote: Having moved to PostgreSQL from Oracle a few years ago I have been generally very impressed by Postgres, but there are a few things that I still miss. One of those is being able to see the created and last modified dates for database objects. Is this som

Re: Date created for tables

2019-12-05 Thread Justin
Hi Tom can't we get access to this information in a backwards way by using pg_xact_commit_timestamp() then query the system catalog tables xmin entry for the relevant object??? this requires turning on pg_xact_commit_timestamp https://www.postgresql.org/docs/current/runtime-config-replication.ht

Re: Date created for tables

2019-12-05 Thread Tom Lane
Chloe Dives writes: > Having moved to PostgreSQL from Oracle a few years ago I have been generally > very impressed by Postgres, but there are a few things that I still miss. One > of those is being able to see the created and last modified dates for > database objects. > Is this something that

Date created for tables

2019-12-05 Thread Chloe Dives
Having moved to PostgreSQL from Oracle a few years ago I have been generally very impressed by Postgres, but there are a few things that I still miss. One of those is being able to see the created and last modified dates for database objects. Is this something that has been considered for imple

Re: Schema Copy

2019-12-05 Thread Sonam Sharma
The version, I am using is 11.2 On Thu, Dec 5, 2019, 9:29 PM Melvin Davidson wrote: > > Can someone please help in schema copy in same database ? > > A while ago, I created the clone_schema function which will duplicate one > schema to a new schema with the option to copy or not copy data. Howev

Re: Schema Copy

2019-12-05 Thread Melvin Davidson
> Can someone please help in schema copy in same database ? A while ago, I created the clone_schema function which will duplicate one schema to a new schema with the option to copy or not copy data. However, since there are two versions depending on the version of PostgreSQL you are using, and you

Re: We have to close the cursor or rollback the transaction in case of failure?

2019-12-05 Thread Tom Lane
M Tarkeshwar Rao writes: > I am using cursors to fetch the data from table using C++. Initially were > errors as highlighted as "current transaction isaborted" in /var/logs during > full vacuum. > We are little bit confused in failure handling. In case of any failure of > following function.

AW: archiving question

2019-12-05 Thread Zwettler Markus (OIZ)
> > Greetings, > > * Zwettler Markus (OIZ) (markus.zwett...@zuerich.ch) wrote: > > When there is a Postgres archiver stuck because of filled pg_xlog and > > archive > directories... > > > > ... and the pg_xlog directory had been filled with dozens of GBs of xlogs... > > > > ...it takes ages unti

AW: secure deletion of archived logs

2019-12-05 Thread Zwettler Markus (OIZ)
> Greetings, > > * Zwettler Markus (OIZ) (markus.zwett...@zuerich.ch) wrote: > > with Oracle we use "backup archivelog all delete all input". > > this is a kind of atomic transaction. > > everything backuped for sure is deleted. > > > > with Postgres we archive to a local host directory > > ... h

Re: Schema Copy

2019-12-05 Thread Justin
Hi Sonam If you want a copy the data do a Select * into (newschema.table) from oldschema.table https://www.postgresql.org/docs/9.1/sql-selectinto.html If you want to just move the table https://www.postgresql.org/docs/current/sql-altertable.html Alter Table oldschema.table Set Schema news

Re: Schema Copy

2019-12-05 Thread Sonam Sharma
Hi Justin, What can be done to move the data.. On Thu, Dec 5, 2019, 7:57 PM Justin wrote: > Hi Sonam > > As long as the edited sql script has been changed from oldschema.tables > or oldschema.functions etc... to newschema.functions, newschema.functios > etc... > > This does not move data >

Re: Schema Copy

2019-12-05 Thread Justin
Hi Sonam As long as the edited sql script has been changed from oldschema.tables or oldschema.functions etc... to newschema.functions, newschema.functios etc... This does not move data On Thu, Dec 5, 2019 at 5:07 AM Sonam Sharma wrote: > Can someone please help in schema copy in same datab

Schema Copy

2019-12-05 Thread Sonam Sharma
Can someone please help in schema copy in same database ? I have taken db dump of current schema and in the ddl file , I have edited it with new schema. Will this work?

We have to close the cursor or rollback the transaction in case of failure?

2019-12-05 Thread M Tarkeshwar Rao
Hi all, I am using cursors to fetch the data from table using C++. Initially were errors as highlighted as "current transaction isaborted" in /var/logs during full vacuum. We are little bit confused in failure handling. In case of any failure of following function. PQexec(connection, my