postgresql – Postgres 8.3 correctly deletes the files in pgsql_tmp

We are talking here about a PostgreSQL 8.3 RDBMS. So, no version of pg_terminate_backend () is possible with this version.

Sometimes we have to kill the processes running at the operating system level (kill -9 PID) to solve the problems related to the max_connections value reached. In such cases, we have targeted the long SELECT queries to kill.

As a result, we discovered that our file system is growing at 98% and filling up quickly, displaying over 1500 files in the pgsql_tmp directory.

Some orphaned files are the expected result of this type of maneuver, because temporary files need to be removed during proc_exit processing and the aggressive closing of processes being run is not the best option.

So, to get rid of this "trash", what is our best option:

a) Perform a postmaster restart and expect the RDBMS to work and clean all temporary directories by itself.


b) Stop the postmaster, manually delete the files in $ PGDATA / pgsql_tmp / and restart postmaster


c) Without stopping the server, manually delete the $ PGDATA / pgsql_tmp / files that are older than the current day

Please justify your answers

php – How to align buttons correctly

The first things improve your code:

function action_after_question_content () {
if (! is_single ()) {
echo "See answers";
echo "Give an answer";

Note: We can improve further by getting the number of comments. On this basis, build the buttons: Ex: if we have a number of comments in the plural, we will use "See the answers". If we have one, we will use "See the answer." If we do not have one, we can display something like "Be the first to answer!"

It will look like:

function action_after_question_content () {
if (! is_single ()) {
$ num_comments = get_comments_number ();
if ($ num_comments):
echo & # 39;& # 39 ;. _n (& # 39; See Answer & # 39 ;, & quot; See Answers & # 39 ;, $ num_comments, & quot; textdomain & quot;). & # 39;& # 39 ;;
echo & # 39;& # 39 ;. __ (& # 39; Reply & # 39;; & # 39; textdomain & # 39;). & # 39;& # 39 ;;
echo & # 39;& # 39 ;. __ (Be the first to answer!, Textdomain & # 39;). & # 39;& # 39 ;;
end if;

Where in CSS should look like:

.btn-puzzle-align {
lower margin: 2.5 rem;

This is just a guess, the margin-bot might not work but might work depending on the other CSS elements. The code is also untested. Note that you must edit textdomain as the textdomain theme and version 2.5 as what you might need.

table – The data insertion query does not work correctly

I am inserting data from an old database into the configuration of a new database. I had created many queries to insert the data, but one of them was not working properly. I have the impression of having been able to confuse something when coding, and I just can not know exactly where my mistake is. That's the code in question.

; WITH JobTempAndRowNumber AS (
PARTITION BY job_number ORDER BY client_name) AS rn
DE _job_temp)
INSERT INTO job_issues (job_number, job_description, customer)
SELECT job_number, job_number, client_name
FROM JobTempAndRowNumber jtarn
JOIN WORK j ON j.job_number = jtarn.job_num AND jtarn.rn = 1
INSERT INTO jobs (job_number, job_description, client_id, notes)
SELECT jt.job_num, jt.job_desc, c.customer_id, jt.notes
DE _job_temp AS jt
SELECT * FROM job_issues WHERE job_number = jt.job_num)

What the code above is supposed to do is go through my installation table (_job_temp) and put the information in the folder jobs table, ignoring duplicate entries.

Now, when I programmed this query for the first time, I was not working with empty tables, so I think it may be my problem here. Because for the moment, the query puts everything in the _job_temp table in the job_issues table, and nothing gets inserted into the jobs table.

So, basically, what I have to do is go through each record of the _jobs_temp table, and if the job_num the value does not already exist in the jobs table, insert this data. If the value exists, instead, it inserts it into the job_issues table.

Get the size of the Canvas user interface element correctly on Unity

Normally, when the anchors are in the same position, we can use .sizeDelta or .rect.width / height of RectTransform, but if the anchors are extended, both return negative values:

normal inspector
debug inspector

Which in reality is not at all 5:

real button on canvas

There is already SetSizeWithCurrentAnchor but how to get the others RectTransformis the absolute size?

php – How to add a new child correctly with children in xml format

so I have a return like this from an API and I want to add another data record for testing purposes


cname test

I tried to do that

$ utilApi = new libUtilApi ($ apiRequest);
$ utilApi-> request ();
$ resultAPI = $ utilApi-> response;
$ resultAPI = simplexml_load_string ($ resultAPI);
$ record = $ resultAPI-> addChild ("record");
$ record-> addChild ("assessment_idx", "7546");

but the output looks like this


cname test

new test

the added child is not going in the right position, I have tried

$ record = $ resultAPI-> record[0]-> addChild ("record");

but it falls to an error like calling an addChild () member function on null

How to correctly declare this function?

I want to create a simple function that prints all prime numbers from 1 to x. I have the following code, which does not cause any kernel error but returns nothing:

all premium[x_] = For[i=0, i<=x, i++, 
                 If[PrimeQ[i], Impression[i]]]

What did I do wrong?

angular – DevOps "Ng Build" does not create .js files correctly

When I'm in the development environment, I build my Angular project with the command "ng build –prod – aot" and all the choppy .js files are created in the / dist folder:
main.7e47ed28ca0334b01383.js (602kb)
polyfills.54a6c8e7e6863aa90225.js (59kb)
runtime.a66f828dca56eeb90e02.js (2 KB)
scripts.c79426ad610cbf775bf5.js (360 KB)

But in DevOps, I use the same command:
The root of the / dist folder is empty. But there is a subfolder dist / out-tsc. And here I can find Main.js (2ko) another "almost emprty .js file"

When I debug DevOps, I can see that the hashed files are creted:
But when the build is ready and the artifact is created, I only find the empty dist folder with the out-tsc folder.

What could cause that?

PS I have row:
"outDir": "dist / out-tsc",

at tsconfig.json. But change it to "outDir": "dist", just create empty .js files in the / dist folder. Also removing "outDir": "dist / out-tsc", does not help you.

CSS not calculating completely in iframe, how to force it to render correctly?

This is for a chrome extension, you can see that the lower left corner is rounded, but the right corner is right. This is also built into an iframe.

enter the description of the image here

Now, if I inspect an item and add border: 1px solid green, it corrects itself. enter the description of the image here

And, if I delete the border I just added, it stays fixed:enter the description of the image here

An idea of ​​what's going on? It's as if the iframe did not make the right width at the start or something, but the iframe does not change width at all times.

database – The Access 2016 database does not seem to connect correctly (c #)

I am new to C # and I am trying to create an in – store bill generator for fun and learning. Since I do not know much about databases, access seemed decently simple.
I'm just trying to confirm to the user that the connection to the database is successful. I've connected the database to my project, but nothing happens when I run the program.

I've tried to give the status in a label but that does not show up either.
availableproductsbox is a listbox

                void private availableproductsbox_SelectedIndexChanged (object sender, EventArgs e)

OleDbConnection connection = new OleDbConnection ();
connection.ConnectionString = @ "Provider = Microsoft.ACE.OLEDB.12.0; Data Source = C:  Users  admin  source  repos  MultiCashTrack  MultiCashTrack  items.accdb;
Persistent security information = False; ";
connection.Open ();
MessageBox.Show ("Connected Database");
connection.Close ();

catch (Exception ex)
MessageBox.Show ("Failed to connect to database" + ex);


I'm waiting for it to display a message box saying "Connected Database", but do not show up.