This question already has an answer here:
Is there any way to know the last commit value in a table?
(1 answer)
Closed 5 years ago.
I'm Oracle Dba and want to learn Postgresql. Does it have equivalent of flashback in Postgresql?
In short, no. Here's a good answer: https://dba.stackexchange.com/a/362/30035
And ATM the best practice as Laurenz suggests here: https://www.postgresql.org/message-id/A737B7A37273E048B164557ADEF4A58B36614938%40ntex2010i.host.magwien.gv.at
the lagging slave can show you the value some time ago (look recovery_min_apply_delay, or pg_xlog_replay_pause() fro pre 9.4 releases) - of course it's not a FRA, but can give you some place to move
Related
This question already has answers here:
multi Master Replication in Postgres
(1 answer)
Multi master replication in postgresql [closed]
(2 answers)
Closed 4 months ago.
I have a question that doesn't seem to be answered anywhere. (At least that I can find)
I'm trying to do the following:
I have an HQ Database.
Each agency has X computers with local DBs that must synch between themselves (In the agency) and HQ.
Is this possible with the current logical replication of Postgres?
Here is the scheme of what I was thinking
My question is, is this currently possible with PostgreSQL?
I was thinking of the following:
The Master DB is a publisher and subscribes to each workstation on
the network.
Each workstation is a publisher and a subscriber to each workstation on the local network segment AND the master DB.
Is this feasible? Or should I develop my own script to do peer-to-peer synch?
Let me know what you think. Thanks.
Wanted to know if PostgreSQL 11 does support MERGE or not.
I read on following articles -
https://wiki.postgresql.org/wiki/SQL_MERGE
https://wiki.postgresql.org/wiki/SQL_MERGE_Patch_Status
Path overview says that - "Patch for SQL Standard MERGE statement has been submitted to PostgreSQL core"
I also find out other answers here, but all of them for older version only, please help me identify if MERGE functionality is implemented with PostgreSQL 11 or not?
This question already has answers here:
How to drop a PostgreSQL database if there are active connections to it?
(12 answers)
Closed 7 years ago.
We use postgres as a real-time data cache for observations. We need to drop our tables on a daily basis. There are frequently clients that still have the db open for reading, actually they have it open for read/write and don't realize it. We have specifically noted that Python opens it rw and keeps a permanent transaction lock on the DB. This prevents us from dropping the tables.
The data table can have different number of columns on a daily basis, so 'delete from table' does not appear to be an option.
We have tried creating a read-only user, but that did not help, it was still getting "IDLE in transaction".
Is there any kind of 'kill -9' for dropping tables?
We are currently on PostgreSQL 8.4 on RHEL 6, but will be migrating to RHEL 7 soon.
If you have administrative access then you can kill all the current sessions. I think your question is similar to this.
This question already has an answer here:
Find PostgreSQL server hostname on which it runs
(1 answer)
Closed 8 years ago.
Is it possible with easy syntax like MS SQL Server do
SELECT HOST_NAME()
in postgresql 9.3.2?
I have read some articles but no result !
No, the default build doesn't have that. It is easy however to extend PostgreSQL with new native functions and someone already did it: http://pgxn.org/dist/hostname/ .
Another way would be to install an additional db language (PostgreSQL is great like that - you have the option of using arbitrary languages instead of pl/pgsql) and use the language's own functions to do that. There are e.g. pl/python (http://www.postgresql.org/docs/9.1/static/plpython-funcs.html) and pl/perl (http://www.postgresql.org/docs/9.1/static/plperl-trusted.html -- see also the discussion about trusted and untrusted languages).
Consider long-running query in PostgreSQL of index creation, smth like that:
CREATE INDEX some_idx
ON some_table USING btree
(some_varchar_column COLLATE pg_catalog."default");
The question is: how to retrieve the progress of this query process? Is it possible or not?
It is interesting to know the way in both cases:
using pgAdmin
using SQL
using some internal postgreSQL tools.
May be this additional info could influence on the answer: PostgreSQL 9.3 on Windows 7 64 bit.
There's a wiki page on this very topic, which links to several links. Their accuracy is in question as of a few years ago. There's also a thread on hackers from 2006 or 2007 regarding adding progress indicators within which, EnterpriseDBs Greg Stark makes the same point.
In Postgres v12+ the view pg_stat_progress_create_index should give you this information.
https://www.postgresql.org/docs/12/progress-reporting.html